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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5c3daec-ab85-42e5-b8b5-25fbc3e1271b@leica-geosystems.com>
Date: Mon, 7 Oct 2024 15:17:12 +0000
From: POPESCU Catalin <catalin.popescu@...ca-geosystems.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
CC: "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>, "robh@...nel.org"
	<robh@...nel.org>, "krzk+dt@...nel.org" <krzk+dt@...nel.org>,
	"conor+dt@...nel.org" <conor+dt@...nel.org>, "p.zabel@...gutronix.de"
	<p.zabel@...gutronix.de>, "linux-mmc@...r.kernel.org"
	<linux-mmc@...r.kernel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "m.felsch@...gutronix.de"
	<m.felsch@...gutronix.de>, GEO-CHHER-bsp-development
	<bsp-development.geo@...ca-geosystems.com>
Subject: Re: [PATCH 1/2] dt-bindings: mmc: mmc-pwrseq-simple: add support for
 reset control

On 06/10/2024 14:37, Krzysztof Kozlowski wrote:
> [Some people who received this message don't often get email from krzk@...nel.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
>
>
> On Fri, Oct 04, 2024 at 02:07:39PM +0200, Catalin Popescu wrote:
>> Add compatible value "mmc-pwrseq-simple-reset" to support reset control
>> instead of gpios. Reset controls being refcounted, they allow to use
>> shared resets or gpios across drivers. Support of reset control is
>> limited to one single reset control.
> Driver support is not that relevant to the bindings.
>
>> Signed-off-by: Catalin Popescu <catalin.popescu@...ca-geosystems.com>
>> ---
>>   .../bindings/mmc/mmc-pwrseq-simple.yaml       | 21 +++++++++++++++++--
>>   1 file changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml
>> index 00feaafc1063..da218260af01 100644
>> --- a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml
>> +++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml
>> @@ -16,12 +16,13 @@ description:
>>
>>   properties:
>>     compatible:
>> -    const: mmc-pwrseq-simple
>> +    enum:
>> +      - mmc-pwrseq-simple
>> +      - mmc-pwrseq-simple-reset
> Nope, that's the same device.
>
>>     reset-gpios:
>>       minItems: 1
>>       # Put some limit to avoid false warnings
>> -    maxItems: 32
>>       description:
>>         contains a list of GPIO specifiers. The reset GPIOs are asserted
>>         at initialization and prior we start the power up procedure of the card.
>> @@ -50,6 +51,22 @@ properties:
>>   required:
>>     - compatible
>>
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - mmc-pwrseq-simple-reset
>> +    then:
>> +      properties:
>> +        reset-gpios:
>> +          maxItems: 1
>> +    else:
>> +      properties:
>> +        reset-gpios:
>> +          maxItems: 32
> So basically they are the same... Sorry, this all patch makes little
> sense to me. You are not doing here much. It's exactly the same device
> which you now describe in two ways (first no-go) but the two ways are
> actually the same (second no-go).

That's because the reset framework doesn't support a list of reset gpios 
(assuming that RESET_GPIO was enabled), but only a single reset gpio.

Both gpio and reset frameworks are expecting the same DT property 
("reset-gpios") so using a different compatible to differentiate b/w the 
"tool" (gpio or reset control) to use for the power sequence seemed fine 
to me.

>
> Best regards,
> Krzysztof
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ