Skip to content

Commit c3cc944

Browse files
QSchulzdtor
authored andcommitted
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>
1 parent fbc1b32 commit c3cc944

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎drivers/input/misc/axp20x-pek.c‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ static const struct axp20x_time startup_time[] = {
5656
{ .time = 2000, .idx = 3 },
5757
};
5858

59+
static const struct axp20x_time axp221_startup_time[] = {
60+
{ .time = 128, .idx = 0 },
61+
{ .time = 1000, .idx = 1 },
62+
{ .time = 2000, .idx = 2 },
63+
{ .time = 3000, .idx = 3 },
64+
};
65+
5966
static const struct axp20x_time shutdown_time[] = {
6067
{ .time = 4000, .idx = 0 },
6168
{ .time = 6000, .idx = 1 },
@@ -70,6 +77,13 @@ static const struct axp20x_info axp20x_info = {
7077
.shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK,
7178
};
7279

80+
static const struct axp20x_info axp221_info = {
81+
.startup_time = axp221_startup_time,
82+
.startup_mask = AXP20X_PEK_STARTUP_MASK,
83+
.shutdown_time = shutdown_time,
84+
.shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK,
85+
};
86+
7387
static ssize_t axp20x_show_attr(struct device *dev,
7488
const struct axp20x_time *time,
7589
unsigned int mask, char *buf)
@@ -383,6 +397,10 @@ static const struct platform_device_id axp_pek_id_match[] = {
383397
.name = "axp20x-pek",
384398
.driver_data = (kernel_ulong_t)&axp20x_info,
385399
},
400+
{
401+
.name = "axp221-pek",
402+
.driver_data = (kernel_ulong_t)&axp221_info,
403+
},
386404
{ /* sentinel */ }
387405
};
388406

0 commit comments

Comments
 (0)