gpio-decoder.txt 651 B

1234567891011121314151617181920212223
  1. * GPIO Decoder DT bindings
  2. Required Properties:
  3. - compatible: should be "gpio-decoder"
  4. - gpios: a spec of gpios (at least two) to be decoded to a number with
  5. first entry representing the MSB.
  6. Optional Properties:
  7. - decoder-max-value: Maximum possible value that can be reported by
  8. the gpios.
  9. - linux,axis: the input subsystem axis to map to (ABS_X/ABS_Y).
  10. Defaults to 0 (ABS_X).
  11. Example:
  12. gpio-decoder0 {
  13. compatible = "gpio-decoder";
  14. gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
  15. <&pca9536 2 GPIO_ACTIVE_HIGH>,
  16. <&pca9536 1 GPIO_ACTIVE_HIGH>,
  17. <&pca9536 0 GPIO_ACTIVE_HIGH>;
  18. linux,axis = <0>; /* ABS_X */
  19. decoder-max-value = <9>;
  20. };