From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Lee Jones <lee.jones@linaro.org>,
linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] pwm: Introduce single-PWM of_xlate function
Date: Mon, 26 Apr 2021 10:24:27 -0500 [thread overview]
Message-ID: <20210426152427.GG1908499@yoga> (raw)
In-Reply-To: <20210424113204.besr7gye2htzkbkr@pengutronix.de>
On Sat 24 Apr 06:32 CDT 2021, Uwe Kleine-K?nig wrote:
> Hello,
>
> On Fri, Apr 23, 2021 at 04:33:04PM -0500, Bjorn Andersson wrote:
> > The existing pxa driver and the upcoming addition of PWM support in the
> > TI sn565dsi86 DSI/eDP bridge driver both has a single PWM channel and
> > thereby a need for a of_xlate function with the period as its single
> > argument.
> >
> > Introduce a common helper function in the core that can be used as
> > of_xlate by such drivers and migrate the pxa driver to use this.
> >
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>
> I'm OK with the idea as such. I'd like to see the semantic expanded a
> bit however such that the function can parse
>
> pwms = <&mypwm 50000>;
>
> and also
>
> pwms = <&mypwm 500000 PWM_POLARITY_INVERTED>;
>
> . You suggetion only covers the former.
One concern though is that a single-channel pwm with the optional flag
would syntactically be indistinguishable from a multi-channel property
without flags. Presumably the values are out of range though, so I
suppose there's no problem in practice.
Please let me know if you think there's any merit to this concern and
I'll respin the patch accordingly.
Thanks,
Bjorn
>
> See
> https://lore.kernel.org/r/20210315111124.2475274-2-u.kleine-koenig@pengutronix.de
> for my first attempt to unify of_pwm_xlate_with_flags and
> of_pwm_simple_xlate accordingly.
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
next prev parent reply other threads:[~2021-04-26 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 21:33 Bjorn Andersson
2021-04-24 11:32 ` Uwe Kleine-König
2021-04-26 15:24 ` Bjorn Andersson [this message]
2021-04-26 16:19 ` 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=20210426152427.GG1908499@yoga \
--to=bjorn.andersson@linaro.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--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
all inboxes | Powered by JetHome®