Lines Matching refs:dev_pdata

31 	struct gpio_regulator_plat *dev_pdata;  in gpio_regulator_of_to_plat()  local
36 dev_pdata = dev_get_plat(dev); in gpio_regulator_of_to_plat()
51 gpio = &dev_pdata->gpio; in gpio_regulator_of_to_plat()
72 dev_pdata->voltages[j] = states_array[i]; in gpio_regulator_of_to_plat()
73 dev_pdata->states[j] = states_array[i + 1]; in gpio_regulator_of_to_plat()
77 return regulator_common_of_to_plat(dev, &dev_pdata->common, "enable-gpios"); in gpio_regulator_of_to_plat()
83 struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev); in gpio_regulator_get_value() local
86 if (!dev_pdata->gpio.dev) in gpio_regulator_get_value()
95 enable = dm_gpio_get_value(&dev_pdata->gpio); in gpio_regulator_get_value()
96 if (enable == dev_pdata->states[0]) in gpio_regulator_get_value()
97 return dev_pdata->voltages[0]; in gpio_regulator_get_value()
99 return dev_pdata->voltages[1]; in gpio_regulator_get_value()
104 struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev); in gpio_regulator_set_value() local
108 if (!dev_pdata->gpio.dev) in gpio_regulator_set_value()
111 if (uV == dev_pdata->voltages[0]) in gpio_regulator_set_value()
112 enable = dev_pdata->states[0]; in gpio_regulator_set_value()
113 else if (uV == dev_pdata->voltages[1]) in gpio_regulator_set_value()
114 enable = dev_pdata->states[1]; in gpio_regulator_set_value()
118 ret = dm_gpio_set_value(&dev_pdata->gpio, enable); in gpio_regulator_set_value()
130 struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev); in gpio_regulator_get_enable() local
131 return regulator_common_get_enable(dev, &dev_pdata->common); in gpio_regulator_get_enable()
136 struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev); in gpio_regulator_set_enable() local
137 return regulator_common_set_enable(dev, &dev_pdata->common, enable); in gpio_regulator_set_enable()