<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/pwm/sysfs.c, branch v4.6.3</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>pwm: sysfs: Make use of the DEVICE_ATTR_[RW][WO] macro's</title>
<updated>2015-11-10T12:06:46+00:00</updated>
<author>
<name>Olliver Schinagl</name>
<email>oliver@schinagl.nl</email>
</author>
<published>2015-10-26T21:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=65cdc6914a959d8e1ea562f05fb323a0b8cb7cb1'/>
<id>65cdc6914a959d8e1ea562f05fb323a0b8cb7cb1</id>
<content type='text'>
For the npwm property the PWM sysfs interface already made use of the
DEVICE_ATTR_RO macro. This patch expands this to the other sysfs
properties so that the code base is concise and makes use of this
helpful macro.

This has the advantage of slightly reducing the code size, improving
readability and no longer using magic values for permissions.

Signed-off-by: Olliver Schinagl &lt;oliver@schinagl.nl&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the npwm property the PWM sysfs interface already made use of the
DEVICE_ATTR_RO macro. This patch expands this to the other sysfs
properties so that the code base is concise and makes use of this
helpful macro.

This has the advantage of slightly reducing the code size, improving
readability and no longer using magic values for permissions.

Signed-off-by: Olliver Schinagl &lt;oliver@schinagl.nl&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: sysfs: Remove unnecessary temporary variable</title>
<updated>2015-11-10T12:06:45+00:00</updated>
<author>
<name>Olliver Schinagl</name>
<email>oliver@schinagl.nl</email>
</author>
<published>2015-10-26T21:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=0344d0d69b3360ec551581c141c6599a0dcb5f27'/>
<id>0344d0d69b3360ec551581c141c6599a0dcb5f27</id>
<content type='text'>
Use the result of pwm_is_enabled() directly instead of storing it in a
temporary variable.

Signed-off-by: Olliver Schinagl &lt;oliver@schinagl.nl&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the result of pwm_is_enabled() directly instead of storing it in a
temporary variable.

Signed-off-by: Olliver Schinagl &lt;oliver@schinagl.nl&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: sysfs: Remove unnecessary padding</title>
<updated>2015-07-27T10:03:38+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2015-07-20T07:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=412820dd536fe2d01a35f0d68982ea225ec255b3'/>
<id>412820dd536fe2d01a35f0d68982ea225ec255b3</id>
<content type='text'>
Padding initializers so that assignment operators align is bound to lead
to inconsistencies or churn. Single spaces around the assignment is just
fine.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Padding initializers so that assignment operators align is bound to lead
to inconsistencies or churn. Single spaces around the assignment is just
fine.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: sysfs: Properly convert from enum to string</title>
<updated>2015-07-27T10:03:37+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2015-07-20T07:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=5a063d87e97df28ca0b00807bc4d6fa11c5a5107'/>
<id>5a063d87e97df28ca0b00807bc4d6fa11c5a5107</id>
<content type='text'>
The current code will check for polarity in a boolean way. While it is
correct that polarity is either normal or inversed, make it more obvious
that it's an enumeration by using a switch statement and explicit
matches on the enumeration values.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code will check for polarity in a boolean way. While it is
correct that polarity is either normal or inversed, make it more obvious
that it's an enumeration by using a switch statement and explicit
matches on the enumeration values.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Make use of pwm_get_xxx() helpers where appropriate</title>
<updated>2015-07-20T07:53:22+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2015-07-01T08:21:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=15da7b5001e498fa7dc619d4d7951f9665b071e4'/>
<id>15da7b5001e498fa7dc619d4d7951f9665b071e4</id>
<content type='text'>
Use the pwm_get_xxx() helpers instead of directly accessing the fields
in struct pwm_device. This will allow us to smoothly move to the atomic
update approach.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the pwm_get_xxx() helpers instead of directly accessing the fields
in struct pwm_device. This will allow us to smoothly move to the atomic
update approach.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Add the pwm_is_enabled() helper</title>
<updated>2015-07-20T07:46:06+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2015-07-01T08:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=5c31252c4a86dc591c23f1a951edd52ad791ef0e'/>
<id>5c31252c4a86dc591c23f1a951edd52ad791ef0e</id>
<content type='text'>
Some PWM drivers are testing the PWMF_ENABLED flag. Create a helper
function to hide the logic behind enabled test. This will allow us to
smoothly move from the current approach to an atomic PWM update
approach.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some PWM drivers are testing the PWMF_ENABLED flag. Create a helper
function to hide the logic behind enabled test. This will allow us to
smoothly move from the current approach to an atomic PWM update
approach.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: sysfs: Convert to use ATTRIBUTE_GROUPS macro</title>
<updated>2013-12-04T10:35:28+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-12-04T10:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6ca142ad0d1bdf8dd116351b7b9a2bc5670d5271'/>
<id>6ca142ad0d1bdf8dd116351b7b9a2bc5670d5271</id>
<content type='text'>
Use new ATTRIBUTE_GROUPS macro to reduce the number of lines of code.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use new ATTRIBUTE_GROUPS macro to reduce the number of lines of code.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: convert class code to use dev_groups</title>
<updated>2013-07-29T07:08:33+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-24T22:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9da01759636f519967c0922ae12bd9fff739db9a'/>
<id>9da01759636f519967c0922ae12bd9fff739db9a</id>
<content type='text'>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the PWM class code to use the
correct field.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the PWM class code to use the
correct field.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pwm: Add sysfs interface</title>
<updated>2013-06-21T09:32:51+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2013-06-11T17:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d'/>
<id>76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d</id>
<content type='text'>
Add a simple sysfs interface to the generic PWM framework.

  /sys/class/pwm/
  `-- pwmchipN/           for each PWM chip
      |-- export          (w/o) ask the kernel to export a PWM channel
      |-- npwm            (r/o) number of PWM channels in this PWM chip
      |-- pwmX/           for each exported PWM channel
      |   |-- duty_cycle  (r/w) duty cycle (in nanoseconds)
      |   |-- enable      (r/w) enable/disable PWM
      |   |-- period      (r/w) period (in nanoseconds)
      |   `-- polarity    (r/w) polarity of PWM (normal/inversed)
      `-- unexport        (w/o) return a PWM channel to the kernel

Based on work by Lars Poeschel.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Cc: Ryan Mallon &lt;rmallon@gmail.com&gt;
Cc: Rob Landley &lt;rob@landley.net&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a simple sysfs interface to the generic PWM framework.

  /sys/class/pwm/
  `-- pwmchipN/           for each PWM chip
      |-- export          (w/o) ask the kernel to export a PWM channel
      |-- npwm            (r/o) number of PWM channels in this PWM chip
      |-- pwmX/           for each exported PWM channel
      |   |-- duty_cycle  (r/w) duty cycle (in nanoseconds)
      |   |-- enable      (r/w) enable/disable PWM
      |   |-- period      (r/w) period (in nanoseconds)
      |   `-- polarity    (r/w) polarity of PWM (normal/inversed)
      `-- unexport        (w/o) return a PWM channel to the kernel

Based on work by Lars Poeschel.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Cc: Ryan Mallon &lt;rmallon@gmail.com&gt;
Cc: Rob Landley &lt;rob@landley.net&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
