LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 0/2] Qualcomm PM8941 power key driver
@ 2015-01-24  0:19 Bjorn Andersson
  2015-01-24  0:19 ` [PATCH v2 1/2] input: Add " Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bjorn Andersson @ 2015-01-24  0:19 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Grant Likely, devicetree, linux-kernel, linux-input,
	linux-arm-msm

These patches add dt bindings and a device driver for the power key block in
the Qualcomm PM8941 pmic.

Changes since v1:
 * Use a reboot_notifier to set power off/reboot mode
 * Use irq flags from devicetree
 * Some style fixes

Courtney Cavin (2):
  input: Add Qualcomm PM8941 power key driver
  input: pm8941-pwrkey: Add DT binding documentation

 .../bindings/input/qcom,pm8941-pwrkey.txt          |  43 ++++
 drivers/input/misc/Kconfig                         |  12 +
 drivers/input/misc/Makefile                        |   1 +
 drivers/input/misc/pm8941-pwrkey.c                 | 281 +++++++++++++++++++++
 4 files changed, 337 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
 create mode 100644 drivers/input/misc/pm8941-pwrkey.c

-- 
1.9.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] input: Add Qualcomm PM8941 power key driver
  2015-01-24  0:19 [PATCH v2 0/2] Qualcomm PM8941 power key driver Bjorn Andersson
@ 2015-01-24  0:19 ` Bjorn Andersson
  2015-09-15 11:36   ` Ivan T. Ivanov
  2015-01-24  0:19 ` [PATCH v2 2/2] input: pm8941-pwrkey: Add DT binding documentation Bjorn Andersson
  2015-02-16  9:55 ` [PATCH v2 0/2] Qualcomm PM8941 power key driver Ivan T. Ivanov
  2 siblings, 1 reply; 8+ messages in thread
From: Bjorn Andersson @ 2015-01-24  0:19 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring
  Cc: Pawel Moll, Mark Rutland, Ian Campbell, Grant Likely, devicetree,
	linux-kernel, linux-input, linux-arm-msm, Courtney Cavin

From: Courtney Cavin <courtney.cavin@sonymobile.com>

Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
 drivers/input/misc/Kconfig         |  12 ++
 drivers/input/misc/Makefile        |   1 +
 drivers/input/misc/pm8941-pwrkey.c | 281 +++++++++++++++++++++++++++++++++++++
 3 files changed, 294 insertions(+)
 create mode 100644 drivers/input/misc/pm8941-pwrkey.c

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 23297ab..3306592 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -105,6 +105,18 @@ config INPUT_PCSPKR
 	  To compile this driver as a module, choose M here: the
 	  module will be called pcspkr.
 
+config INPUT_PM8941_PWRKEY
+	tristate "Qualcomm PM8941 power key support"
+	depends on MFD_SPMI_PMIC
+	help
+	  Say Y here if you want support for the power key usually found
+	  on boards using a Qualcomm PM8941 compatible PMIC.
+
+	  If unsure, say Y.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called pm8941-pwrkey.
+
 config INPUT_PM8XXX_VIBRATOR
 	tristate "Qualcomm PM8XXX vibrator support"
 	depends on MFD_PM8XXX
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index 19c7603..c44f6c2 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -48,6 +48,7 @@ obj-$(CONFIG_INPUT_PCAP)		+= pcap_keys.o
 obj-$(CONFIG_INPUT_PCF50633_PMU)	+= pcf50633-input.o
 obj-$(CONFIG_INPUT_PCF8574)		+= pcf8574_keypad.o
 obj-$(CONFIG_INPUT_PCSPKR)		+= pcspkr.o
+obj-$(CONFIG_INPUT_PM8941_PWRKEY)	+= pm8941-pwrkey.o
 obj-$(CONFIG_INPUT_PM8XXX_VIBRATOR)	+= pm8xxx-vibrator.o
 obj-$(CONFIG_INPUT_PMIC8XXX_PWRKEY)	+= pmic8xxx-pwrkey.o
 obj-$(CONFIG_INPUT_POWERMATE)		+= powermate.o
diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
new file mode 100644
index 0000000..bc7ba8f
--- /dev/null
+++ b/drivers/input/misc/pm8941-pwrkey.c
@@ -0,0 +1,281 @@
+/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2014, Sony Mobile Communications Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/log2.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/reboot.h>
+#include <linux/regmap.h>
+
+#define PON_REV2			0x01
+
+#define PON_RT_STS			0x10
+#define  PON_KPDPWR_N_SET		BIT(0)
+
+#define PON_PS_HOLD_RST_CTL		0x5a
+#define PON_PS_HOLD_RST_CTL2		0x5b
+#define  PON_PS_HOLD_ENABLE		BIT(7)
+#define  PON_PS_HOLD_TYPE_MASK		0x0f
+#define  PON_PS_HOLD_TYPE_SHUTDOWN	4
+#define  PON_PS_HOLD_TYPE_HARD_RESET	7
+
+#define PON_PULL_CTL			0x70
+#define  PON_KPDPWR_PULL_UP		BIT(1)
+
+#define PON_DBC_CTL			0x71
+#define  PON_DBC_DELAY_MASK		0x7
+
+
+struct pm8941_pwrkey {
+	struct device *dev;
+	int irq;
+	u32 baseaddr;
+	struct regmap *regmap;
+	struct input_dev *input;
+
+	unsigned int revision;
+	struct notifier_block reboot_notifier;
+};
+
+static int pm8941_reboot_notify(struct notifier_block *nb,
+				unsigned long code, void *unused)
+{
+	struct pm8941_pwrkey *pwrkey = container_of(nb, struct pm8941_pwrkey,
+						    reboot_notifier);
+	unsigned int enable_reg;
+	unsigned int reset_type;
+	int rc;
+
+	/* PMICs with revision 0 have the enable bit in same register as ctrl */
+	if (pwrkey->revision == 0)
+		enable_reg = PON_PS_HOLD_RST_CTL;
+	else
+		enable_reg = PON_PS_HOLD_RST_CTL2;
+
+	rc = regmap_update_bits(pwrkey->regmap, pwrkey->baseaddr + enable_reg,
+				PON_PS_HOLD_ENABLE, 0);
+	if (rc)
+		dev_err(pwrkey->dev, "unable to clear ps hold reset enable\n");
+
+	/*
+	 * Updates of PON_PS_HOLD_ENABLE requires 3 sleep cycles between
+	 * writes.
+	 */
+	usleep_range(100, 1000);
+
+	switch (code) {
+	case SYS_HALT:
+	case SYS_POWER_OFF:
+		reset_type = PON_PS_HOLD_TYPE_SHUTDOWN;
+		break;
+	case SYS_RESTART:
+	default:
+		reset_type = PON_PS_HOLD_TYPE_HARD_RESET;
+		break;
+	};
+
+	rc = regmap_update_bits(pwrkey->regmap,
+				pwrkey->baseaddr + PON_PS_HOLD_RST_CTL,
+				PON_PS_HOLD_TYPE_MASK, reset_type);
+	if (rc)
+		dev_err(pwrkey->dev, "unable to set ps hold reset type\n");
+
+	rc = regmap_update_bits(pwrkey->regmap, pwrkey->baseaddr + enable_reg,
+				PON_PS_HOLD_ENABLE, PON_PS_HOLD_ENABLE);
+	if (rc)
+		dev_err(pwrkey->dev, "unable to re-set enable\n");
+
+	return NOTIFY_DONE;
+}
+
+static irqreturn_t pm8941_pwrkey_irq(int irq, void *_data)
+{
+	struct pm8941_pwrkey *pwrkey = _data;
+	unsigned int sts;
+	int rc;
+
+	rc = regmap_read(pwrkey->regmap, pwrkey->baseaddr + PON_RT_STS, &sts);
+	if (rc)
+		return IRQ_HANDLED;
+
+	input_report_key(pwrkey->input, KEY_POWER, !!(sts & PON_KPDPWR_N_SET));
+	input_sync(pwrkey->input);
+
+	return IRQ_HANDLED;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int pm8941_pwrkey_suspend(struct device *dev)
+{
+	struct pm8941_pwrkey *pwrkey = dev_get_drvdata(dev);
+
+	if (device_may_wakeup(dev))
+		enable_irq_wake(pwrkey->irq);
+
+	return 0;
+}
+
+static int pm8941_pwrkey_resume(struct device *dev)
+{
+	struct pm8941_pwrkey *pwrkey = dev_get_drvdata(dev);
+
+	if (device_may_wakeup(dev))
+		disable_irq_wake(pwrkey->irq);
+
+	return 0;
+}
+#endif
+
+static SIMPLE_DEV_PM_OPS(pm8941_pwr_key_pm_ops,
+		pm8941_pwrkey_suspend, pm8941_pwrkey_resume);
+
+static int pm8941_pwrkey_probe(struct platform_device *pdev)
+{
+	struct pm8941_pwrkey *pwrkey;
+	bool pull_up;
+	u32 req_delay;
+	int rc;
+
+	if (of_property_read_u32(pdev->dev.of_node, "debounce", &req_delay))
+		req_delay = 15625;
+
+	if (req_delay > 2000000 || req_delay == 0) {
+		dev_err(&pdev->dev, "invalid debounce time: %u\n", req_delay);
+		return -EINVAL;
+	}
+
+	pull_up = of_property_read_bool(pdev->dev.of_node, "bias-pull-up");
+
+	pwrkey = devm_kzalloc(&pdev->dev, sizeof(*pwrkey), GFP_KERNEL);
+	if (!pwrkey)
+		return -ENOMEM;
+
+	pwrkey->dev = &pdev->dev;
+
+	pwrkey->regmap = dev_get_regmap(pdev->dev.parent, NULL);
+	if (!pwrkey->regmap) {
+		dev_err(&pdev->dev, "failed to locate regmap\n");
+		return -ENODEV;
+	}
+
+	pwrkey->irq = platform_get_irq(pdev, 0);
+	if (pwrkey->irq < 0) {
+		dev_err(&pdev->dev, "failed to get irq\n");
+		return pwrkey->irq;
+	}
+
+	rc = of_property_read_u32(pdev->dev.of_node, "reg", &pwrkey->baseaddr);
+	if (rc)
+		return rc;
+
+	rc = regmap_read(pwrkey->regmap, pwrkey->baseaddr + PON_REV2,
+			 &pwrkey->revision);
+	if (rc) {
+		dev_err(&pdev->dev, "failed to set debounce: %d\n", rc);
+		return rc;
+	}
+
+	pwrkey->input = devm_input_allocate_device(&pdev->dev);
+	if (!pwrkey->input) {
+		dev_dbg(&pdev->dev, "unable to allocate input device\n");
+		return -ENOMEM;
+	}
+
+	input_set_capability(pwrkey->input, EV_KEY, KEY_POWER);
+
+	pwrkey->input->name = "pm8941_pwrkey";
+	pwrkey->input->phys = "pm8941_pwrkey/input0";
+
+	req_delay = (req_delay << 6) / USEC_PER_SEC;
+	req_delay = ilog2(req_delay);
+
+	rc = regmap_update_bits(pwrkey->regmap, pwrkey->baseaddr + PON_DBC_CTL,
+			PON_DBC_DELAY_MASK, req_delay);
+	if (rc) {
+		dev_err(&pdev->dev, "failed to set debounce: %d\n", rc);
+		return rc;
+	}
+
+	rc = regmap_update_bits(pwrkey->regmap,
+			pwrkey->baseaddr + PON_PULL_CTL, PON_KPDPWR_PULL_UP,
+			pull_up ? PON_KPDPWR_PULL_UP : 0);
+	if (rc) {
+		dev_err(&pdev->dev, "failed to set pull: %d\n", rc);
+		return rc;
+	}
+
+	rc = devm_request_threaded_irq(&pdev->dev, pwrkey->irq,
+				NULL, pm8941_pwrkey_irq,
+				IRQF_ONESHOT,
+				"pm8941_pwrkey", pwrkey);
+	if (rc) {
+		dev_err(&pdev->dev, "failed requesting IRQ: %d\n", rc);
+		return rc;
+	}
+
+	rc = input_register_device(pwrkey->input);
+	if (rc) {
+		dev_err(&pdev->dev, "failed to register input device: %d\n",
+			rc);
+		return rc;
+	}
+
+	pwrkey->reboot_notifier.notifier_call = pm8941_reboot_notify,
+	rc = register_reboot_notifier(&pwrkey->reboot_notifier);
+	if (rc) {
+		dev_err(&pdev->dev, "failed to register reboot notifier: %d\n",
+			rc);
+		return rc;
+	}
+
+	platform_set_drvdata(pdev, pwrkey);
+	device_init_wakeup(&pdev->dev, 1);
+
+	return 0;
+}
+
+static int pm8941_pwrkey_remove(struct platform_device *pdev)
+{
+	struct pm8941_pwrkey *pwrkey = platform_get_drvdata(pdev);
+
+	device_init_wakeup(&pdev->dev, 0);
+	unregister_reboot_notifier(&pwrkey->reboot_notifier);
+
+	return 0;
+}
+
+static const struct of_device_id pm8941_pwr_key_id_table[] = {
+	{ .compatible = "qcom,pm8941-pwrkey" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table);
+
+static struct platform_driver pm8941_pwrkey_driver = {
+	.probe = pm8941_pwrkey_probe,
+	.remove = pm8941_pwrkey_remove,
+	.driver = {
+		.name = "pm8941-pwrkey",
+		.pm = &pm8941_pwr_key_pm_ops,
+		.of_match_table = of_match_ptr(pm8941_pwr_key_id_table),
+	},
+};
+module_platform_driver(pm8941_pwrkey_driver);
+
+MODULE_DESCRIPTION("PM8941 Power Key driver");
+MODULE_LICENSE("GPL v2");
-- 
1.9.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] input: pm8941-pwrkey: Add DT binding documentation
  2015-01-24  0:19 [PATCH v2 0/2] Qualcomm PM8941 power key driver Bjorn Andersson
  2015-01-24  0:19 ` [PATCH v2 1/2] input: Add " Bjorn Andersson
@ 2015-01-24  0:19 ` Bjorn Andersson
  2015-02-16  9:55 ` [PATCH v2 0/2] Qualcomm PM8941 power key driver Ivan T. Ivanov
  2 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2015-01-24  0:19 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Grant Likely
  Cc: devicetree, linux-kernel, linux-input, linux-arm-msm, Courtney Cavin

From: Courtney Cavin <courtney.cavin@sonymobile.com>

Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
 .../bindings/input/qcom,pm8941-pwrkey.txt          | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt

diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
new file mode 100644
index 0000000..07bf55f
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
@@ -0,0 +1,43 @@
+Qualcomm PM8941 PMIC Power Key
+
+PROPERTIES
+
+- compatible:
+	Usage: required
+	Value type: <string>
+	Definition: must be one of:
+		    "qcom,pm8941-pwrkey"
+
+- reg:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: base address of registers for block
+
+- interrupts:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: key change interrupt; The format of the specifier is
+		    defined by the binding document describing the node's
+		    interrupt parent.
+
+- debounce:
+	Usage: optional
+	Value type: <u32>
+	Definition: time in microseconds that key must be pressed or released
+		    for state change interrupt to trigger.
+
+- bias-pull-up:
+	Usage: optional
+	Value type: <empty>
+	Definition: presence of this property indicates that the KPDPWR_N pin
+		    should be configured for pull up.
+
+EXAMPLE
+
+	pwrkey@800 {
+		compatible = "qcom,pm8941-pwrkey";
+		reg = <0x800>;
+		interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+		debounce = <15625>;
+		bias-pull-up;
+	};
-- 
1.9.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] Qualcomm PM8941 power key driver
  2015-01-24  0:19 [PATCH v2 0/2] Qualcomm PM8941 power key driver Bjorn Andersson
  2015-01-24  0:19 ` [PATCH v2 1/2] input: Add " Bjorn Andersson
  2015-01-24  0:19 ` [PATCH v2 2/2] input: pm8941-pwrkey: Add DT binding documentation Bjorn Andersson
@ 2015-02-16  9:55 ` Ivan T. Ivanov
  2015-03-20  1:54   ` Bjorn Andersson
  2 siblings, 1 reply; 8+ messages in thread
From: Ivan T. Ivanov @ 2015-02-16  9:55 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Dmitry Torokhov, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Grant Likely, devicetree, linux-kernel,
	linux-input, linux-arm-msm


On Fri, 2015-01-23 at 16:19 -0800, Bjorn Andersson wrote:
> These patches add dt bindings and a device driver for the power key block in
> the Qualcomm PM8941 pmic.
> 
> Changes since v1:
>  * Use a reboot_notifier to set power off/reboot mode
>  * Use irq flags from devicetree
>  * Some style fixes
> 
> Courtney Cavin (2):
>   input: Add Qualcomm PM8941 power key driver
>   input: pm8941-pwrkey: Add DT binding documentation

Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com>

Thanks.

> 
>  .../bindings/input/qcom,pm8941-pwrkey.txt          |  43 ++++
>  drivers/input/misc/Kconfig                         |  12 +
>  drivers/input/misc/Makefile                        |   1 +
>  drivers/input/misc/pm8941-pwrkey.c                 | 281 +++++++++++++++++++++
>  4 files changed, 337 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
>  create mode 100644 drivers/input/misc/pm8941-pwrkey.c
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] Qualcomm PM8941 power key driver
  2015-02-16  9:55 ` [PATCH v2 0/2] Qualcomm PM8941 power key driver Ivan T. Ivanov
@ 2015-03-20  1:54   ` Bjorn Andersson
  2015-03-24 18:42     ` Dmitry Torokhov
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Andersson @ 2015-03-20  1:54 UTC (permalink / raw)
  To: Ivan T. Ivanov, Dmitry Torokhov
  Cc: Bjorn Andersson, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Grant Likely, devicetree, linux-kernel,
	linux-input, linux-arm-msm

On Mon, Feb 16, 2015 at 10:55 AM, Ivan T. Ivanov <iivanov@mm-sol.com> wrote:
>
> On Fri, 2015-01-23 at 16:19 -0800, Bjorn Andersson wrote:
>> These patches add dt bindings and a device driver for the power key block in
>> the Qualcomm PM8941 pmic.
>>
>> Changes since v1:
>>  * Use a reboot_notifier to set power off/reboot mode
>>  * Use irq flags from devicetree
>>  * Some style fixes
>>
>> Courtney Cavin (2):
>>   input: Add Qualcomm PM8941 power key driver
>>   input: pm8941-pwrkey: Add DT binding documentation
>
> Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com>
>

Thanks for your testing Ivan.

Dmitry, can you apply this? (It still applies cleanly to linux-next)

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] Qualcomm PM8941 power key driver
  2015-03-20  1:54   ` Bjorn Andersson
@ 2015-03-24 18:42     ` Dmitry Torokhov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2015-03-24 18:42 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Ivan T. Ivanov, Bjorn Andersson, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Grant Likely, devicetree,
	linux-kernel, linux-input, linux-arm-msm

On Fri, Mar 20, 2015 at 02:54:33AM +0100, Bjorn Andersson wrote:
> On Mon, Feb 16, 2015 at 10:55 AM, Ivan T. Ivanov <iivanov@mm-sol.com> wrote:
> >
> > On Fri, 2015-01-23 at 16:19 -0800, Bjorn Andersson wrote:
> >> These patches add dt bindings and a device driver for the power key block in
> >> the Qualcomm PM8941 pmic.
> >>
> >> Changes since v1:
> >>  * Use a reboot_notifier to set power off/reboot mode
> >>  * Use irq flags from devicetree
> >>  * Some style fixes
> >>
> >> Courtney Cavin (2):
> >>   input: Add Qualcomm PM8941 power key driver
> >>   input: pm8941-pwrkey: Add DT binding documentation
> >
> > Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com>
> >
> 
> Thanks for your testing Ivan.
> 
> Dmitry, can you apply this? (It still applies cleanly to linux-next)
> 

Queued for 4.1, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] input: Add Qualcomm PM8941 power key driver
  2015-01-24  0:19 ` [PATCH v2 1/2] input: Add " Bjorn Andersson
@ 2015-09-15 11:36   ` Ivan T. Ivanov
  2015-09-21  4:48     ` Bjorn Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: Ivan T. Ivanov @ 2015-09-15 11:36 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Courtney Cavin, Dmitry Torokhov, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Grant Likely, devicetree,
	linux-kernel, linux-input, linux-arm-msm


On Fri, 2015-01-23 at 16:19 -0800, Bjorn Andersson wrote:
> From: Courtney Cavin cavin@sonymobile.com>
> 
> Signed-off-by: Courtney Cavin cavin@sonymobile.com>
> Signed-off-by: Bjorn Andersson andersson@sonymobile.com>
> 

<snip>

> 
> +config INPUT_PM8941_PWRKEY
> +       tristate "Qualcomm PM8941 power key support"
> +       depends on MFD_SPMI_PMIC
> +       help
> +                       Say Y here if you want support for the power key usually found
> +                       on boards using a Qualcomm PM8941 compatible PMIC.
> +

Hi Bjorn, Courtney, 

Do you plan to extend this driver to support RESIN_N PMIC input?
 
It looks like the same downstream "qcom,qpnp-power-on" handle
this functionality for recent PMIC versions.

What will be the best way to add this new functionality, extend
this driver, write new one...?

Regards,
Ivan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] input: Add Qualcomm PM8941 power key driver
  2015-09-15 11:36   ` Ivan T. Ivanov
@ 2015-09-21  4:48     ` Bjorn Andersson
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2015-09-21  4:48 UTC (permalink / raw)
  To: Ivan T. Ivanov
  Cc: Cavin, Courtney, Dmitry Torokhov, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Grant Likely, devicetree,
	linux-kernel, linux-input, linux-arm-msm

On Tue 15 Sep 04:36 PDT 2015, Ivan T. Ivanov wrote:

> 
> On Fri, 2015-01-23 at 16:19 -0800, Bjorn Andersson wrote:
> > From: Courtney Cavin cavin@sonymobile.com>
> > 
> > Signed-off-by: Courtney Cavin cavin@sonymobile.com>
> > Signed-off-by: Bjorn Andersson andersson@sonymobile.com>
> > 
> 
> <snip>
> 
> > 
> > +config INPUT_PM8941_PWRKEY
> > +       tristate "Qualcomm PM8941 power key support"
> > +       depends on MFD_SPMI_PMIC
> > +       help
> > +                       Say Y here if you want support for the power key usually found
> > +                       on boards using a Qualcomm PM8941 compatible PMIC.
> > +
> 
> Hi Bjorn, Courtney, 
> 
> Do you plan to extend this driver to support RESIN_N PMIC input?
>  

It's way down on the todo-list, so not right now.

> It looks like the same downstream "qcom,qpnp-power-on" handle
> this functionality for recent PMIC versions.
> 

Right, it seems to be functionality in the PON block.

> What will be the best way to add this new functionality, extend
> this driver, write new one...?
> 

Perhaps the naming of the driver isn't the best in the end, but I think
it should be implemented by the same driver...

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-21  4:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24  0:19 [PATCH v2 0/2] Qualcomm PM8941 power key driver Bjorn Andersson
2015-01-24  0:19 ` [PATCH v2 1/2] input: Add " Bjorn Andersson
2015-09-15 11:36   ` Ivan T. Ivanov
2015-09-21  4:48     ` Bjorn Andersson
2015-01-24  0:19 ` [PATCH v2 2/2] input: pm8941-pwrkey: Add DT binding documentation Bjorn Andersson
2015-02-16  9:55 ` [PATCH v2 0/2] Qualcomm PM8941 power key driver Ivan T. Ivanov
2015-03-20  1:54   ` Bjorn Andersson
2015-03-24 18:42     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).