[PATCH 1/2] dt-bindings: pwm: brcm,bcm7038: Document the 'open-drain' property

Uwe Kleine-König u.kleine-koenig at baylibre.com
Tue Oct 29 03:44:06 PDT 2024


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??

Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241029/513c04d6/attachment.sig>


More information about the linux-arm-kernel mailing list