forked from Minki/linux
128bb95deb
This patch adds a driver for Microchips CAP1106, an I2C driven, 6-channel capacitive touch sensor. For now, only the capacitive buttons are supported, and no specific settings that can be tweaked for individual channels, except for the device-wide sensitivity gain. The defaults seem to work just fine out of the box, so I'll leave configurable parameters for someone who's in need of them and who can actually measure the impact. All registers are prepared, however. Many of them are just not used for now. The implementation does not make any attempt to be compatible to platform data driven boards, but fully depends on CONFIG_OF. Power management functions are also left for volounteers with the ability to actually test them. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
Device tree bindings for Microchip CAP1106, 6 channel capacitive touch sensor
|
|
|
|
The node for this driver must be a child of a I2C controller node, as the
|
|
device communication via I2C only.
|
|
|
|
Required properties:
|
|
|
|
compatible: Must be "microchip,cap1106"
|
|
|
|
reg: The I2C slave address of the device.
|
|
Only 0x28 is valid.
|
|
|
|
interrupts: Property describing the interrupt line the
|
|
device's ALERT#/CM_IRQ# pin is connected to.
|
|
The device only has one interrupt source.
|
|
|
|
Optional properties:
|
|
|
|
autorepeat: Enables the Linux input system's autorepeat
|
|
feature on the input device.
|
|
|
|
microchip,sensor-gain: Defines the gain of the sensor circuitry. This
|
|
effectively controls the sensitivity, as a
|
|
smaller delta capacitance is required to
|
|
generate the same delta count values.
|
|
Valid values are 1, 2, 4, and 8.
|
|
By default, a gain of 1 is set.
|
|
|
|
linux,keycodes: Specifies an array of numeric keycode values to
|
|
be used for the channels. If this property is
|
|
omitted, KEY_A, KEY_B, etc are used as
|
|
defaults. The array must have exactly six
|
|
entries.
|
|
|
|
Example:
|
|
|
|
i2c_controller {
|
|
cap1106@28 {
|
|
compatible = "microchip,cap1106";
|
|
interrupt-parent = <&gpio1>;
|
|
interrupts = <0 0>;
|
|
reg = <0x28>;
|
|
autorepeat;
|
|
microchip,sensor-gain = <2>;
|
|
|
|
linux,keycodes = <103 /* KEY_UP */
|
|
106 /* KEY_RIGHT */
|
|
108 /* KEY_DOWN */
|
|
105 /* KEY_LEFT */
|
|
109 /* KEY_PAGEDOWN */
|
|
104>; /* KEY_PAGEUP */
|
|
};
|
|
}
|