]> git.baikalelectronics.ru Git - kernel.git/commit
Input: pm8941-pwrkey - abstract register offsets and event code
authorVinod Koul <vkoul@kernel.org>
Tue, 31 Jul 2018 05:57:33 +0000 (22:57 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 31 Jul 2018 06:11:16 +0000 (23:11 -0700)
commit1265f666c4a1a63ad9bdb336f9edccc4fc4ba9e4
tree0231a630e6c4dd9d1175b7745be6a1ca25805ba9
parent997533cb057e73d3dd86e3536e8f77473a393966
Input: pm8941-pwrkey - abstract register offsets and event code

In order to support resin thru the pwrkey driver (they are very
similar in nature) we need to abstract the handling in this driver.

First we abstract pull_up_bit and status_bit along in driver data.
The event code sent for key events is quiried from DT.

Since the device can be child of pon lookup regmap and reg from
parent if lookup fails (we are child).

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
drivers/input/misc/pm8941-pwrkey.c