diff options
author | Prabhu Kuttiyam <pkuttiyam@nvidia.com> | 2013-12-18 16:07:03 -0800 |
---|---|---|
committer | Bibek Basu <bbasu@nvidia.com> | 2013-12-18 23:09:58 -0800 |
commit | b714c5e402c1261c1860e4bda3db3da2c4919b45 (patch) | |
tree | a6c9de9bfc2b4b485e84e650ed752a721c12bc61 /include/linux/mfd | |
parent | e972e1b2e1ae60ec7ecef5e633e91ee95b0defa9 (diff) |
regulator: as3722 : SD0 init val based on boardid
Decide the PMIC version based on board id as
AMS PMIC rev id is not correct in silicon.
Add DT support also.
Bug 1425474
Change-Id: Ia51462980da582c958a26e156b48a1e5d655559f
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/347241
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/as3722-plat.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/as3722.h | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mfd/as3722-plat.h b/include/linux/mfd/as3722-plat.h index 9c6aa348d550..7a50838cbb3c 100644 --- a/include/linux/mfd/as3722-plat.h +++ b/include/linux/mfd/as3722-plat.h @@ -156,6 +156,8 @@ struct as3722_platform_data { struct as3722_adc_extcon_platform_data *extcon_pdata; int watchdog_timer_initial_period; int watchdog_timer_mode; + u32 major_rev; + u32 minor_rev; bool enable_clk32k_out; }; diff --git a/include/linux/mfd/as3722.h b/include/linux/mfd/as3722.h index dc7903069a65..ad51056522f4 100644 --- a/include/linux/mfd/as3722.h +++ b/include/linux/mfd/as3722.h @@ -405,6 +405,8 @@ struct as3722 { bool en_intern_int_pullup; bool en_intern_i2c_pullup; struct regmap_irq_chip_data *irq_data; + u32 major_rev; + u32 minor_rev; }; static inline int as3722_read(struct as3722 *as3722, u32 reg, u32 *dest) @@ -440,4 +442,14 @@ static inline int as3722_irq_get_virq(struct as3722 *as3722, int irq) return regmap_irq_get_virq(as3722->irq_data, irq); } +static inline bool as3722_device_rev(struct as3722 *as3722, u32 major_rev, + u32 minor_rev) +{ + + if ((as3722->major_rev == major_rev) && + (as3722->minor_rev == minor_rev)) + return true; + else + return false; +} #endif |