summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@free-electrons.com>2017-08-14 22:19:42 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-08-17 13:29:26 -0700
commitc3cc94470bd3aff4eef1d80a91086afc7abce847 (patch)
tree61e359a0806de562182ba1e500c266ab819d5267 /drivers/input
parentfbc1b323d1f97c3880ed3377a127e2c0417d96ea (diff)
Input: axp20x-pek - add support for AXP221 PEK
The AXP221 has different values for startup time bits from the AXP20X. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/axp20x-pek.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c
index 95f33f78fce6..6cee5adc3b5c 100644
--- a/drivers/input/misc/axp20x-pek.c
+++ b/drivers/input/misc/axp20x-pek.c
@@ -56,6 +56,13 @@ static const struct axp20x_time startup_time[] = {
{ .time = 2000, .idx = 3 },
};
+static const struct axp20x_time axp221_startup_time[] = {
+ { .time = 128, .idx = 0 },
+ { .time = 1000, .idx = 1 },
+ { .time = 2000, .idx = 2 },
+ { .time = 3000, .idx = 3 },
+};
+
static const struct axp20x_time shutdown_time[] = {
{ .time = 4000, .idx = 0 },
{ .time = 6000, .idx = 1 },
@@ -70,6 +77,13 @@ static const struct axp20x_info axp20x_info = {
.shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK,
};
+static const struct axp20x_info axp221_info = {
+ .startup_time = axp221_startup_time,
+ .startup_mask = AXP20X_PEK_STARTUP_MASK,
+ .shutdown_time = shutdown_time,
+ .shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK,
+};
+
static ssize_t axp20x_show_attr(struct device *dev,
const struct axp20x_time *time,
unsigned int mask, char *buf)
@@ -383,6 +397,10 @@ static const struct platform_device_id axp_pek_id_match[] = {
.name = "axp20x-pek",
.driver_data = (kernel_ulong_t)&axp20x_info,
},
+ {
+ .name = "axp221-pek",
+ .driver_data = (kernel_ulong_t)&axp221_info,
+ },
{ /* sentinel */ }
};