Lines Matching +full:enable +full:- +full:active +full:- +full:discharge
1 // SPDX-License-Identifier: GPL-2.0
50 struct aw37503_reg_pdata *rpdata = &chip->reg_pdata[id]; in aw37503_regulator_enable()
53 if (!IS_ERR(rpdata->en_gpiod)) { in aw37503_regulator_enable()
54 gpiod_set_value_cansleep(rpdata->en_gpiod, 1); in aw37503_regulator_enable()
55 rpdata->ena_gpio_state = 1; in aw37503_regulator_enable()
58 /* Hardware automatically enable discharge bit in enable */ in aw37503_regulator_enable()
59 if (rdev->constraints->active_discharge == in aw37503_regulator_enable()
63 dev_err(chip->dev, "Failed to disable active discharge: %d\n", in aw37503_regulator_enable()
76 struct aw37503_reg_pdata *rpdata = &chip->reg_pdata[id]; in aw37503_regulator_disable()
78 if (!IS_ERR(rpdata->en_gpiod)) { in aw37503_regulator_disable()
79 gpiod_set_value_cansleep(rpdata->en_gpiod, 0); in aw37503_regulator_disable()
80 rpdata->ena_gpio_state = 0; in aw37503_regulator_disable()
90 struct aw37503_reg_pdata *rpdata = &chip->reg_pdata[id]; in aw37503_regulator_is_enabled()
92 if (!IS_ERR(rpdata->en_gpiod)) in aw37503_regulator_is_enabled()
93 return rpdata->ena_gpio_state; in aw37503_regulator_is_enabled()
99 .enable = aw37503_regulator_enable,
113 struct aw37503_regulator *chip = config->driver_data; in aw37503_of_parse_cb()
114 struct aw37503_reg_pdata *rpdata = &chip->reg_pdata[desc->id]; in aw37503_of_parse_cb()
117 rpdata->en_gpiod = devm_fwnode_gpiod_get(chip->dev, of_fwnode_handle(np), in aw37503_of_parse_cb()
118 "enable", GPIOD_OUT_LOW, in aw37503_of_parse_cb()
119 "enable"); in aw37503_of_parse_cb()
121 if (IS_ERR(rpdata->en_gpiod)) { in aw37503_of_parse_cb()
122 ret = PTR_ERR(rpdata->en_gpiod); in aw37503_of_parse_cb()
125 if (ret == -EPROBE_DEFER) in aw37503_of_parse_cb()
135 .name = "aw37503-"#_name, \
162 AW37503_REG_WPRTEN - 1),
180 struct device *dev = &client->dev; in aw37503_probe()
189 return -ENOMEM; in aw37503_probe()
197 chip->dev = dev; in aw37503_probe()