1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct pwm_device</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-enum-pwm-polarity.html" title="enum pwm_polarity"><link rel="next" href="API-struct-pwm-ops.html" title="struct pwm_ops"></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_device</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-enum-pwm-polarity.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-struct-pwm-ops.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-pwm-device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct pwm_device — 2 PWM channel object 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct pwm_device { 5 const char * label; 6 unsigned long flags; 7 unsigned int hwpwm; 8 unsigned int pwm; 9 struct pwm_chip * chip; 10 void * chip_data; 11 struct mutex lock; 12 unsigned int period; 13 unsigned int duty_cycle; 14 enum pwm_polarity polarity; 15}; </pre></div><div class="refsect1"><a name="id-1.15.7.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">label</span></dt><dd><p> 16 name of the PWM device 17 </p></dd><dt><span class="term">flags</span></dt><dd><p> 18 flags associated with the PWM device 19 </p></dd><dt><span class="term">hwpwm</span></dt><dd><p> 20 per-chip relative index of the PWM device 21 </p></dd><dt><span class="term">pwm</span></dt><dd><p> 22 global index of the PWM device 23 </p></dd><dt><span class="term">chip</span></dt><dd><p> 24 PWM chip providing this PWM device 25 </p></dd><dt><span class="term">chip_data</span></dt><dd><p> 26 chip-private data associated with the PWM device 27 </p></dd><dt><span class="term">lock</span></dt><dd><p> 28 used to serialize accesses to the PWM device where necessary 29 </p></dd><dt><span class="term">period</span></dt><dd><p> 30 period of the PWM signal (in nanoseconds) 31 </p></dd><dt><span class="term">duty_cycle</span></dt><dd><p> 32 duty cycle of the PWM signal (in nanoseconds) 33 </p></dd><dt><span class="term">polarity</span></dt><dd><p> 34 polarity of the PWM signal 35 </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-enum-pwm-polarity.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-struct-pwm-ops.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">enum pwm_polarity</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">struct pwm_ops</span></td></tr></table></div></body></html> 36