mbox series

[v2,00/13] gpio: add common dtschema

Message ID 20200917165301.23100-1-krzk@kernel.org
Headers show
Series gpio: add common dtschema | expand

Message

Krzysztof Kozlowski Sept. 17, 2020, 4:52 p.m. UTC
Hi,

Changes since v1
================
1. Use common schema in bindings outside of gpio/ (new patches).
2. Minor fixes - see individual patches for changelogs.


Notes
=====
This is independent work of pca953x bindings:
https://lore.kernel.org/lkml/20200916155715.21009-1-krzk@kernel.org/T/#u

The DTS patches can be also applied independently.
The bindings patches depend on first one, adding common schema.

Best regards,
Krzysztof

Krzysztof Kozlowski (13):
  dt-bindings: gpio: add common schema for GPIO controllers
  dt-bindings: gpio: include common schema in GPIO controllers
  dt-bindings: gpio: pl061: add missing properties and include common
    schema
  dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles
  dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names
  dt-bindings: gpio: gpio-vf610: fix iMX 7ULP compatible matching
  dt-bindings: media: include common schema in GPIO controllers
  dt-bindings: mfd: include common schema in GPIO controllers
  dt-bindings: pinctrl: include common schema in GPIO controllers
  ASoC: dt-bindings: zl38060: include common schema in GPIO controllers
  arm64: dts: imx8mq-librem5: correct GPIO hog property
  arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema
  ARM: dts: imx: align GPIO hog names with dtschema

 .../bindings/gpio/brcm,xgs-iproc-gpio.yaml    |   3 +
 .../bindings/gpio/fsl-imx-gpio.yaml           |  17 ++-
 .../devicetree/bindings/gpio/gpio-common.yaml | 125 ++++++++++++++++++
 .../devicetree/bindings/gpio/gpio-mxs.yaml    |   4 +
 .../bindings/gpio/gpio-pca9570.yaml           |   3 +
 .../devicetree/bindings/gpio/gpio-rda.yaml    |   3 +
 .../devicetree/bindings/gpio/gpio-vf610.yaml  |  11 +-
 .../devicetree/bindings/gpio/mrvl-gpio.yaml   |   1 +
 .../devicetree/bindings/gpio/pl061-gpio.yaml  |   6 +
 .../bindings/gpio/qcom,wcd934x-gpio.yaml      |   3 +
 .../bindings/gpio/renesas,em-gio.yaml         |   3 +
 .../bindings/gpio/renesas,rcar-gpio.yaml      |   3 +
 .../devicetree/bindings/gpio/sifive,gpio.yaml |   3 +
 .../bindings/gpio/snps,dw-apb-gpio.yaml       |   3 +
 .../gpio/socionext,uniphier-gpio.yaml         |   3 +
 .../bindings/gpio/xylon,logicvc-gpio.yaml     |   3 +
 .../bindings/media/i2c/maxim,max9286.yaml     |   3 +
 .../bindings/mfd/cirrus,madera.yaml           |   1 +
 .../devicetree/bindings/mfd/max77650.yaml     |   3 +
 .../bindings/mfd/rohm,bd71828-pmic.yaml       |   3 +
 .../devicetree/bindings/mfd/st,stmfx.yaml     |   2 +
 .../devicetree/bindings/mfd/wlf,arizona.yaml  |   1 +
 .../pinctrl/actions,s500-pinctrl.yaml         |   3 +
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |   1 +
 .../bindings/pinctrl/cirrus,lochnagar.yaml    |   3 +
 .../bindings/pinctrl/ingenic,pinctrl.yaml     |   3 +
 .../pinctrl/mediatek,mt6779-pinctrl.yaml      |   3 +
 .../bindings/pinctrl/pinctrl-mt8192.yaml      |   3 +
 .../pinctrl/qcom,ipq6018-pinctrl.yaml         |   3 +
 .../pinctrl/qcom,msm8226-pinctrl.yaml         |   3 +
 .../bindings/pinctrl/qcom,sm8250-pinctrl.yaml |   3 +
 .../pinctrl/renesas,rza2-pinctrl.yaml         |   3 +
 .../bindings/pinctrl/st,stm32-pinctrl.yaml    |   3 +
 .../devicetree/bindings/sound/zl38060.yaml    |   3 +
 arch/arm/boot/dts/imx51-zii-rdu1.dts          |   2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi       |   8 +-
 arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts   |   2 +-
 .../boot/dts/freescale/imx8mq-librem5.dtsi    |   4 +-
 38 files changed, 245 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml

Comments

Mark Brown Sept. 17, 2020, 4:59 p.m. UTC | #1
On Thu, Sep 17, 2020 at 06:52:58PM +0200, Krzysztof Kozlowski wrote:
> Include the common GPIO schema in GPIO controllers to be sure all common
> properties are properly validated.

Acked-by: Mark Brown <broonie@kernel.org>
Laurent Pinchart Sept. 18, 2020, 2:18 p.m. UTC | #2
Hi Krzysztof,

On Fri, Sep 18, 2020 at 09:52:57AM +0200, Krzysztof Kozlowski wrote:
> On Thu, 17 Sep 2020 at 22:10, Laurent Pinchart wrote:
> > On Thu, Sep 17, 2020 at 06:52:49PM +0200, Krzysztof Kozlowski wrote:
> > > Convert parts of gpio.txt bindings into common dtschema file for GPIO
> > > controllers.
> >
> > How about deleting the part that has been converted from gpio.txt ?
> 
> I did not move everything from the gpio.txt and it is really nicely
> explained there. I think to leave it as it works as a overview/guide
> better than YAML.

I'm just a bit worried that duplicating some of the information in two
places will lead to them becoming out of sync, but maybe the risk isn't
that high.

> > > The schema enforces proper naming of GPIO controller nodes and GPIO
> > > hogs.
> > >
> > > The schema should be included by specific GPIO controllers bindings.
> >
> > Instead of including it manually, could we use a conditional select: to
> > apply the schema automatically when a gpio-controller property is
> > present ?
> 
> You mean the same way as generic schema for GPIO controllers work?
> This could be done but the point is to enforce the GPIO controller
> bindings in GPIO controllers, so also in cases when someone forgets to
> add "gpio-controller" property. Although, if given GPIO controller
> schema requires "gpio-controller" then indeed select would work...

You could just make gpio-controller mandatory in the schema, and get
everything else automatically selected based on that, without needing a
manual $ref.
Charles Keepax Sept. 21, 2020, 9:54 a.m. UTC | #3
On Thu, Sep 17, 2020 at 06:52:56PM +0200, Krzysztof Kozlowski wrote:
> Include the common GPIO schema in GPIO controllers to be sure all common
> properties are properly validated.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---

For the Cirrus/Wolfson bits:

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles