Lines Matching full:s2mps11

19 #include <linux/mfd/samsung/s2mps11.h>
38 * One bit for each S2MPS11/S2MPS13/S2MPS14/S2MPU02 regulator whether
73 struct s2mps11_info *s2mps11 = rdev_get_drvdata(rdev); in s2mps11_regulator_set_voltage_time_sel() local
80 ramp_delay = s2mps11->ramp_delay2; in s2mps11_regulator_set_voltage_time_sel()
84 ramp_delay = s2mps11->ramp_delay34; in s2mps11_regulator_set_voltage_time_sel()
87 ramp_delay = s2mps11->ramp_delay5; in s2mps11_regulator_set_voltage_time_sel()
91 ramp_delay = s2mps11->ramp_delay16; in s2mps11_regulator_set_voltage_time_sel()
96 ramp_delay = s2mps11->ramp_delay7810; in s2mps11_regulator_set_voltage_time_sel()
99 ramp_delay = s2mps11->ramp_delay9; in s2mps11_regulator_set_voltage_time_sel()
113 struct s2mps11_info *s2mps11 = rdev_get_drvdata(rdev); in s2mps11_set_ramp_delay() local
121 if (ramp_delay > s2mps11->ramp_delay16) in s2mps11_set_ramp_delay()
122 s2mps11->ramp_delay16 = ramp_delay; in s2mps11_set_ramp_delay()
124 ramp_delay = s2mps11->ramp_delay16; in s2mps11_set_ramp_delay()
135 s2mps11->ramp_delay2 = ramp_delay; in s2mps11_set_ramp_delay()
146 if (ramp_delay > s2mps11->ramp_delay34) in s2mps11_set_ramp_delay()
147 s2mps11->ramp_delay34 = ramp_delay; in s2mps11_set_ramp_delay()
149 ramp_delay = s2mps11->ramp_delay34; in s2mps11_set_ramp_delay()
161 if (ramp_delay > s2mps11->ramp_delay34) in s2mps11_set_ramp_delay()
162 s2mps11->ramp_delay34 = ramp_delay; in s2mps11_set_ramp_delay()
164 ramp_delay = s2mps11->ramp_delay34; in s2mps11_set_ramp_delay()
170 s2mps11->ramp_delay5 = ramp_delay; in s2mps11_set_ramp_delay()
180 if (ramp_delay > s2mps11->ramp_delay16) in s2mps11_set_ramp_delay()
181 s2mps11->ramp_delay16 = ramp_delay; in s2mps11_set_ramp_delay()
183 ramp_delay = s2mps11->ramp_delay16; in s2mps11_set_ramp_delay()
190 if (ramp_delay > s2mps11->ramp_delay7810) in s2mps11_set_ramp_delay()
191 s2mps11->ramp_delay7810 = ramp_delay; in s2mps11_set_ramp_delay()
193 ramp_delay = s2mps11->ramp_delay7810; in s2mps11_set_ramp_delay()
198 s2mps11->ramp_delay9 = ramp_delay; in s2mps11_set_ramp_delay()
231 struct s2mps11_info *s2mps11 = rdev_get_drvdata(rdev); in s2mps11_regulator_enable() local
235 switch (s2mps11->dev_type) { in s2mps11_regulator_enable()
237 if (test_bit(rdev_id, s2mps11->suspend_state)) in s2mps11_regulator_enable()
244 if (test_bit(rdev_id, s2mps11->suspend_state)) in s2mps11_regulator_enable()
246 else if (s2mps11->ext_control_gpiod[rdev_id]) in s2mps11_regulator_enable()
252 if (test_bit(rdev_id, s2mps11->suspend_state)) in s2mps11_regulator_enable()
269 struct s2mps11_info *s2mps11 = rdev_get_drvdata(rdev); in s2mps11_regulator_set_suspend_disable() local
273 switch (s2mps11->dev_type) { in s2mps11_regulator_set_suspend_disable()
318 set_bit(rdev_id, s2mps11->suspend_state); in s2mps11_regulator_set_suspend_disable()
827 static int s2mps14_pmic_enable_ext_control(struct s2mps11_info *s2mps11, in s2mps14_pmic_enable_ext_control() argument
835 struct of_regulator_match *rdata, struct s2mps11_info *s2mps11) in s2mps14_pmic_dt_parse_ext_control_gpio() argument
837 struct gpio_desc **gpio = s2mps11->ext_control_gpiod; in s2mps14_pmic_dt_parse_ext_control_gpio()
852 "s2mps11-regulator"); in s2mps14_pmic_dt_parse_ext_control_gpio()
868 struct of_regulator_match *rdata, struct s2mps11_info *s2mps11, in s2mps11_pmic_dt_parse() argument
880 if (s2mps11->dev_type == S2MPS14X) in s2mps11_pmic_dt_parse()
881 s2mps14_pmic_dt_parse_ext_control_gpio(pdev, rdata, s2mps11); in s2mps11_pmic_dt_parse()
1125 struct s2mps11_info *s2mps11; in s2mps11_pmic_probe() local
1130 s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info), in s2mps11_pmic_probe()
1132 if (!s2mps11) in s2mps11_pmic_probe()
1135 s2mps11->dev_type = platform_get_device_id(pdev)->driver_data; in s2mps11_pmic_probe()
1136 switch (s2mps11->dev_type) { in s2mps11_pmic_probe()
1164 s2mps11->dev_type); in s2mps11_pmic_probe()
1168 s2mps11->ext_control_gpiod = devm_kcalloc(&pdev->dev, rdev_num, in s2mps11_pmic_probe()
1169 sizeof(*s2mps11->ext_control_gpiod), GFP_KERNEL); in s2mps11_pmic_probe()
1170 if (!s2mps11->ext_control_gpiod) in s2mps11_pmic_probe()
1181 ret = s2mps11_pmic_dt_parse(pdev, rdata, s2mps11, rdev_num); in s2mps11_pmic_probe()
1185 platform_set_drvdata(pdev, s2mps11); in s2mps11_pmic_probe()
1189 config.driver_data = s2mps11; in s2mps11_pmic_probe()
1195 config.ena_gpiod = s2mps11->ext_control_gpiod[i]; in s2mps11_pmic_probe()
1211 ret = s2mps14_pmic_enable_ext_control(s2mps11, in s2mps11_pmic_probe()
1226 { "s2mps11-regulator", S2MPS11X},
1237 .name = "s2mps11-pmic",
1248 MODULE_DESCRIPTION("Samsung S2MPS11/S2MPS14/S2MPS15/S2MPU02 Regulator Driver");