1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct pwm_chip</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="pwm.html" title="Chapter 13. Pulse-Width Modulation (PWM)"><link rel="prev" href="API-struct-pwm-ops.html" title="struct pwm_ops"><link rel="next" href="API-pwm-set-chip-data.html" title="pwm_set_chip_data"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct pwm_chip</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-pwm-ops.html">Prev</a> </td><th width="60%" align="center">Chapter 13. Pulse-Width Modulation (PWM)</th><td width="20%" align="right"> <a accesskey="n" href="API-pwm-set-chip-data.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-pwm-chip"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct pwm_chip — 
2     abstract a PWM controller
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct pwm_chip {
5  struct device * dev;
6  struct list_head list;
7  const struct pwm_ops * ops;
8  int base;
9  unsigned int npwm;
10  struct pwm_device * pwms;
11  struct pwm_device * (* of_xlate) (struct pwm_chip *pc,const struct of_phandle_args *args);
12  unsigned int of_pwm_n_cells;
13  bool can_sleep;
14};  </pre></div><div class="refsect1"><a name="id-1.15.9.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">dev</span></dt><dd><p>
15   device providing the PWMs
16      </p></dd><dt><span class="term">list</span></dt><dd><p>
17   list node for internal use
18      </p></dd><dt><span class="term">ops</span></dt><dd><p>
19   callbacks for this PWM controller
20      </p></dd><dt><span class="term">base</span></dt><dd><p>
21   number of first PWM controlled by this chip
22      </p></dd><dt><span class="term">npwm</span></dt><dd><p>
23   number of PWMs controlled by this chip
24      </p></dd><dt><span class="term">pwms</span></dt><dd><p>
25   array of PWM devices allocated by the framework
26      </p></dd><dt><span class="term">of_xlate</span></dt><dd><p>
27   request a PWM device given a device tree PWM specifier
28      </p></dd><dt><span class="term">of_pwm_n_cells</span></dt><dd><p>
29   number of cells expected in the device tree PWM specifier
30      </p></dd><dt><span class="term">can_sleep</span></dt><dd><p>
31   must be true if the .<code class="function">config</code>, .<code class="function">enable</code> or .<code class="function">disable</code>
32   operations may sleep
33      </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-pwm-ops.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pwm.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-pwm-set-chip-data.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct pwm_ops</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">pwm_set_chip_data</span></td></tr></table></div></body></html>
34