Re: [PATCH] iio: addac: stx104: Migrate to the regmap API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux