[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBiBBJOmjOAHGUn0@smile.fi.intel.com>
Date: Mon, 20 Mar 2023 17:51:32 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: William Breathitt Gray <william.gray@...aro.org>
Cc: Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: addac: stx104: Migrate to the regmap API
On Sun, Mar 19, 2023 at 04:22:56PM -0400, William Breathitt Gray wrote:
> 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.
...
> -/**
> - * struct stx104_iio - IIO device private data structure
I believe this...
> - * @chan_out_states: channels' output states
> - * @reg: I/O address offset for the device registers
> - */
> -struct stx104_iio {
...and this can be left here. With that the diff won't be too disrupted.
(You are using only pointers to the generic data types in the struct
definition, that's why its location can be almost anywhere before the
first its real user.)
> - unsigned int chan_out_states[STX104_NUM_OUT_CHAN];
> - struct stx104_reg __iomem *reg;
...
> +struct stx104_iio {
> + struct regmap *aio_data_map;
> + struct regmap *aio_ctl_map;
> };
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists