summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJigarkumar Kishorkumar Zala <j_zala@codeaurora.org>2016-02-10 12:50:43 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:10:54 -0700
commit0ff886d8f4f98efa045f9d80fcef3832a56521ff (patch)
tree9777543d7a412e048ae50b0a1ba8fd313c673157
parent00ed82ea7952d17f61064b05dfa9c8e5a1377937 (diff)
input: qpnp-power-on: move qpnp-power-on driver as input driver
Move qpnp-power-on driver as input driver, also update regulator related api in order to accomodate regualtor framework Signed-off-by: Jigarkumar Kishorkumar Zala <j_zala@codeaurora.org>
-rw-r--r--arch/arm64/configs/msm_defconfig1
-rw-r--r--drivers/input/Kconfig8
-rw-r--r--drivers/input/Makefile1
-rw-r--r--drivers/input/qpnp-power-on.c (renamed from drivers/platform/msm/qpnp-power-on.c)6
-rw-r--r--drivers/platform/msm/Kconfig15
-rw-r--r--drivers/platform/msm/Makefile2
-rw-r--r--drivers/soc/qcom/Kconfig8
-rw-r--r--drivers/soc/qcom/Makefile1
-rw-r--r--drivers/soc/qcom/qpnp-haptic.c (renamed from drivers/platform/msm/qpnp-haptic.c)0
9 files changed, 22 insertions, 20 deletions
diff --git a/arch/arm64/configs/msm_defconfig b/arch/arm64/configs/msm_defconfig
index 0b0a170c43f3..7ca4c51f5f93 100644
--- a/arch/arm64/configs/msm_defconfig
+++ b/arch/arm64/configs/msm_defconfig
@@ -102,6 +102,7 @@ CONFIG_VIRTIO_NET=y
CONFIG_SKY2=y
CONFIG_SMSC911X=y
# CONFIG_WLAN is not set
+CONFIG_QPNP_POWER_ON=y
CONFIG_INPUT_EVDEV=y
# CONFIG_SERIO_SERPORT is not set
CONFIG_SERIO_AMBAKMI=y
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index 2557dcda7621..9b8bcdffdfba 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -25,6 +25,14 @@ config INPUT
if INPUT
+config QPNP_POWER_ON
+ tristate "QPNP PMIC POWER-ON Driver"
+ depends on SPMI && ARCH_QCOM
+ help
+ This driver supports the power-on functionality on Qualcomm
+ PNP PMIC. It currently supports reporting the change in status of
+ the KPDPWR_N line (connected to the power-key).
+
config INPUT_LEDS
tristate "Export input device LEDs in sysfs"
depends on LEDS_CLASS
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 2a6d05ab9170..fd35ebf6acd9 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -7,6 +7,7 @@
obj-$(CONFIG_INPUT) += input-core.o
input-core-y := input.o input-compat.o input-mt.o ff-core.o
+obj-$(CONFIG_QPNP_POWER_ON) += qpnp-power-on.o
obj-$(CONFIG_INPUT_FF_MEMLESS) += ff-memless.o
obj-$(CONFIG_INPUT_POLLDEV) += input-polldev.o
obj-$(CONFIG_INPUT_SPARSEKMAP) += sparse-keymap.o
diff --git a/drivers/platform/msm/qpnp-power-on.c b/drivers/input/qpnp-power-on.c
index 135c484d071e..06b3fe5f27a6 100644
--- a/drivers/platform/msm/qpnp-power-on.c
+++ b/drivers/input/qpnp-power-on.c
@@ -621,7 +621,7 @@ static int qpnp_pon_get_trigger_config(enum pon_trigger_source pon_src,
return -ENODEV;
if (pon_src < PON_SMPL || pon_src > PON_KPDPWR_N) {
- dev_err(&pon->spmi->dev, "Invalid PON source\n");
+ dev_err(&pon->pdev->dev, "Invalid PON source\n");
return -EINVAL;
}
@@ -635,7 +635,7 @@ static int qpnp_pon_get_trigger_config(enum pon_trigger_source pon_src,
rc = regmap_read(pon->regmap, addr, &val);
if (rc)
- dev_err(&pon->spmi->dev,
+ dev_err(&pon->pdev->dev,
"Unable to read from addr=%hx, rc(%d)\n",
addr, rc);
else
@@ -1664,7 +1664,7 @@ static int pon_regulator_init(struct qpnp_pon *pon)
return rc;
}
- init_data = of_get_regulator_init_data(dev, node);
+ init_data = of_get_regulator_init_data(dev, node, &pon_reg->rdesc);
if (!init_data) {
dev_err(dev, "regulator init data is missing\n");
return -EINVAL;
diff --git a/drivers/platform/msm/Kconfig b/drivers/platform/msm/Kconfig
index 05f810c07c5c..fb795960580c 100644
--- a/drivers/platform/msm/Kconfig
+++ b/drivers/platform/msm/Kconfig
@@ -1,14 +1,6 @@
menu "Qualcomm MSM specific device drivers"
depends on ARCH_QCOM
-config QPNP_POWER_ON
- tristate "QPNP PMIC POWER-ON Driver"
- depends on SPMI && INPUT
- help
- This driver supports the power-on functionality on Qualcomm
- PNP PMIC. It currently supports reporting the change in status of
- the KPDPWR_N line (connected to the power-key).
-
config QPNP_REVID
tristate "QPNP Revision ID Peripheral"
depends on SPMI
@@ -28,13 +20,6 @@ config QPNP_COINCELL
maintain PMIC register state when the main battery is removed from the
mobile device.
-config QPNP_HAPTIC
- tristate "Haptic support for QPNP PMIC"
- help
- This option enables device driver support for the Haptic
- on the Qualcomm Technologies' QPNP PMICs. It uses the android
- timed-output framework.
-
config SPS
bool "SPS support"
select GENERIC_ALLOCATOR
diff --git a/drivers/platform/msm/Makefile b/drivers/platform/msm/Makefile
index 378dc9d8181b..879b425c43f6 100644
--- a/drivers/platform/msm/Makefile
+++ b/drivers/platform/msm/Makefile
@@ -1,9 +1,7 @@
#
# Makefile for the MSM specific device drivers.
#
-obj-$(CONFIG_QPNP_POWER_ON) += qpnp-power-on.o
obj-$(CONFIG_QPNP_REVID) += qpnp-revid.o
obj-$(CONFIG_QPNP_COINCELL) += qpnp-coincell.o
-obj-$(CONFIG_QPNP_HAPTIC) += qpnp-haptic.o
obj-$(CONFIG_SPS) += sps/
obj-$(CONFIG_GPIO_USB_DETECT) += gpio-usbdetect.o
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 0ac12d7b96b0..a3dd60ac6e1c 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -10,6 +10,14 @@ config MSM_SMEM
processors in the System on a Chip (SoC) which allows basic
inter-processor communication.
+config QPNP_HAPTIC
+ tristate "Haptic support for QPNP PMIC"
+ depends on ARCH_QCOM
+ help
+ This option enables device driver support for the Haptic
+ on the Qualcomm Technologies' QPNP PMICs. It uses the android
+ timed-output framework.
+
config MSM_SMD
depends on MSM_SMEM
bool "MSM Shared Memory Driver (SMD)"
diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile
index fc97af11a319..863424e91f7b 100644
--- a/drivers/soc/qcom/Makefile
+++ b/drivers/soc/qcom/Makefile
@@ -35,6 +35,7 @@ ifdef CONFIG_MSM_SUBSYSTEM_RESTART
obj-y += ramdump.o
endif
+obj-$(CONFIG_QPNP_HAPTIC) += qpnp-haptic.o
obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o
obj-$(CONFIG_QCOM_PM) += spm.o
obj-$(CONFIG_QCOM_SMD) += smd.o
diff --git a/drivers/platform/msm/qpnp-haptic.c b/drivers/soc/qcom/qpnp-haptic.c
index 21387568fe53..21387568fe53 100644
--- a/drivers/platform/msm/qpnp-haptic.c
+++ b/drivers/soc/qcom/qpnp-haptic.c