extcon-gpio.txt 1003 B

1234567891011121314151617181920212223242526272829303132
  1. GPIO Extcon device
  2. This is a virtual device used to generate USB cable states from the USB ID pin
  3. connected to a GPIO pin.
  4. Required properties:
  5. - compatible: Should be "extcon-gpio"
  6. - extcon-id: The unique id of specific external connector.
  7. Valid range is 0 (EXTCON_NONE) to 63 (EXTCON_NUM).
  8. Refer include/linux/extcon.h for details.
  9. - gpio: Specify GPIO (see gpio binding)
  10. - debounce-ms: Debounce time for GPIO IRQ in ms
  11. - irq-flags: interrupt flags (edge/level). Refer to "include/dt-bindings/interrupt-controller/irq.h"
  12. - pinctrl-names, pinctrl-0, pinctrl-1,.. pinctrl-n: Refer to "Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt"
  13. for these optional properties
  14. Example:
  15. extcon_storage_cd {
  16. compatible = "extcon-gpio";
  17. extcon-id = <62>; /* EXTCON_MECHANICAL */
  18. gpio = <&tlmm 126 GPIO_ACTIVE_LOW>;
  19. debounce-ms = <200>;
  20. irq-flags = <IRQ_TYPE_EDGE_BOTH>;
  21. }
  22. &ufshc_card {
  23. extcon = <&extcon_storage_cd>;
  24. };
  25. &sd_card {
  26. extcon = <&extcon_storage_cd>;
  27. };