<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pwm/sysfs.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-12-05T08:24:58+00:00</updated>
<entry>
<title>pwm: Set class for exported channels in sysfs</title>
<updated>2017-12-05T08:24:58+00:00</updated>
<author>
<name>Gottfried Haider</name>
<email>gottfried.haider@gmail.com</email>
</author>
<published>2017-09-26T11:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e5d1fd75c3dde9fc10c4472b9368089d1b81d00'/>
<id>urn:sha1:7e5d1fd75c3dde9fc10c4472b9368089d1b81d00</id>
<content type='text'>
Notifications for devices without bus or class set get dropped by
dev_uevent_filter(). Adding the class to the exported child matches
what the GPIO subsystem is doing.

With this change exporting a channel triggers a udev event, which
gives userspace a chance to fixup permissions and makes it possible
for non-root users to make use of the PWM subsystem.

Signed-off-by: Gottfried Haider &lt;gottfried.haider@gmail.com&gt;
CC: Thierry Reding &lt;thierry.reding@gmail.com&gt;
CC: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
CC: linux-pwm@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
CC: linux-rpi-kernel@lists.infradead.org
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Fix device reference leak</title>
<updated>2016-11-29T15:43:24+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2016-11-01T10:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e1614ac84f1719d87bed577963bb8140d0c9ce8'/>
<id>urn:sha1:0e1614ac84f1719d87bed577963bb8140d0c9ce8</id>
<content type='text'>
Make sure to drop the reference to the parent device taken by
class_find_device() after "unexporting" any children when deregistering
a PWM chip.

Fixes: 0733424c9ba9 ("pwm: Unexport children before chip removal")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Unexport children before chip removal</title>
<updated>2016-09-05T14:45:39+00:00</updated>
<author>
<name>David Hsu</name>
<email>davidhsu@google.com</email>
</author>
<published>2016-08-09T21:57:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0733424c9ba9f42242409d1ece780777272f7ea1'/>
<id>urn:sha1:0733424c9ba9f42242409d1ece780777272f7ea1</id>
<content type='text'>
Exported pwm channels aren't removed before the pwmchip and are
leaked. This results in invalid sysfs files. This fix removes
all exported pwm channels before chip removal.

Signed-off-by: David Hsu &lt;davidhsu@google.com&gt;
Fixes: 76abbdde2d95 ("pwm: Add sysfs interface")
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-4.8/capture' into for-next</title>
<updated>2016-07-25T14:23:39+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2016-07-25T14:23:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd2686122d3b45db1398776921bd47fedfd6d6a5'/>
<id>urn:sha1:bd2686122d3b45db1398776921bd47fedfd6d6a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pwm: sysfs: Add PWM capture support</title>
<updated>2016-06-10T14:01:40+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2016-06-08T09:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a366fe9153f445e950a7a344932b7419aa83094'/>
<id>urn:sha1:1a366fe9153f445e950a7a344932b7419aa83094</id>
<content type='text'>
Allow a user to read PWM capture results from sysfs. To start a capture
and read the result, simply read the file:

  $ cat $PWMCHIP/capture

The output format is "&lt;period&gt; &lt;duty cycle&gt;".

Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: sysfs: Get return value from pwm_apply_state()</title>
<updated>2016-06-10T12:24:40+00:00</updated>
<author>
<name>Ryo Kodama</name>
<email>ryo.kodama.vz@renesas.com</email>
</author>
<published>2016-06-08T01:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fe5aa34d6eb9c4d34071845f70f3714b41c8a77d'/>
<id>urn:sha1:fe5aa34d6eb9c4d34071845f70f3714b41c8a77d</id>
<content type='text'>
This patch adds to check the return value from pwm_apply_state()
used in enable_store(). The error of enable_store() doesn't work
if the return value doesn't received.

Signed-off-by: Ryo Kodama &lt;ryo.kodama.vz@renesas.com&gt;
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Fixes: 39100ceea79f ("pwm: Switch to the atomic API")
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Switch to the atomic API</title>
<updated>2016-05-17T12:48:04+00:00</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2016-04-14T19:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39100ceea79ff2efeb2fb094baf120c73d5ccf47'/>
<id>urn:sha1:39100ceea79ff2efeb2fb094baf120c73d5ccf47</id>
<content type='text'>
Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls
by pwm_get/apply_state().

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Get rid of pwm-&gt;lock</title>
<updated>2016-05-17T12:44:59+00:00</updated>
<author>
<name>Boris BREZILLON</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2016-03-30T20:03:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=459a25afe97cb3d7f978b90c881f4d7aac8fb755'/>
<id>urn:sha1:459a25afe97cb3d7f978b90c881f4d7aac8fb755</id>
<content type='text'>
PWM devices are not protected against concurrent accesses. The lock in
struct pwm_device might let PWM users think it is, but it's actually
only protecting the enabled state.

Removing this lock should be fine as long as all PWM users are aware
that accesses to the PWM device have to be serialized, which seems to be
the case for all of them except the sysfs interface. Patch the sysfs
code by adding a lock to the pwm_export struct and making sure it's
taken for all relevant accesses to the exported PWM device.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<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.radix-linux.su/kernel/linux.git/commit/?id=65cdc6914a959d8e1ea562f05fb323a0b8cb7cb1'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=0344d0d69b3360ec551581c141c6599a0dcb5f27'/>
<id>urn:sha1: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>
</entry>
</feed>
