diff options
Diffstat (limited to 'include/linux/mfd/max8998-private.h')
-rw-r--r-- | include/linux/mfd/max8998-private.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index 6dc75b3e2d33..f0a20cdc288c 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h @@ -75,38 +75,18 @@ enum { /** * struct max8998_dev - max8998 master device for sub-drivers * @dev: master device of the chip (can be used to access platform data) - * @i2c_client: i2c client private data - * @dev_read(): chip register read function - * @dev_write(): chip register write function - * @dev_update(): chip register update function + * @i2c: i2c client private data * @iolock: mutex for serializing io access */ struct max8998_dev { struct device *dev; - struct i2c_client *i2c_client; - int (*dev_read)(struct max8998_dev *max8998, u8 reg, u8 *dest); - int (*dev_write)(struct max8998_dev *max8998, u8 reg, u8 val); - int (*dev_update)(struct max8998_dev *max8998, u8 reg, u8 val, u8 mask); + struct i2c_client *i2c; struct mutex iolock; }; -static inline int max8998_read_reg(struct max8998_dev *max8998, u8 reg, - u8 *value) -{ - return max8998->dev_read(max8998, reg, value); -} - -static inline int max8998_write_reg(struct max8998_dev *max8998, u8 reg, - u8 value) -{ - return max8998->dev_write(max8998, reg, value); -} - -static inline int max8998_update_reg(struct max8998_dev *max8998, u8 reg, - u8 value, u8 mask) -{ - return max8998->dev_update(max8998, reg, value, mask); -} +extern int max8998_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); +extern int max8998_write_reg(struct i2c_client *i2c, u8 reg, u8 value); +extern int max8998_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); #endif /* __LINUX_MFD_MAX8998_PRIV_H */ |