Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Add s5m regulator operation mode

This patch add variables for opmode of s5m series.
S5M series have 4 operation modes.
Off mode is always regulator off mode.
On mode is always regulator on mode.
Lowpower mode is that regualtor operate in low-power.
Suspend mode is that regulator operation depends on AP suspend mode.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Sangbeom Kim and committed by
Mark Brown
62fe8cd5 dd775ae2

+30
+1
include/linux/mfd/s5m87xx/s5m-core.h
··· 335 335 336 336 struct s5m_platform_data { 337 337 struct s5m_regulator_data *regulators; 338 + struct s5m_opmode_data *opmode; 338 339 int device_type; 339 340 int num_regulators; 340 341
+29
include/linux/mfd/s5m87xx/s5m-pmic.h
··· 58 58 S5M8767_REG_MAX, 59 59 }; 60 60 61 + #define S5M8767_ENCTRL_SHIFT 6 62 + 61 63 /* S5M8763 regulator ids */ 62 64 enum s5m8763_regulators { 63 65 S5M8763_LDO1, ··· 97 95 struct s5m_regulator_data { 98 96 int id; 99 97 struct regulator_init_data *initdata; 98 + }; 99 + 100 + /* 101 + * s5m_opmode_data - regulator operation mode data 102 + * @id: regulator id 103 + * @mode: regulator operation mode 104 + */ 105 + struct s5m_opmode_data { 106 + int id; 107 + int mode; 108 + }; 109 + 110 + /* 111 + * s5m regulator operation mode 112 + * S5M_OPMODE_OFF Regulator always OFF 113 + * S5M_OPMODE_ON Regulator always ON 114 + * S5M_OPMODE_LOWPOWER Regulator is on in low-power mode 115 + * S5M_OPMODE_SUSPEND Regulator is changed by PWREN pin 116 + * If PWREN is high, regulator is on 117 + * If PWREN is low, regulator is off 118 + */ 119 + 120 + enum s5m_opmode { 121 + S5M_OPMODE_OFF, 122 + S5M_OPMODE_ON, 123 + S5M_OPMODE_LOWPOWER, 124 + S5M_OPMODE_SUSPEND, 100 125 }; 101 126 102 127 #endif /* __LINUX_MFD_S5M_PMIC_H */