blob: 4e55eaccd87681207f03179ffbbe4cb7f3a2dde7 [file] [log] [blame]
Nest Labs GPIO Exporter
=========================
This is a psuedo-device that captures the set of GPIOs used by a device
that is managed using a userspace driver. All GPIOs identified within
this node will be exported to userspace via sysfs using the names given.
Required Properties:
-------------------
- compatible: "nestlabs,gpio-exporter"
- reg: This must be zero to ensure a consistent sysfs path
Optional Properties:
-------------------
- output-names: a list of strings to be used for the output-gpios.
- output-gpios: a list of gpios that will be exported using the matching
output-names strings. They will get their direction set
as output.
- input-names: a list of strings to be used for the input-gpios.
- input-gpios: a list of gpios that will be exported using the matching
input-names strings. They will get their direction set
as input.
Example:
em35x-gpios {
reg = <0x0 0>;
compatible = "nestlabs,gpio-exporter";
output-names = "reset", "wake";
output-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH
&gpio2 5 GPIO_ACTIVE_HIGH>;
input-names = "irq";
input-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
};