[PATCH 2/6] mfd: adp5585: add ADI adp5585 core support
Linus Walleij
linus.walleij at linaro.org
Mon Aug 5 00:48:44 PDT 2024
Hi Frank,
thanks for your patch!
On Tue, Jul 16, 2024 at 9:29 PM Frank Li <Frank.Li at nxp.com> wrote:
> +struct adp5585_dev {
> + struct device *dev;
> + struct i2c_client *i2c_client;
> +
> + int (*read_reg)(struct adp5585_dev *adp5585, u8 reg, u8 *val);
> + int (*write_reg)(struct adp5585_dev *adp5585, u8 reg, u8 val);
> +};
The read_reg() and write_reg() accessors looks like a reimplementation
of regmap.
Can you check if you can just let the subdrivers access a regmap
for the parent MFD device and use that to read/write registers?
There are many examples of this in recent MFD drivers.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list