<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/pwm/core.c, branch dev-4.3</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.3</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-08-17T13:40:20+00:00</updated>
<entry>
<title>pwm: Clean up kerneldoc</title>
<updated>2015-08-17T13:40:20+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2015-07-27T09:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=048838027667872a75d3af40c51a22088bafd968'/>
<id>urn:sha1:048838027667872a75d3af40c51a22088bafd968</id>
<content type='text'>
Clean up kerneldoc in preparation for including the PWM documentation in
DocBook.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Remove useless whitespace</title>
<updated>2015-08-17T13:40:19+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2015-07-27T09:57:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6bc7064a69fc5b1f774771ea9e2c50e497311766'/>
<id>urn:sha1:6bc7064a69fc5b1f774771ea9e2c50e497311766</id>
<content type='text'>
Remove useless tabs used for padding in structure definitions as well as
some blank lines.

Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</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.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5c31252c4a86dc591c23f1a951edd52ad791ef0e'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>pwm: Add pwmchip_add_with_polarity() API</title>
<updated>2015-06-12T09:36:30+00:00</updated>
<author>
<name>Tim Kryger</name>
<email>tim.kryger@gmail.com</email>
</author>
<published>2015-05-26T20:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=b6a00fae9760a49114016e4764d09e522a5ba5b6'/>
<id>urn:sha1:b6a00fae9760a49114016e4764d09e522a5ba5b6</id>
<content type='text'>
Add a new function to register a PWM chip with channels that have their
initial polarity as specified by an additional parameter. This benefits
drivers of controllers that by default operate with inversed polarity
by removing the need to modify the polarity during initialization.

Signed-off-by: Tim Kryger &lt;tim.kryger@gmail.com&gt;
Signed-off-by: Jonathan Richardson &lt;jonathar@broadcom.com&gt;
[thierry.reding@gmail.com: export pwmchip_add_with_polarity()]
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Add support to remove registered consumer lookup tables</title>
<updated>2015-05-06T12:19:35+00:00</updated>
<author>
<name>Shobhit Kumar</name>
<email>shobhit.kumar@intel.com</email>
</author>
<published>2015-05-05T09:34:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=efb0de55b6a2ec15fc424e660601f22ae2fa487a'/>
<id>urn:sha1:efb0de55b6a2ec15fc424e660601f22ae2fa487a</id>
<content type='text'>
In case some drivers are unloading, they can remove lookup tables which
they had registered during their load time to avoid redundant entries if
loaded again.

CC: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Signed-off-by: Shobhit Kumar &lt;shobhit.kumar@intel.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Remove __init initializer for pwm_add_table()</title>
<updated>2015-04-23T12:50:52+00:00</updated>
<author>
<name>Shobhit Kumar</name>
<email>shobhit.kumar@intel.com</email>
</author>
<published>2015-03-12T16:31:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c264f1110d27185f8531602f5fce400a6bbce946'/>
<id>urn:sha1:c264f1110d27185f8531602f5fce400a6bbce946</id>
<content type='text'>
For platforms that don't support DT, some early MFD modules can register
lookup tables. Remove the __init annotation so that this works. This is
similar to gpio_add_lookup_table() which allows late additions.

CC: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Signed-off-by: Shobhit Kumar &lt;shobhit.kumar@intel.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Remove unnecessary check before of_node_put()</title>
<updated>2015-02-03T11:56:54+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2015-02-03T10:54:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=8d6cc0738540f97edb021d3b76a4367519f1e5f1'/>
<id>urn:sha1:8d6cc0738540f97edb021d3b76a4367519f1e5f1</id>
<content type='text'>
The of_node_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Fix uninitialized warnings in pwm_get()</title>
<updated>2014-08-29T08:18:19+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2014-08-28T09:03:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.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:12+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>Li.Xiubo@freescale.com</email>
</author>
<published>2014-08-18T09:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.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:43+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2014-08-13T15:18:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.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>
</feed>
