summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2018-07-31 08:05:49 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-07-31 08:11:17 +0200
commit955c594ed1a729fc8b0af24d6cbd93eea1f3f46b (patch)
tree425fd46ca9d009045ac935ad135e484abaa13162 /drivers/input
parentInput: pm8941-pwrkey - abstract register offsets and event code (diff)
downloadlinux-955c594ed1a729fc8b0af24d6cbd93eea1f3f46b.tar.xz
linux-955c594ed1a729fc8b0af24d6cbd93eea1f3f46b.zip
Input: pm8941-pwrkey - add resin entry
Since handling is abstracted in this driver, we need to add resin entry in id table along with pwrkey_data. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/pm8941-pwrkey.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
index e1b3914b141e..48153e0ca19a 100644
--- a/drivers/input/misc/pm8941-pwrkey.c
+++ b/drivers/input/misc/pm8941-pwrkey.c
@@ -29,6 +29,7 @@
#define PON_RT_STS 0x10
#define PON_KPDPWR_N_SET BIT(0)
+#define PON_RESIN_N_SET BIT(1)
#define PON_PS_HOLD_RST_CTL 0x5a
#define PON_PS_HOLD_RST_CTL2 0x5b
@@ -39,6 +40,7 @@
#define PON_PULL_CTL 0x70
#define PON_KPDPWR_PULL_UP BIT(1)
+#define PON_RESIN_PULL_UP BIT(0)
#define PON_DBC_CTL 0x71
#define PON_DBC_DELAY_MASK 0x7
@@ -307,8 +309,14 @@ static const struct pm8941_data pwrkey_data = {
.status_bit = PON_KPDPWR_N_SET,
};
+static const struct pm8941_data resin_data = {
+ .pull_up_bit = PON_RESIN_PULL_UP,
+ .status_bit = PON_RESIN_N_SET,
+};
+
static const struct of_device_id pm8941_pwr_key_id_table[] = {
{ .compatible = "qcom,pm8941-pwrkey", .data = &pwrkey_data },
+ { .compatible = "qcom,pm8941-resin", .data = &resin_data },
{ }
};
MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table);