Lines Matching refs:dev_pdata
29 struct gpio_regulator_platdata *dev_pdata; in gpio_regulator_ofdata_to_platdata() local
36 dev_pdata = dev_get_platdata(dev); in gpio_regulator_ofdata_to_platdata()
51 gpio = &dev_pdata->gpio; in gpio_regulator_ofdata_to_platdata()
63 dev_pdata->voltages[j] = states_array[i]; in gpio_regulator_ofdata_to_platdata()
64 dev_pdata->states[j] = states_array[i + 1]; in gpio_regulator_ofdata_to_platdata()
74 struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev); in gpio_regulator_get_value() local
77 if (!dev_pdata->gpio.dev) in gpio_regulator_get_value()
86 enable = dm_gpio_get_value(&dev_pdata->gpio); in gpio_regulator_get_value()
87 if (enable == dev_pdata->states[0]) in gpio_regulator_get_value()
88 return dev_pdata->voltages[0]; in gpio_regulator_get_value()
90 return dev_pdata->voltages[1]; in gpio_regulator_get_value()
95 struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev); in gpio_regulator_set_value() local
99 if (!dev_pdata->gpio.dev) in gpio_regulator_set_value()
102 if (uV == dev_pdata->voltages[0]) in gpio_regulator_set_value()
103 enable = dev_pdata->states[0]; in gpio_regulator_set_value()
104 else if (uV == dev_pdata->voltages[1]) in gpio_regulator_set_value()
105 enable = dev_pdata->states[1]; in gpio_regulator_set_value()
109 ret = dm_gpio_set_value(&dev_pdata->gpio, enable); in gpio_regulator_set_value()