<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pwm/core.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-04-18T05:55:45Z</updated>
<entry>
<title>pwm: Unexport children before chip removal</title>
<updated>2017-04-18T05:55:45Z</updated>
<author>
<name>David Hsu</name>
</author>
<published>2016-08-09T21:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=645545fee15cbab94ebf020278b9426620c2fe2e'/>
<id>urn:sha1:645545fee15cbab94ebf020278b9426620c2fe2e</id>
<content type='text'>
commit 0733424c9ba9f42242409d1ece780777272f7ea1 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pwm: Fix uninitialized warnings in pwm_get()</title>
<updated>2014-08-29T08:18:19Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2014-08-28T09:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70145f87139fbc43b726f873813cd91dce371899'/>
<id>urn:sha1:70145f87139fbc43b726f873813cd91dce371899</id>
<content type='text'>
With some versions of gcc (e.g. 4.1.2):

drivers/pwm/core.c: In function ‘pwm_get’:
drivers/pwm/core.c:610: warning: ‘polarity’ may be used uninitialized in this function
drivers/pwm/core.c:609: warning: ‘period’ may be used uninitialized in this function

While these are false positives, we can get rid of them by refactoring
the code to store a pointer to the best match, as suggested before by
Thierry Reding. This does require moving the mutex_unlock() down.

Fixes: d717ea73e36dd565 ("pwm: Fix period and polarity in pwm_get() for non-perfect matches")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Fix possible ZERO_SIZE_PTR pointer dereferencing error.</title>
<updated>2014-08-25T12:38:12Z</updated>
<author>
<name>Xiubo Li</name>
</author>
<published>2014-08-18T09:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=533acc0e8df7d6553f11cf91c177211cb6037968'/>
<id>urn:sha1:533acc0e8df7d6553f11cf91c177211cb6037968</id>
<content type='text'>
Since we cannot make sure the 'chip-&gt;npwm' will always be none zero here,
and then if either equal to zero, the kzalloc() will return ZERO_SIZE_PTR,
which equals to ((void *)16).

So this patch fix this with just doing the zero check before calling kzalloc().

Signed-off-by: Xiubo Li &lt;Li.Xiubo@freescale.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Fix period and polarity in pwm_get() for non-perfect matches</title>
<updated>2014-08-18T08:58:43Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2014-08-13T15:18:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d717ea73e36dd5659640fae82605ad85c4117f4d'/>
<id>urn:sha1:d717ea73e36dd5659640fae82605ad85c4117f4d</id>
<content type='text'>
If pwm_get() finds a look-up entry with a perfect match (both dev_id and
con_id match), the loop is aborted, and "p" still points to the correct
struct pwm_lookup.

If only an entry with a matching dev_id or con_id is found, the loop
terminates after traversing the whole list, and "p" now points to
arbitrary memory, not part of the pwm_lookup list.
Then pwm_set_period() and pwm_set_polarity() will set random values for
period resp. polarity.

To fix this, save period and polarity when finding a new best match,
just like is done for chip (for the provider) and index.

This fixes the LCD backlight on r8a7740/armadillo-legacy, which was fed
period 0 and polarity -1068821144 instead of 33333 resp. 1.

Fixes: 3796ce1d4d4b ("pwm: add period and polarity to struct pwm_lookup")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: add period and polarity to struct pwm_lookup</title>
<updated>2014-05-21T07:03:07Z</updated>
<author>
<name>Alexandre Belloni</name>
</author>
<published>2014-05-19T20:42:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3796ce1d4d4b330a75005c5eda105603ce9d4071'/>
<id>urn:sha1:3796ce1d4d4b330a75005c5eda105603ce9d4071</id>
<content type='text'>
Add period and polarity members to struct pwm_lookup so that platforms
using the lookup table can be treated the same way as those using the
device tree.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: use seq_puts() instead of seq_printf()</title>
<updated>2013-12-20T09:53:41Z</updated>
<author>
<name>Jingoo Han</name>
</author>
<published>2013-12-19T04:31:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adcba1e3a5d97d93f2277bcf38ae1eb2c91fc840'/>
<id>urn:sha1:adcba1e3a5d97d93f2277bcf38ae1eb2c91fc840</id>
<content type='text'>
For a constant format without additional arguments, use seq_puts()
instead of seq_printf(). Also, the following checkpatch warning is
fixed.

  WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Use the DT macro directly when parsing PWM DT flags</title>
<updated>2013-09-03T11:08:10Z</updated>
<author>
<name>Laurent Pinchart</name>
</author>
<published>2013-07-17T22:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=208be7698fe39d54242348aef375fd86180c4506'/>
<id>urn:sha1:208be7698fe39d54242348aef375fd86180c4506</id>
<content type='text'>
Don't redefine a PWM_SPEC_POLARITY macro with a value identical to
PWM_POLARITY_INVERTED, use the PWM DT macro directly.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Add sysfs interface</title>
<updated>2013-06-21T09:32:51Z</updated>
<author>
<name>H Hartley Sweeten</name>
</author>
<published>2013-06-11T17:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>pwm: devm: alloc correct pointer size</title>
<updated>2013-06-10T10:50:10Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2013-06-03T20:27:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77f0b9d2ff0c8ff7b36033dfc5b29dab7a0ebd9a'/>
<id>urn:sha1:77f0b9d2ff0c8ff7b36033dfc5b29dab7a0ebd9a</id>
<content type='text'>
The allocated object should be the size of what the pointer is pointing
to and not the size of the pointer itself.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-3.9-rc1' of git://gitorious.org/linux-pwm/linux-pwm</title>
<updated>2013-02-26T17:34:29Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-02-26T17:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3eb05225ee8efb81fe50558f5f9d94e7477ade8f'/>
<id>urn:sha1:3eb05225ee8efb81fe50558f5f9d94e7477ade8f</id>
<content type='text'>
Pull PWM changes from Thierry Reding:
 "A new driver has been added to support the PWM mode of the timer
  counter blocks found on Atmel AT91 SoCs.  The VT8500 driver now
  supports changing the PWM signal polarity and the TI drivers (EHRPWM
  and ECAP) gained suspend and resume functionality.

  User drivers can now query the core for whether access to a PWM device
  will sleep (if the PWM chip is on a slow bus such as I2C or SPI).

  The pwm-backlight driver now handles the backlight BL_CORE_FBBLANK
  state in addition to the FB layer's blanking states.

  To round things off, a few fixes and cleanups are also included"

* tag 'for-3.9-rc1' of git://gitorious.org/linux-pwm/linux-pwm:
  pwm: twl: Use to_twl() instead of container_of()
  pwm: tegra: assume CONFIG_OF
  pwm_backlight: Validate dft_brightness in main probe function
  pwm: Export pwm_{set,get}_chip_data()
  pwm: Make Kconfig entries more consistent
  pwm: Add can_sleep property to drivers
  pwm: Add pwm_can_sleep() as exported API to users
  pwm-backlight: handle BL_CORE_FBBLANK state
  pwm: pwm-tiecap: Low power sleep support
  pwm: pwm-tiehrpwm: Low power sleep support
  pwm: pwm-tiehrpwm: Update the clock handling of pwm-tiehrpwm driver
  pwm: vt8500: Add polarity support
  pwm: vt8500: Register write busy test performed incorrectly
  pwm: atmel: add Timer Counter Block PWM driver
</content>
</entry>
</feed>
