lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c623075c-fd80-4312-90ba-4f8a3c3f56f9@broadcom.com>
Date: Tue, 29 Oct 2024 09:03:57 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>,
 Florian Fainelli <f.fainelli@...il.com>
Cc: Rob Herring <robh@...nel.org>, linux-kernel@...r.kernel.org,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>,
 Broadcom internal kernel review list
 <bcm-kernel-feedback-list@...adcom.com>,
 Thierry Reding <thierry.reding@...il.com>,
 "open list:PWM SUBSYSTEM" <linux-pwm@...r.kernel.org>,
 "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
 <devicetree@...r.kernel.org>,
 "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE"
 <linux-arm-kernel@...ts.infradead.org>, justin.chen@...adcom.com
Subject: Re: [PATCH 1/2] dt-bindings: pwm: brcm,bcm7038: Document the
 'open-drain' property

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ