'\" t .\" Title: devm_clk_get .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Clock Framework .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "DEVM_CLK_GET" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Clock Framework" .\" ----------------------------------------------------------------- .\" * 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" devm_clk_get \- lookup and obtain a managed reference to a clock producer\&. .SH "SYNOPSIS" .HP \w'struct\ clk\ *\ devm_clk_get('u .BI "struct clk * devm_clk_get(struct\ device\ *\ " "dev" ", const\ char\ *\ " "id" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 device for clock \(lqconsumer\(rq .RE .PP \fIid\fR .RS 4 clock consumer ID .RE .SH "DESCRIPTION" .PP Returns a struct clk corresponding to the clock producer, or valid \fBIS_ERR\fR condition containing errno\&. The implementation uses \fIdev\fR and \fIid\fR to determine the clock consumer, and thereby the clock producer\&. (IOW, \fIid\fR may be identical strings, but clk_get may return different clock producers depending on \fIdev\fR\&.) .PP Drivers must assume that the clock source is not enabled\&. .PP devm_clk_get should not be called from within interrupt context\&. .PP The clock will automatically be freed when the device is unbound from the bus\&. .SH "COPYRIGHT" .br