diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2011-01-04 00:17:39 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-14 06:38:16 -0500 |
commit | 337ce5d1c5759644cea6c47220ce7e84f0398362 (patch) | |
tree | 0436dbc242425226202476d6181fa6ae89e3a206 /include/linux/mfd/max8998.h | |
parent | de8255ccd219267cfd34139022b197c1ef8f032f (diff) |
mfd: Support LP3974 RTC
The first releases of LP3974 have a large delay in RTC registers,
which requires 2 seconds of delay after writing to a rtc register
(recommended by National Semiconductor's engineers)
before reading it.
If "rtc_delay" field of the platform data is true, the rtc driver
assumes that such delays are required. Although we have not seen
LP3974s without requiring such delays, we assume that such LP3974s
will be released soon (or they have done so already) and they are
supported by "lp3974" without setting "rtc_delay" at the platform
data.
This patch adds delays with msleep when writing values to RTC registers
if the platform data has rtc_delay set.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/max8998.h')
-rw-r--r-- | include/linux/mfd/max8998.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h index 686a744e63fb..c22b9a417c35 100644 --- a/include/linux/mfd/max8998.h +++ b/include/linux/mfd/max8998.h | |||
@@ -76,6 +76,9 @@ struct max8998_regulator_data { | |||
76 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage | 76 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage |
77 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage | 77 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage |
78 | * @buck2_set3: BUCK2 gpio pin to set output voltage | 78 | * @buck2_set3: BUCK2 gpio pin to set output voltage |
79 | * @wakeup: Allow to wake up from suspend | ||
80 | * @rtc_delay: LP3974 RTC chip bug that requires delay after a register | ||
81 | * write before reading it. | ||
79 | */ | 82 | */ |
80 | struct max8998_platform_data { | 83 | struct max8998_platform_data { |
81 | struct max8998_regulator_data *regulators; | 84 | struct max8998_regulator_data *regulators; |
@@ -89,6 +92,7 @@ struct max8998_platform_data { | |||
89 | int buck1_set2; | 92 | int buck1_set2; |
90 | int buck2_set3; | 93 | int buck2_set3; |
91 | bool wakeup; | 94 | bool wakeup; |
95 | bool rtc_delay; | ||
92 | }; | 96 | }; |
93 | 97 | ||
94 | #endif /* __LINUX_MFD_MAX8998_H */ | 98 | #endif /* __LINUX_MFD_MAX8998_H */ |