Lines Matching refs:dev_pdata
16 struct regulator_common_plat *dev_pdata, in regulator_common_of_to_plat() argument
29 gpio = &dev_pdata->gpio; in regulator_common_of_to_plat()
39 dev_pdata->startup_delay_us = dev_read_u32_default(dev, in regulator_common_of_to_plat()
41 dev_pdata->off_on_delay_us = in regulator_common_of_to_plat()
43 if (!dev_pdata->off_on_delay_us) { in regulator_common_of_to_plat()
44 dev_pdata->off_on_delay_us = in regulator_common_of_to_plat()
52 struct regulator_common_plat *dev_pdata) in regulator_common_get_enable() argument
55 if (!dev_pdata->gpio.dev) in regulator_common_get_enable()
58 return dm_gpio_get_value(&dev_pdata->gpio); in regulator_common_get_enable()
62 struct regulator_common_plat *dev_pdata, bool enable) in regulator_common_set_enable() argument
67 dev->name, enable, dev_pdata->startup_delay_us, in regulator_common_set_enable()
68 dm_gpio_is_valid(&dev_pdata->gpio)); in regulator_common_set_enable()
70 if (!dm_gpio_is_valid(&dev_pdata->gpio)) { in regulator_common_set_enable()
76 ret = dm_gpio_set_value(&dev_pdata->gpio, enable); in regulator_common_set_enable()
83 if (enable && dev_pdata->startup_delay_us) in regulator_common_set_enable()
84 udelay(dev_pdata->startup_delay_us); in regulator_common_set_enable()
87 if (!enable && dev_pdata->off_on_delay_us) in regulator_common_set_enable()
88 udelay(dev_pdata->off_on_delay_us); in regulator_common_set_enable()