xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/input/gpio-decoder.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* GPIO Decoder DT bindings
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired Properties:
4*4882a593Smuzhiyun- compatible: should be "gpio-decoder"
5*4882a593Smuzhiyun- gpios: a spec of gpios (at least two) to be decoded to a number with
6*4882a593Smuzhiyun  first entry representing the MSB.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunOptional Properties:
9*4882a593Smuzhiyun- decoder-max-value: Maximum possible value that can be reported by
10*4882a593Smuzhiyun  the gpios.
11*4882a593Smuzhiyun- linux,axis: the input subsystem axis to map to (ABS_X/ABS_Y).
12*4882a593Smuzhiyun  Defaults to 0 (ABS_X).
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunExample:
15*4882a593Smuzhiyun	gpio-decoder0 {
16*4882a593Smuzhiyun		compatible = "gpio-decoder";
17*4882a593Smuzhiyun		gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
18*4882a593Smuzhiyun			<&pca9536 2 GPIO_ACTIVE_HIGH>,
19*4882a593Smuzhiyun			<&pca9536 1 GPIO_ACTIVE_HIGH>,
20*4882a593Smuzhiyun			<&pca9536 0 GPIO_ACTIVE_HIGH>;
21*4882a593Smuzhiyun		linux,axis = <0>; /* ABS_X */
22*4882a593Smuzhiyun		decoder-max-value = <9>;
23*4882a593Smuzhiyun	};
24