<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/pwm.h, branch v5.14</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/include/linux/pwm.h?h=v5.14</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/include/linux/pwm.h?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2021-06-30T17:12:19Z</updated>
<entry>
<title>pwm: core: Remove unused devm_pwm_put()</title>
<updated>2021-06-30T17:12:19Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-06-07T12:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c333b936c1530e76eba4e81091874d1217046131'/>
<id>urn:sha1:c333b936c1530e76eba4e81091874d1217046131</id>
<content type='text'>
There are no users and seems no will come of the devm_pwm_put().
Remove the function.

While at it, slightly update documentation.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Add a device-managed function to add PWM chips</title>
<updated>2021-06-28T11:17:48Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-04-07T08:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=bcda91bf86c1ff7647df85029d69f2aed80f210e'/>
<id>urn:sha1:bcda91bf86c1ff7647df85029d69f2aed80f210e</id>
<content type='text'>
This potentially simplifies low-level PWM drivers.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: core: Support new usage_power setting in PWM state</title>
<updated>2021-06-04T09:43:52Z</updated>
<author>
<name>Clemens Gruber</name>
<email>clemens.gruber@pqgruber.com</email>
</author>
<published>2021-05-07T13:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9e40ee18a1dc1623a5368d6232aaed52fd29dada'/>
<id>urn:sha1:9e40ee18a1dc1623a5368d6232aaed52fd29dada</id>
<content type='text'>
If usage_power is set, the PWM driver is only required to maintain
the power output but has more freedom regarding signal form.

If supported, the signal can be optimized, for example to
improve EMI by phase shifting individual channels.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Clarify which state pwm_get_state() returns</title>
<updated>2021-04-09T12:17:03Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-04-06T07:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1a7a6e8072ea0e4582de2da63a9088841fde798e'/>
<id>urn:sha1:1a7a6e8072ea0e4582de2da63a9088841fde798e</id>
<content type='text'>
Given that lowlevel drivers usually cannot implement exactly what a
consumer requests with pwm_apply_state() there is some rounding
involved.

pwm_get_state() returns the setting that was requested most recently by
the consumer (opposed to what was actually implemented in hardware in
reply to the last request). Clarify this in the function kerneldoc.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Drop function pwmchip_add_with_polarity()</title>
<updated>2021-03-22T11:31:32Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2020-12-07T13:45:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9666cec380d60808eb86d3be4caf84faeebe3081'/>
<id>urn:sha1:9666cec380d60808eb86d3be4caf84faeebe3081</id>
<content type='text'>
pwmchip_add() only calls pwmchip_add_with_polarity() and nothing else. All
other users of pwmchip_add_with_polarity() are gone. So drop
pwmchip_add_with_polarity() and move the code instead to pwmchip_add().

The initial assignment to pwm-&gt;state.polarity is dropped. In every correct
usage of the PWM API this value is overwritten later anyhow.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Remove unused function pwmchip_add_inversed()</title>
<updated>2020-12-17T13:19:01Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2020-12-05T16:19:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3df23a316c4a5d1764b034c71c29d67a17d5299f'/>
<id>urn:sha1:3df23a316c4a5d1764b034c71c29d67a17d5299f</id>
<content type='text'>
This is only defined with CONFIG_PWM unset and was introduced together
with pwmchip_add_with_polarity() (which is only defined with CONFIG_PWM
enabled). I guess the series that introduced pwmchip_add_with_polarity()
had a different concept in earlier revisions and the !CONFIG_PWM part
was just not updated accordingly.

Given that there is no implementation for pwmchip_add_with_polarity()
without CONFIG_PWM, just drop pwmchip_add_inversed() instead of renaming
it to pwmchip_add_with_polarity().

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Acked-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: Convert period and duty cycle to u64</title>
<updated>2020-06-17T18:42:11Z</updated>
<author>
<name>Guru Das Srinagesh</name>
<email>gurus@codeaurora.org</email>
</author>
<published>2020-06-02T22:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a9d887dc1c60ed67f2271d66560cdcf864c4a578'/>
<id>urn:sha1:a9d887dc1c60ed67f2271d66560cdcf864c4a578</id>
<content type='text'>
Because period and duty cycle are defined as ints with units of
nanoseconds, the maximum time duration that can be set is limited to
~2.147 seconds. Change their definitions to u64 in the structs of the
PWM framework so that higher durations may be set.

Also use the right format specifiers in debug prints in both core.c,
pwm-stm32-lp.c as well as video/fbdev/ssd1307fb.c.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Guru Das Srinagesh &lt;gurus@codeaurora.org&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Implement some checks for lowlevel drivers</title>
<updated>2020-03-30T14:55:26Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2020-02-10T21:35:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3ad1f3a33286dc67d595f6fab3a3a9e583bc738a'/>
<id>urn:sha1:3ad1f3a33286dc67d595f6fab3a3a9e583bc738a</id>
<content type='text'>
There are some expectations which the callbacks provided by lowlevel
drivers should fulfill. Implement checks that help driver authors to get
these semantics right. As these have some overhead the checks can be
disabled using a Kconfig setting.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Update comment on struct pwm_ops::apply</title>
<updated>2019-10-21T14:50:03Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2019-10-04T13:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=27938fd8ba78b4c7f9a2385b7b52cca19ab891b8'/>
<id>urn:sha1:27938fd8ba78b4c7f9a2385b7b52cca19ab891b8</id>
<content type='text'>
Commit 71523d1812ac (pwm: Ensure pwm_apply_state() doesn't modify the
state argument) updated the kernel-doc for pwm_apply_state(), but not
for the -&gt;apply callback in the pwm_ops struct.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
<entry>
<title>pwm: Ensure pwm_apply_state() doesn't modify the state argument</title>
<updated>2019-09-21T01:25:10Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2019-08-24T15:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=71523d1812aca61e32e742e87ec064e3d8c615e1'/>
<id>urn:sha1:71523d1812aca61e32e742e87ec064e3d8c615e1</id>
<content type='text'>
It is surprising for a PWM consumer when the variable holding the
requested state is modified by pwm_apply_state(). Consider for example a
driver doing:

        #define PERIOD 5000000
        #define DUTY_LITTLE 10
        ...
        struct pwm_state state = {
                .period = PERIOD,
                .duty_cycle = DUTY_LITTLE,
                .polarity = PWM_POLARITY_NORMAL,
                .enabled = true,
        };

        pwm_apply_state(mypwm, &amp;state);
        ...
        state.duty_cycle = PERIOD / 2;
        pwm_apply_state(mypwm, &amp;state);

For sure the second call to pwm_apply_state() should still have
state.period = PERIOD and not something the hardware driver chose for a
reason that doesn't necessarily apply to the second call.

So declare the state argument as a pointer to a const type and adapt all
drivers' .apply callbacks.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
</content>
</entry>
</feed>
