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)
commit2049a9e56a01ddedc2528ea42284e60d0e448cce
tree0231a630e6c4dd9d1175b7745be6a1ca25805ba9
parent0b64fa0a0ee31501d546c775a88922f3cf51fef3
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