Input: tps65218-pwrbutton - add support for tps65217 variant

The power button found in tps65217 device is very similar to the tps65218,
so let's enhance the driver to support both variants.

This driver enables us to use tps65217's power button as KEY_POWER on
am335x boards (directly connected button in chiliboard, accessible pin
via expansion header in beaglebone). This patch has been tested with
chiliboard.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Marcin Niestroj
2016-09-10 10:42:53 -07:00
committed by Dmitry Torokhov
parent 3521a0f05d
commit 722dc54628
3 changed files with 83 additions and 34 deletions

View File

@@ -1,13 +1,24 @@
Texas Instruments TPS65218 power button
Texas Instruments TPS65217 and TPS65218 power button
This module is part of the TPS65217/TPS65218. For more details about the whole
TPS65217 chip see Documentation/devicetree/bindings/regulator/tps65217.txt.
This driver provides a simple power button event via an Interrupt.
Required properties:
- compatible: should be "ti,tps65218-pwrbutton"
- compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"
Required properties for TPS65218:
- interrupts: should be one of the following
- <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218
Example:
Examples:
&tps {
tps65217-pwrbutton {
compatible = "ti,tps65217-pwrbutton";
};
};
&tps {
power-button {