'\" t .\" Title: of_pwm_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Pulse-Width Modulation (PWM) .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "OF_PWM_GET" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Pulse-Width Modulation (PWM)" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" of_pwm_get \- request a PWM via the PWM framework .SH "SYNOPSIS" .HP \w'struct\ pwm_device\ *\ of_pwm_get('u .BI "struct pwm_device * of_pwm_get(struct\ device_node\ *\ " "np" ", const\ char\ *\ " "con_id" ");" .SH "ARGUMENTS" .PP \fInp\fR .RS 4 device node to get the PWM from .RE .PP \fIcon_id\fR .RS 4 consumer name .RE .SH "DESCRIPTION" .PP Returns the PWM device parsed from the phandle and index specified in the \(lqpwms\(rq 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\&. .PP If con_id is NULL, the first PWM device listed in the \(lqpwms\(rq property will be requested\&. Otherwise the \(lqpwm\-names\(rq property is used to do a reverse lookup of the PWM index\&. This also means that the \(lqpwm\-names\(rq property becomes mandatory for devices that look up the PWM device via the con_id parameter\&. .SH "RETURN" .PP A pointer to the requested PWM device or an \fBERR_PTR\fR\-encoded error code on failure\&. .SH "COPYRIGHT" .br