From: Mark Brown Date: Sat, 12 May 2012 10:09:47 +0000 (+0100) Subject: Merge remote-tracking branches 'regulator/topic/core', 'regulator/topic/regmap' and... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=178e43aef2979525d7864daefd9499614e13800e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge remote-tracking branches 'regulator/topic/core', 'regulator/topic/regmap' and 'regulator/topic/register' into regulator-next --- 178e43aef2979525d7864daefd9499614e13800e diff --cc include/linux/mfd/rc5t583.h index 0b64b19d81ab,a2c61609d21d,b2c1f442d4ef..c42fe92a727d --- a/include/linux/mfd/rc5t583.h +++ b/include/linux/mfd/rc5t583.h @@@@ -278,46 -277,16 -303,19 +304,49 @@@@ struct rc5t583 struct rc5t583_platform_data { int irq_base; bool enable_shutdown; ++ int regulator_deepsleep_slot[RC5T583_REGULATOR_MAX]; ++ unsigned long regulator_ext_pwr_control[RC5T583_REGULATOR_MAX]; ++ struct regulator_init_data *reg_init_data[RC5T583_REGULATOR_MAX]; }; --int rc5t583_write(struct device *dev, u8 reg, uint8_t val); --int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val); --int rc5t583_set_bits(struct device *dev, unsigned int reg, -- unsigned int bit_mask); --int rc5t583_clear_bits(struct device *dev, unsigned int reg, -- unsigned int bit_mask); --int rc5t583_update(struct device *dev, unsigned int reg, -- unsigned int val, unsigned int mask); ++static inline int rc5t583_write(struct device *dev, uint8_t reg, uint8_t val) ++{ ++ struct rc5t583 *rc5t583 = dev_get_drvdata(dev); ++ return regmap_write(rc5t583->regmap, reg, val); ++} ++ ++static inline int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val) ++{ ++ struct rc5t583 *rc5t583 = dev_get_drvdata(dev); ++ unsigned int ival; ++ int ret; ++ ret = regmap_read(rc5t583->regmap, reg, &ival); ++ if (!ret) ++ *val = (uint8_t)ival; ++ return ret; ++} ++ ++static inline int rc5t583_set_bits(struct device *dev, unsigned int reg, ++ unsigned int bit_mask) ++{ ++ struct rc5t583 *rc5t583 = dev_get_drvdata(dev); ++ return regmap_update_bits(rc5t583->regmap, reg, bit_mask, bit_mask); ++} ++ ++static inline int rc5t583_clear_bits(struct device *dev, unsigned int reg, ++ unsigned int bit_mask) ++{ ++ struct rc5t583 *rc5t583 = dev_get_drvdata(dev); ++ return regmap_update_bits(rc5t583->regmap, reg, bit_mask, 0); ++} ++ ++static inline int rc5t583_update(struct device *dev, unsigned int reg, ++ unsigned int val, unsigned int mask) ++{ ++ struct rc5t583 *rc5t583 = dev_get_drvdata(dev); ++ return regmap_update_bits(rc5t583->regmap, reg, mask, val); ++} ++ int rc5t583_ext_power_req_config(struct device *dev, int deepsleep_id, int ext_pwr_req, int deepsleep_slot_nr); int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base);