gpio-max732x.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. * MAX732x-compatible I/O expanders
  2. Required properties:
  3. - compatible: Should be one of the following:
  4. - "maxim,max7319": For the Maxim MAX7319
  5. - "maxim,max7320": For the Maxim MAX7320
  6. - "maxim,max7321": For the Maxim MAX7321
  7. - "maxim,max7322": For the Maxim MAX7322
  8. - "maxim,max7323": For the Maxim MAX7323
  9. - "maxim,max7324": For the Maxim MAX7324
  10. - "maxim,max7325": For the Maxim MAX7325
  11. - "maxim,max7326": For the Maxim MAX7326
  12. - "maxim,max7327": For the Maxim MAX7327
  13. - reg: I2C slave address for this device.
  14. - gpio-controller: Marks the device node as a GPIO controller.
  15. - #gpio-cells: Should be 2.
  16. - first cell is the GPIO number
  17. - second cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>.
  18. Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
  19. Optional properties:
  20. The I/O expander can detect input state changes, and thus optionally act as
  21. an interrupt controller. When the expander interrupt line is connected all the
  22. following properties must be set. For more information please see the
  23. interrupt controller device tree bindings documentation available at
  24. Documentation/devicetree/bindings/interrupt-controller/interrupts.txt.
  25. - interrupt-controller: Identifies the node as an interrupt controller.
  26. - #interrupt-cells: Number of cells to encode an interrupt source, shall be 2.
  27. - first cell is the pin number
  28. - second cell is used to specify flags
  29. - interrupt-parent: phandle of the parent interrupt controller.
  30. - interrupts: Interrupt specifier for the controllers interrupt.
  31. Please refer to gpio.txt in this directory for details of the common GPIO
  32. bindings used by client devices.
  33. Example 1. MAX7325 with interrupt support enabled (CONFIG_GPIO_MAX732X_IRQ=y):
  34. expander: max7325@6d {
  35. compatible = "maxim,max7325";
  36. reg = <0x6d>;
  37. gpio-controller;
  38. #gpio-cells = <2>;
  39. interrupt-controller;
  40. #interrupt-cells = <2>;
  41. interrupt-parent = <&gpio4>;
  42. interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
  43. };
  44. Example 2. MAX7325 with interrupt support disabled (CONFIG_GPIO_MAX732X_IRQ=n):
  45. expander: max7325@6d {
  46. compatible = "maxim,max7325";
  47. reg = <0x6d>;
  48. gpio-controller;
  49. #gpio-cells = <2>;
  50. };