Lines Matching full:pwm
5 * Based on kernel drivers/regulator/pwm-regulator.c
13 #include <pwm.h>
19 /* pwm id corresponding to the PWM driver */
21 /* the period of one PWM cycle */
24 * the polarity of one PWM
29 struct udevice *pwm; member
44 return pwm_set_enable(priv->pwm, priv->pwm_id, enable); in pwm_regulator_enable()
72 ret = pwm_set_invert(priv->pwm, priv->pwm_id, priv->polarity); in pwm_regulator_set_voltage()
74 dev_err(dev, "Failed to init PWM\n"); in pwm_regulator_set_voltage()
78 ret = pwm_set_config(priv->pwm, priv->pwm_id, in pwm_regulator_set_voltage()
81 dev_err(dev, "Failed to configure PWM\n"); in pwm_regulator_set_voltage()
96 ret = dev_read_phandle_with_args(dev, "pwms", "#pwm-cells", 0, 0, &args); in pwm_regulator_ofdata_to_platdata()
98 debug("%s: Cannot get PWM phandle: ret=%d\n", __func__, ret); in pwm_regulator_ofdata_to_platdata()
107 printf("Cannot find regulator pwm init_voltage\n"); in pwm_regulator_ofdata_to_platdata()
111 ret = uclass_get_device_by_ofnode(UCLASS_PWM, args.node, &priv->pwm); in pwm_regulator_ofdata_to_platdata()
113 debug("%s: Cannot get PWM: ret=%d\n", __func__, ret); in pwm_regulator_ofdata_to_platdata()
145 { .compatible = "pwm-regulator" },