Linux PWM subsystem development
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	"open list:PWM SUBSYSTEM" <linux-pwm@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	justin.chen@broadcom.com
Subject: Re: [PATCH 1/2] dt-bindings: pwm: brcm,bcm7038: Document the 'open-drain' property
Date: Tue, 29 Oct 2024 09:03:57 -0700	[thread overview]
Message-ID: <c623075c-fd80-4312-90ba-4f8a3c3f56f9@broadcom.com> (raw)
In-Reply-To: <7aok7zs7whxfg3bhv7koxfxq6qhgv34b7kg3mh526z2cf7e23l@ffbsxqdqjis3>

On 10/29/24 03:44, Uwe Kleine-König wrote:
> Hello,
> 
> On Tue, Oct 15, 2024 at 10:07:10AM -0700, Florian Fainelli wrote:
>> On 10/15/24 09:32, Rob Herring wrote:
>>> Another thing to consider is for any PWM controller with more than
>>> 1 output, you might want this to be per output and therefore should be
>>> a flag in the cells.
>>
>> Yes, that is a good point, this controller has two channels, so it seems
>> like increasing the #pwm-cells might be the way to go.
> 
> So the idea is something like:
> 
> diff --git a/include/dt-bindings/pwm/pwm.h b/include/dt-bindings/pwm/pwm.h
> index ab9a077e3c7d..d18b006a7399 100644
> --- a/include/dt-bindings/pwm/pwm.h
> +++ b/include/dt-bindings/pwm/pwm.h
> @@ -11,5 +11,6 @@
>   #define _DT_BINDINGS_PWM_PWM_H
>   
>   #define PWM_POLARITY_INVERTED			(1 << 0)
> +#define PWM_OUTPUT_OPEN_DRAIN			(1 << 1)
>   
>   #endif
> 
> and then add support for that to the core and drivers? There is some
> intersection with pinctrl (depending on hardware). I wonder if
> abstracting this somehow using the typical pinctrl properties would be a
> saner option??

But what if the pin is not managed by a pinctrl provider? I have started 
going the route of implementing the PWM_OUTPUT_OPEN_DRAIN bit as an 
additional specifier in the #pwm-cells, but I am not sure to what extent 
this should be allowed to be changed at runtime.
-- 
Florian

  reply	other threads:[~2024-10-29 16:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-12  2:56 [PATCH 0/2] pwm: brcmstb: Support configurable open-drain mode Florian Fainelli
2024-10-12  2:56 ` [PATCH 1/2] dt-bindings: pwm: brcm,bcm7038: Document the 'open-drain' property Florian Fainelli
2024-10-15 16:32   ` Rob Herring
2024-10-15 17:07     ` Florian Fainelli
2024-10-29 10:44       ` Uwe Kleine-König
2024-10-29 16:03         ` Florian Fainelli [this message]
2024-11-28 11:35           ` Uwe Kleine-König
2024-10-12  2:56 ` [PATCH 2/2] pwm: brcmstb: Do not assume open drain configuration Florian Fainelli
2024-10-14 20:05 ` [PATCH 0/2] pwm: brcmstb: Support configurable open-drain mode Uwe Kleine-König
2024-10-16  7:09   ` Krzysztof Kozlowski

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=c623075c-fd80-4312-90ba-4f8a3c3f56f9@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=justin.chen@broadcom.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@baylibre.com \
    /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