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]
Date:	Tue, 1 Sep 2015 14:30:30 +0200
From:	Javier Martinez Canillas <javier@...hile0.org>
To:	Rob Herring <robherring2@...il.com>
Cc:	Peter Griffin <peter.griffin@...aro.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Srinivas Kandagatla <srinivas.kandagatla@...il.com>,
	Maxime Coquelin <maxime.coquelin@...com>,
	Patrice Chotard <patrice.chotard@...com>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Lee Jones <lee.jones@...aro.org>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Valentin Rothberg <valentinrothberg@...il.com>,
	hugues.fruchet@...com, Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>
Subject: Re: [PATCH v3 4/6] [media] c8sectpfe: Update binding to reset-gpios

[adding GPIO maintainers to cc list]

Hello Rob,

On Tue, Sep 1, 2015 at 1:54 PM, Rob Herring <robherring2@...il.com> wrote:
> On Tue, Sep 1, 2015 at 3:32 AM, Javier Martinez Canillas
> <javier@...hile0.org> wrote:
>> Hello Peter,
>>
>> On Fri, Aug 28, 2015 at 7:52 PM, Peter Griffin <peter.griffin@...aro.org> wrote:
>>> gpio.txt documents that GPIO properties should be named
>>> "[<name>-]gpios", with <name> being the purpose of this
>>> GPIO for the device.
>>>
>>> This change has been done as one atomic commit.
>>>
>>> Signed-off-by: Peter Griffin <peter.griffin@...aro.org>
>>> Acked-by: Lee Jones <lee.jones@...aro.org>
>>> ---
>>>  Documentation/devicetree/bindings/media/stih407-c8sectpfe.txt | 6 +++---
>>>  arch/arm/boot/dts/stihxxx-b2120.dtsi                          | 4 ++--
>>>  drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c         | 2 +-
>>>  3 files changed, 6 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/media/stih407-c8sectpfe.txt b/Documentation/devicetree/bindings/media/stih407-c8sectpfe.txt
>>> index d4def76..e70d840 100644
>>> --- a/Documentation/devicetree/bindings/media/stih407-c8sectpfe.txt
>>> +++ b/Documentation/devicetree/bindings/media/stih407-c8sectpfe.txt
>>> @@ -35,7 +35,7 @@ Required properties (tsin (child) node):
>>>
>>>  - tsin-num     : tsin id of the InputBlock (must be between 0 to 6)
>>>  - i2c-bus      : phandle to the I2C bus DT node which the demodulators & tuners on this tsin channel are connected.
>>> -- rst-gpio     : reset gpio for this tsin channel.
>>> +- reset-gpios  : reset gpio for this tsin channel.
>>
>> The documentation is a bit outdated, the GPIO subsystem supports both
>> -gpio and -gpios, see commit:
>>
>> dd34c37aa3e8 ("gpio: of: Allow -gpio suffix for property names")
>
> Yes, because we have lots of them.
>

Yes, I know that was the motivation for that change.

>> So it makes sense to me to use -gpio instead of -gpios in this case
>> since is a single GPIO. Also rst is already a descriptive name since
>> that's how many datasheets name a reset pin. I'm not saying I'm
>> against this patch, just pointing out since the commit message is a
>> bit misleading.
>
> I believe that this has been discussed at length and it was decided
> that new bindings should use "-gpios" even for 1. Just like "clocks"
> is always plural.
>

The documentation doesn't reflect that decision though. If new
bindings are supposed to be using -gpios rather than -gpio even when a
single GPIO is used, then
Documentation/devicetree/bindings/gpio/gpio.txt and
Documentation/gpio/board.txt should say that <function>-gpio is also
supported for backward compatibility but that is deprecated and should
not be used.

Otherwise when looking the code it seems that is just that the
documentation is outdated and that both -gpio or -gpios can be used.

> Rob

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ