'\" t .\" Title: 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 "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" pwm_get \- look up and request a PWM device .SH "SYNOPSIS" .HP \w'struct\ pwm_device\ *\ pwm_get('u .BI "struct pwm_device * pwm_get(struct\ device\ *\ " "dev" ", const\ char\ *\ " "con_id" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 device for PWM consumer .RE .PP \fIcon_id\fR .RS 4 consumer name .RE .SH "DESCRIPTION" .PP Lookup is first attempted using DT\&. If the device was not instantiated from a device tree, a PWM chip and a relative index is looked up via a table supplied by board setup code (see \fBpwm_add_table\fR)\&. .PP Once a PWM chip has been found the specified PWM device will be requested and is ready to be used\&. .SH "RETURN" .PP A pointer to the requested PWM device or an \fBERR_PTR\fR\-encoded error code on failure\&. .SH "COPYRIGHT" .br