From f53207017fd99aaeecef6e61b4a3d8e868f53756 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 23 Dec 2021 10:32:05 -0800 Subject: hwmon: (adt7x10) Convert to use regmap Using regmap lets us use the regmap subsystem for SPI vs. I2C register accesses. It lets us hide access differences in backend code and lets the common code just access registers without knowing their size. We can also use regmap for register caching. Tested-by: Cosmin Tanislav Reviewed-by: Cosmin Tanislav Signed-off-by: Guenter Roeck --- drivers/hwmon/adt7x10.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'drivers/hwmon/adt7x10.h') diff --git a/drivers/hwmon/adt7x10.h b/drivers/hwmon/adt7x10.h index a1ae682eb32e..55ff08bfe946 100644 --- a/drivers/hwmon/adt7x10.h +++ b/drivers/hwmon/adt7x10.h @@ -17,15 +17,9 @@ struct device; -struct adt7x10_ops { - int (*read_byte)(struct device *, u8 reg); - int (*write_byte)(struct device *, u8 reg, u8 data); - int (*read_word)(struct device *, u8 reg); - int (*write_word)(struct device *, u8 reg, u16 data); -}; - int adt7x10_probe(struct device *dev, const char *name, int irq, - const struct adt7x10_ops *ops); + struct regmap *regmap); + void adt7x10_remove(struct device *dev, int irq); #ifdef CONFIG_PM_SLEEP -- cgit v1.2.3