of_pwm_get — request a PWM via the PWM framework
struct pwm_device * of_pwm_get ( | struct device_node * np, |
const char * con_id) ; |
Returns the PWM device parsed from the phandle and index specified in the “pwms” property of a device tree node or a negative error-code on failure. Values parsed from the device tree are stored in the returned PWM device object.
If con_id is NULL, the first PWM device listed in the “pwms” property will be requested. Otherwise the “pwm-names” property is used to do a reverse lookup of the PWM index. This also means that the “pwm-names” property becomes mandatory for devices that look up the PWM device via the con_id parameter.