Lines Matching +full:enable +full:- +full:active +full:- +full:discharge

65 	struct tps65132_reg_pdata *rpdata = &tps->reg_pdata[id];  in tps65132_regulator_enable()
68 if (!IS_ERR(rpdata->en_gpiod)) { in tps65132_regulator_enable()
69 gpiod_set_value_cansleep(rpdata->en_gpiod, 1); in tps65132_regulator_enable()
70 rpdata->ena_gpio_state = 1; in tps65132_regulator_enable()
73 /* Hardware automatically enable discharge bit in enable */ in tps65132_regulator_enable()
74 if (rdev->constraints->active_discharge == in tps65132_regulator_enable()
78 dev_err(tps->dev, "Failed to disable active discharge: %d\n", in tps65132_regulator_enable()
91 struct tps65132_reg_pdata *rpdata = &tps->reg_pdata[id]; in tps65132_regulator_disable()
93 if (!IS_ERR(rpdata->en_gpiod)) { in tps65132_regulator_disable()
94 gpiod_set_value_cansleep(rpdata->en_gpiod, 0); in tps65132_regulator_disable()
95 rpdata->ena_gpio_state = 0; in tps65132_regulator_disable()
98 if (!IS_ERR(rpdata->act_dis_gpiod)) { in tps65132_regulator_disable()
99 gpiod_set_value_cansleep(rpdata->act_dis_gpiod, 1); in tps65132_regulator_disable()
100 usleep_range(rpdata->act_dis_time_us, rpdata->act_dis_time_us + in tps65132_regulator_disable()
102 gpiod_set_value_cansleep(rpdata->act_dis_gpiod, 0); in tps65132_regulator_disable()
112 struct tps65132_reg_pdata *rpdata = &tps->reg_pdata[id]; in tps65132_regulator_is_enabled()
114 if (!IS_ERR(rpdata->en_gpiod)) in tps65132_regulator_is_enabled()
115 return rpdata->ena_gpio_state; in tps65132_regulator_is_enabled()
121 .enable = tps65132_regulator_enable,
135 struct tps65132_regulator *tps = config->driver_data; in tps65132_of_parse_cb()
136 struct tps65132_reg_pdata *rpdata = &tps->reg_pdata[desc->id]; in tps65132_of_parse_cb()
139 rpdata->en_gpiod = devm_fwnode_gpiod_get(tps->dev, of_fwnode_handle(np), in tps65132_of_parse_cb()
140 "enable", GPIOD_ASIS, in tps65132_of_parse_cb()
141 "enable"); in tps65132_of_parse_cb()
142 if (IS_ERR(rpdata->en_gpiod)) { in tps65132_of_parse_cb()
143 ret = PTR_ERR(rpdata->en_gpiod); in tps65132_of_parse_cb()
146 if (ret == -EPROBE_DEFER) in tps65132_of_parse_cb()
151 rpdata->act_dis_gpiod = devm_fwnode_gpiod_get(tps->dev, in tps65132_of_parse_cb()
153 "active-discharge", in tps65132_of_parse_cb()
155 "active-discharge"); in tps65132_of_parse_cb()
156 if (IS_ERR(rpdata->act_dis_gpiod)) { in tps65132_of_parse_cb()
157 ret = PTR_ERR(rpdata->act_dis_gpiod); in tps65132_of_parse_cb()
160 if (ret == -EPROBE_DEFER) in tps65132_of_parse_cb()
166 ret = of_property_read_u32(np, "ti,active-discharge-time-us", in tps65132_of_parse_cb()
167 &rpdata->act_dis_time_us); in tps65132_of_parse_cb()
169 dev_err(tps->dev, "Failed to read active discharge time:%d\n", in tps65132_of_parse_cb()
179 .name = "tps65132-"#_name, \
206 TPS65132_REG_CONTROL - 1),
225 struct device *dev = &client->dev; in tps65132_probe()
235 return -ENOMEM; in tps65132_probe()
245 tps->dev = dev; in tps65132_probe()