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: <CAL_JsqKPgSrbdyPx4qCRB8ycZ2+xNNgT9Gu0YD_OU-kDGAVRPA@mail.gmail.com>
Date:	Fri, 11 Dec 2015 10:48:08 -0600
From:	Rob Herring <robh@...nel.org>
To:	Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Mark Rutland <mark.rutland@....com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	Arnd Bergmann <arnd@...db.de>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andreas Färber <afaerber@...e.de>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Daniel Thompson <daniel.thompson@...aro.org>,
	Bruno Herrera <bruherrera@...il.com>
Subject: Re: [PATCH v3 2/9] Documentation: dt-bindings: Document STM32 pinctrl
 driver DT bindings

On Wed, Dec 9, 2015 at 3:37 AM, Maxime Coquelin
<mcoquelin.stm32@...il.com> wrote:
> Hi Rob,
>
> 2015-12-09 4:41 GMT+01:00 Rob Herring <robh@...nel.org>:
>> On Tue, Dec 08, 2015 at 01:45:04PM +0100, Maxime Coquelin wrote:
>>> Signed-off-by: Maxime Coquelin <mcoquelin.stm32@...il.com>
>>> ---
>>>  .../bindings/pinctrl/st,stm32-pinctrl.txt          | 126 +++++++++++++++++++++
>>>  1 file changed, 126 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
>>> new file mode 100644
>>> index 0000000..7b4800c
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
>>> @@ -0,0 +1,126 @@
>>> +* STM32 GPIO and Pin Mux/Config controller
>>> +
>>> +STMicroelectronics's STM32 MCUs intregrate a GPIO and Pin mux/config hardware
>>> +controller. It controls the input/output settings on the available pins and
>>> +also provides ability to multiplex and configure the output of various on-chip
>>> +controllers onto these pads.
>>> +
>>> +Pin controller node:
>>> +Required properies:
>>> + - compatible: value should be one of the following:
>>> +   (a) "st,stm32f429-pinctrl"
>>> + - #address-cells: The value of this property must be 1
>>> + - #size-cells       : The value of this property must be 1
>>> + - ranges    : defines mapping between pin controller node (parent) to
>>> +   gpio-bank node (children).
>>> + - pins-are-numbered: Specify the subnodes are using numbered pinmux to
>>> +   specify pins.
>>> +
>>> +GPIO controller/bank node:
>>> +Required properties:
>>> + - gpio-controller : Indicates this device is a GPIO controller
>>> + - #gpio-cells         : Should be two.
>>> +                     The first cell is the pin number
>>> +                     The second one is the polarity:
>>> +                             - 0 for active high
>>> +                             - 1 for active low
>>> + - reg                 : The gpio address range, relative to the pinctrl range
>>> + - clocks      : clock that drives this bank
>>> + - st,bank-name        : Should be a name string for this bank as specified in
>>> +   the datasheet
>>
>> How do you intend to use this? We should come up with something generic
>> or drop it.
> Good point.
> It is used to have a meaningful name set in gpio_chip's label.

Who cares about the gpio_chip name?

> I see two alternatives:
>  1. replace "st,bank-name" with label
>  2. use aliases, and construct label in driver with something like:
>      kasprintf(GFP_KERNEL, "GPIO%c", 'A' + of_alias_get_id(np, "gpio"));
>
> What do you prefer?

I prefer to not need it. Of these 2 though, probably using label.
However, I'm not convinced to say yes, we should use that because it
will only encourage others to do the same.

> Do you have other ideas?

We do need names on individual lines though. I'd rather not complicate
things by having labels for both unless we can define the need for it.

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