On Mon, Aug 21, 2017 at 03:12:00PM +0200, Lukas Wunner wrote: > Add device tree bindings for Maxim MAX3191x industrial serializer. > > Cc: Mathias Duckeck <m.duckeck@xxxxxxxxx> > Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx> > --- > .../devicetree/bindings/gpio/gpio-max3191x.txt | 37 ++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-max3191x.txt > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-max3191x.txt b/Documentation/devicetree/bindings/gpio/gpio-max3191x.txt > new file mode 100644 > index 000000000000..18182ecaa199 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/gpio-max3191x.txt > @@ -0,0 +1,37 @@ > +GPIO driver for Maxim MAX3191x industrial serializer > + > +Required properties: > + - compatible: "maxim,max31910", "maxim,max31911", "maxim,max31912", > + "maxim,max31913", "maxim,max31953", "maxim,max31963" One valid combination per line please. > + - gpio-controller: Marks the device node as a GPIO controller. > + - #gpio-cells: Should be two. For consumer use see gpio.txt. > + > +Optional properties: > + - maxim,nchips: Number of chips in the daisy-chain (default is 1). > + - modesel-gpios: GPIO pins to configure modesel of each chip. > + The number of GPIOs must be equal to "maxim,nchips". > + - fault-gpios: GPIO pins to read undervoltage fault of each chip. > + - db0-gpios: GPIO pins to configure debounce of each chip. > + - db1-gpios: GPIO pins to configure debounce of each chip. Perhaps an array db-gpios with 2 entries. These gpios all need a vendor prefix. > + - maxim,modesel: Mode to use if hardwired (and thus not selectable > + through GPIOs): 0 for 16-bit mode, 1 for 8-bit mode. Make this a boolean and define the default when not present (and modesel-gpios not present). > + - maxim,no-vcc24v: Boolean, whether the chips are powered through 5VOUT > + instead of VCC24V. Use the regulator binding here? > + > +For other required and optional properties of SPI slave nodes please refer to > +../spi/spi-bus.txt. > + > +Example: > + gpio@0 { > + compatible = "maxim,max31913"; > + gpio-controller; > + #gpio-cells = <2>; > + > + modesel-gpios = <&gpio2 23>; > + fault-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; > + db0-gpios = <&gpio2 25>; > + db1-gpios = <&gpio2 26>; > + > + reg = <0>; reg usually comes after compatible. Also, reg needs to be documented above. > + spi-max-frequency = <25000000>; > + }; > -- > 2.11.0 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html