Lines Matching refs:dev_pdata
25 struct fixed_regulator_platdata *dev_pdata; in fixed_regulator_ofdata_to_platdata() local
30 dev_pdata = dev_get_platdata(dev); in fixed_regulator_ofdata_to_platdata()
42 gpio = &dev_pdata->gpio; in fixed_regulator_ofdata_to_platdata()
52 dev_pdata->startup_delay_us = dev_read_u32_default(dev, in fixed_regulator_ofdata_to_platdata()
54 dev_pdata->off_on_delay_us = in fixed_regulator_ofdata_to_platdata()
94 struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev); in fixed_regulator_get_enable() local
97 if (!dev_pdata->gpio.dev) in fixed_regulator_get_enable()
100 return dm_gpio_get_value(&dev_pdata->gpio); in fixed_regulator_get_enable()
105 struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev); in fixed_regulator_set_enable() local
109 dev->name, enable, dev_pdata->startup_delay_us, in fixed_regulator_set_enable()
110 dm_gpio_is_valid(&dev_pdata->gpio)); in fixed_regulator_set_enable()
112 if (!dm_gpio_is_valid(&dev_pdata->gpio)) { in fixed_regulator_set_enable()
118 ret = dm_gpio_set_value(&dev_pdata->gpio, enable); in fixed_regulator_set_enable()
125 if (enable && dev_pdata->startup_delay_us) in fixed_regulator_set_enable()
126 udelay(dev_pdata->startup_delay_us); in fixed_regulator_set_enable()
129 if (!enable && dev_pdata->off_on_delay_us) in fixed_regulator_set_enable()
130 udelay(dev_pdata->off_on_delay_us); in fixed_regulator_set_enable()