OF_PWM_GET(9) | Pulse-Width Modulation (PWM) | OF_PWM_GET(9) |
NAME¶
of_pwm_get - request a PWM via the PWM framework
SYNOPSIS¶
struct pwm_device * of_pwm_get(struct device_node * np, const char * con_id);
ARGUMENTS¶
np
con_id
DESCRIPTION¶
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.
RETURN¶
A pointer to the requested PWM device or an ERR_PTR-encoded error code on failure.
COPYRIGHT¶
January 2017 | Kernel Hackers Manual 4.8. |