linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] input: mc13783: Add MC13892 support
@ 2014-02-10  4:22 Alexander Shiyan
  2014-02-10 11:23 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2014-02-10  4:22 UTC (permalink / raw)
  To: linux-input
  Cc: Dmitry Torokhov, Shawn Guo, Sascha Hauer, Samuel Ortiz, Lee Jones,
	Alexander Shiyan

This patch adds support for MC13892 PMIC to mc13783-pwrbutton driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/input/misc/Kconfig             | 4 ++--
 drivers/input/misc/mc13783-pwrbutton.c | 8 ++++++++
 include/linux/mfd/mc13892.h            | 4 ++++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 7904ab0..3d91660 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -167,10 +167,10 @@ config INPUT_MAX8997_HAPTIC
 	  module will be called max8997-haptic.
 
 config INPUT_MC13783_PWRBUTTON
-	tristate "MC13783 ON buttons"
+	tristate "MC13783/MC13892 ON buttons"
 	depends on MFD_MC13XXX
 	help
-	  Support the ON buttons of MC13783 PMIC as an input device
+	  Support the ON buttons of MC13783/MC13892 PMIC as an input device
 	  reporting power button status.
 
 	  To compile this driver as a module, choose M here: the module
diff --git a/drivers/input/misc/mc13783-pwrbutton.c b/drivers/input/misc/mc13783-pwrbutton.c
index f9e2bfb..03308b0 100644
--- a/drivers/input/misc/mc13783-pwrbutton.c
+++ b/drivers/input/misc/mc13783-pwrbutton.c
@@ -25,6 +25,7 @@
 #include <linux/input.h>
 #include <linux/platform_device.h>
 #include <linux/mfd/mc13783.h>
+#include <linux/mfd/mc13892.h>
 
 struct mc13xxx_button_def {
 	unsigned int	irq;
@@ -175,8 +176,15 @@ static const struct mc13xxx_pwrb_devtype mc13783_pwrb_devtype = {
 	.btn_def[2] = { MC13783_IRQ_ONOFD3, BIT(5), },
 };
 
+static const struct mc13xxx_pwrb_devtype mc13892_pwrb_devtype = {
+	.btn_def[0] = { MC13892_IRQ_ONOFD1, BIT(3), },
+	.btn_def[1] = { MC13892_IRQ_ONOFD2, BIT(4), },
+	.btn_def[2] = { MC13892_IRQ_ONOFD3, BIT(2), },
+};
+
 static const struct platform_device_id mc13xxx_pwrbutton_id_table[] = {
 	{ "mc13783-pwrbutton", (kernel_ulong_t)&mc13783_pwrb_devtype },
+	{ "mc13892-pwrbutton", (kernel_ulong_t)&mc13892_pwrb_devtype },
 	{ }
 };
 MODULE_DEVICE_TABLE(platform, mc13xxx_pwrbutton_id_table);
diff --git a/include/linux/mfd/mc13892.h b/include/linux/mfd/mc13892.h
index a00f2be..bdc3baf 100644
--- a/include/linux/mfd/mc13892.h
+++ b/include/linux/mfd/mc13892.h
@@ -36,4 +36,8 @@
 #define MC13892_PWGT2SPI	22
 #define MC13892_VCOINCELL	23
 
+#define MC13892_IRQ_ONOFD3	26
+#define MC13892_IRQ_ONOFD1	27
+#define MC13892_IRQ_ONOFD2	28
+
 #endif
-- 
1.8.3.2


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

* Re: [PATCH 4/4] input: mc13783: Add MC13892 support
  2014-02-10  4:22 [PATCH 4/4] input: mc13783: Add MC13892 support Alexander Shiyan
@ 2014-02-10 11:23 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2014-02-10 11:23 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: linux-input, Dmitry Torokhov, Shawn Guo, Sascha Hauer,
	Samuel Ortiz

> This patch adds support for MC13892 PMIC to mc13783-pwrbutton driver.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/input/misc/Kconfig             | 4 ++--
>  drivers/input/misc/mc13783-pwrbutton.c | 8 ++++++++
>  include/linux/mfd/mc13892.h            | 4 ++++

For the MFD changes:
  Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-02-10 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10  4:22 [PATCH 4/4] input: mc13783: Add MC13892 support Alexander Shiyan
2014-02-10 11:23 ` Lee Jones

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).