Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: <Conor.Dooley@microchip.com>
To: <krzysztof.kozlowski@linaro.org>, <mail@conchuod.ie>,
	<linus.walleij@linaro.org>, <brgl@bgdev.pl>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>
Cc: <linux-gpio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: gpio: mpfs-gpio: allow parsing of hog child nodes.
Date: Thu, 25 Aug 2022 12:30:35 +0000	[thread overview]
Message-ID: <e94c1de8-e5e3-2325-38f9-1606c9369aef@microchip.com> (raw)
In-Reply-To: <0ecf1664-03a2-71ac-b967-6905b96c7ce0@linaro.org>

On 25/08/2022 13:10, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 20/08/2022 23:41, Conor Dooley wrote:
>> From: Conor Dooley <conor.dooley@microchip.com>
>>
>> The SD card and eMMC on PolarFire SoC based dev boards are sometimes
>> statically muxed using a GPIO. To facilitate this, enable gpio-hog
>> child node properties.
>>
>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
>> ---
>>   .../bindings/gpio/microchip,mpfs-gpio.yaml     | 18 ++++++++++++++++++
>>   1 file changed, 18 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
>> index 110651eafa70..6704a7a52cd0 100644
>> --- a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
>> +++ b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
>> @@ -44,6 +44,24 @@ properties:
>>
>>     gpio-controller: true
>>
>> +patternProperties:
>> +  "^.+-hog(?:-[0-9]+)?$":
> 
> What is this pattern about: "(?:" ?

Me being a pedant I suppose. "()" is a capture while "(?:)" is a match.
However, it does seem like json-schema suggests using "()":
https://json-schema.org/understanding-json-schema/reference/regular_expressions.html

I don't mind & neither does the schema checker.

> 
>> +    type: object
>> +
>> +    properties:
>> +      gpio-hog: true
>> +      gpios: true
>> +      input: true
>> +      output-high: true
>> +      output-low: true
>> +      line-name: true
>> +
>> +    required:
>> +      - gpio-hog
>> +      - gpios
>> +
>> +    additionalProperties: false
> 
> Put it after type:object. Easier to read/find.

Sure.
Thanks,
Conor.

  reply	other threads:[~2022-08-25 12:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20 20:41 [PATCH] dt-bindings: gpio: mpfs-gpio: allow parsing of hog child nodes Conor Dooley
2022-08-25 12:10 ` Krzysztof Kozlowski
2022-08-25 12:30   ` Conor.Dooley [this message]
2022-08-25 12:35     ` Krzysztof Kozlowski
2022-08-25 12:40       ` Conor.Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e94c1de8-e5e3-2325-38f9-1606c9369aef@microchip.com \
    --to=conor.dooley@microchip.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@conchuod.ie \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox