From: Thierry Reding <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Lee Jones <lee.jones@linaro.org>,
Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com, linux-pwm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH 0/2] pwm: brcmstb: Some cleanups
Date: Thu, 24 Feb 2022 14:45:51 +0100 [thread overview]
Message-ID: <YheMD3F2ZRVEkVcp@orome> (raw)
In-Reply-To: <20220214082354.295451-1-u.kleine-koenig@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 1744 bytes --]
On Mon, Feb 14, 2022 at 09:23:52AM +0100, Uwe Kleine-König wrote:
> Hello,
>
> here are a few cleanups for the brcmstb PWM driver. There are a few
> issues left with it, that I'm not addressing for now. Just mention it in
> case someone wants to work on this driver:
>
> - There is no .get_state() callback
> (That needs to be implemented by some with hardware and
> documentation)
>
> - There are a few places where an overflow can happen in
> brcmstb_pwm_config() that are not handled
>
> - The loop in brcmstb_pwm_config() to calculate cword is ineffective,
> cword could be calculated ad hoc.
>
> - I don't understand
>
> /*
> * We can be called with separate duty and period updates,
> * so do not reject dc == 0 right away
> */
> if (pc == PWM_PERIOD_MIN || (dc < PWM_ON_MIN && duty_ns))
> return -EINVAL;
>
> The usual policy is "With the selected period, pick the biggest
> possible duty_cycle that isn't bigger thatn the requested duty_cycle.
> So should this case be handled using dc = 0 instead?
> But as I don't understand the real issue here (is this about changing
> period and duty at the same time?), I don't want to touch that.
>
> - The driver uses SIMPLE_DEV_PM_OPS which is deprecated.
>
> - The driver defines pr_fmt(fmt) but doesn't use it.
>
> Uwe Kleine-König (2):
> pwm: brcmstb: Implement .apply() callback
> pwm: brcmstb: Remove useless locking
>
> drivers/pwm/pwm-brcmstb.c | 52 ++++++++++++++++++---------------------
> 1 file changed, 24 insertions(+), 28 deletions(-)
Both patches applied, thanks.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-02-24 13:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 8:23 [PATCH 0/2] pwm: brcmstb: Some cleanups Uwe Kleine-König
2022-02-14 8:23 ` [PATCH 1/2] pwm: brcmstb: Implement .apply() callback Uwe Kleine-König
2022-02-14 8:23 ` [PATCH 2/2] pwm: brcmstb: Remove useless locking Uwe Kleine-König
2022-02-14 17:18 ` [PATCH 0/2] pwm: brcmstb: Some cleanups Florian Fainelli
2022-02-14 18:34 ` Uwe Kleine-König
2022-02-14 18:51 ` Florian Fainelli
2022-02-24 13:45 ` Thierry Reding [this message]
2022-03-07 18:47 ` Uwe Kleine-König
2022-03-07 19:11 ` Florian Fainelli
2022-03-07 20:44 ` Uwe Kleine-König
2022-03-07 22:27 ` Florian Fainelli
2022-03-08 10:28 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YheMD3F2ZRVEkVcp@orome \
--to=thierry.reding@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).