iio: addac: stx104: Migrate to the regmap API
authorWilliam Breathitt Gray <william.gray@linaro.org>
Thu, 6 Apr 2023 14:40:14 +0000 (10:40 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 10 Apr 2023 11:26:34 +0000 (12:26 +0100)
commitc7301b848191f18719c5a6247300998269059c0b
treef553a879d618ebb75667debe79337315d6e0a1f1
parenta94abc74c5248d3c09bb18aa8437e85a6a31eadd
iio: addac: stx104: Migrate to the regmap API

The regmap API supports IO port accessors so we can take advantage of
regmap abstractions rather than handling access to the device registers
directly in the driver.

In addition, to improve code organization in stx104_probe(), the
devm_iio_device_register() call is moved above GPIO configuration in
order to keep relevant code closer together.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/0bcdfc4738cc019fb2ff83f61eb46a3488bc166d.1680790580.git.william.gray@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/addac/Kconfig
drivers/iio/addac/stx104.c