diff options
author | Vinod Koul <vkoul@kernel.org> | 2018-07-31 02:05:49 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-07-31 02:11:17 -0400 |
commit | 955c594ed1a729fc8b0af24d6cbd93eea1f3f46b (patch) | |
tree | 425fd46ca9d009045ac935ad135e484abaa13162 | |
parent | 2049a9e56a01ddedc2528ea42284e60d0e448cce (diff) |
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>
-rw-r--r-- | Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt | 1 | ||||
-rw-r--r-- | drivers/input/misc/pm8941-pwrkey.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt index bf719396eadd..34ab5763f494 100644 --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt | |||
@@ -7,6 +7,7 @@ PROPERTIES | |||
7 | Value type: <string> | 7 | Value type: <string> |
8 | Definition: must be one of: | 8 | Definition: must be one of: |
9 | "qcom,pm8941-pwrkey" | 9 | "qcom,pm8941-pwrkey" |
10 | "qcom,pm8941-resin" | ||
10 | 11 | ||
11 | - reg: | 12 | - reg: |
12 | Usage: required | 13 | Usage: required |
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 @@ | |||
29 | 29 | ||
30 | #define PON_RT_STS 0x10 | 30 | #define PON_RT_STS 0x10 |
31 | #define PON_KPDPWR_N_SET BIT(0) | 31 | #define PON_KPDPWR_N_SET BIT(0) |
32 | #define PON_RESIN_N_SET BIT(1) | ||
32 | 33 | ||
33 | #define PON_PS_HOLD_RST_CTL 0x5a | 34 | #define PON_PS_HOLD_RST_CTL 0x5a |
34 | #define PON_PS_HOLD_RST_CTL2 0x5b | 35 | #define PON_PS_HOLD_RST_CTL2 0x5b |
@@ -39,6 +40,7 @@ | |||
39 | 40 | ||
40 | #define PON_PULL_CTL 0x70 | 41 | #define PON_PULL_CTL 0x70 |
41 | #define PON_KPDPWR_PULL_UP BIT(1) | 42 | #define PON_KPDPWR_PULL_UP BIT(1) |
43 | #define PON_RESIN_PULL_UP BIT(0) | ||
42 | 44 | ||
43 | #define PON_DBC_CTL 0x71 | 45 | #define PON_DBC_CTL 0x71 |
44 | #define PON_DBC_DELAY_MASK 0x7 | 46 | #define PON_DBC_DELAY_MASK 0x7 |
@@ -307,8 +309,14 @@ static const struct pm8941_data pwrkey_data = { | |||
307 | .status_bit = PON_KPDPWR_N_SET, | 309 | .status_bit = PON_KPDPWR_N_SET, |
308 | }; | 310 | }; |
309 | 311 | ||
312 | static const struct pm8941_data resin_data = { | ||
313 | .pull_up_bit = PON_RESIN_PULL_UP, | ||
314 | .status_bit = PON_RESIN_N_SET, | ||
315 | }; | ||
316 | |||
310 | static const struct of_device_id pm8941_pwr_key_id_table[] = { | 317 | static const struct of_device_id pm8941_pwr_key_id_table[] = { |
311 | { .compatible = "qcom,pm8941-pwrkey", .data = &pwrkey_data }, | 318 | { .compatible = "qcom,pm8941-pwrkey", .data = &pwrkey_data }, |
319 | { .compatible = "qcom,pm8941-resin", .data = &resin_data }, | ||
312 | { } | 320 | { } |
313 | }; | 321 | }; |
314 | MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table); | 322 | MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table); |