linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Rétornaz" <philippe.retornaz@epfl.ch>
To: s.hauer@pengutronix.de
Cc: linux-arm-kernel@lists.infradead.org, dmitry.torokhov@gmail.com,
	sameo@linux.intel.com, linux-input@vger.kernel.org,
	broonie@opensource.wolfsonmicro.com,
	u.kleine-koenig@pengutronix.de, philippe.retornaz@epfl.ch
Subject: [PATCH 3/3] mc13xxx: implicitly enable leds and buttons
Date: Sun, 10 Jul 2011 01:06:36 +0200	[thread overview]
Message-ID: <1310252796-10596-4-git-send-email-philippe.retornaz@epfl.ch> (raw)
In-Reply-To: <1310252796-10596-3-git-send-email-philippe.retornaz@epfl.ch>

The leds and buttons subdevices cannot be used without additional
platform data.

Use the presence of the platform data to enable the device instead
of an additional flag.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
---
 arch/arm/mach-imx/mach-mx31moboard.c |    2 +-
 drivers/mfd/mc13xxx-core.c           |    4 ++--
 include/linux/mfd/mc13783.h          |    1 -
 include/linux/mfd/mc13xxx.h          |    2 --
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 447143b..c4cd6b8 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -279,7 +279,7 @@ static struct mc13xxx_platform_data moboard_pmic = {
 	.leds = &moboard_leds,
 	.buttons = &moboard_buttons,
 	.flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC |
-		MC13XXX_USE_ADC | MC13XXX_USE_LED | MC13XXX_USE_BUTTON,
+		MC13XXX_USE_ADC,
 };
 
 static struct spi_board_info moboard_spi_board_info[] __initdata = {
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 44edf78..130781f 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -774,11 +774,11 @@ err_revision:
 	if (pdata->flags & MC13XXX_USE_TOUCHSCREEN)
 		mc13xxx_add_subdevice(mc13xxx, "%s-ts");
 
-	if (pdata->flags & MC13XXX_USE_LED)
+	if (pdata->leds)
 		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
 				pdata->leds, sizeof(*pdata->leds));
 
-	if (pdata->flags & MC13XXX_USE_BUTTON)
+	if (pdata->buttons)
 		mc13xxx_add_subdevice_pdata(mc13xxx, "%s-pwrbutton",
 				pdata->buttons, sizeof(*pdata->buttons));
 
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h
index bd4fbac..61dca4c 100644
--- a/include/linux/mfd/mc13783.h
+++ b/include/linux/mfd/mc13783.h
@@ -114,7 +114,6 @@ static inline int mc13783_irq_ack(struct mc13783 *mc13783, int irq)
 #define MC13783_USE_ADC		MC13XXX_USE_ADC
 #define MC13783_USE_RTC		MC13XXX_USE_RTC
 #define MC13783_USE_REGULATOR	MC13XXX_USE_REGULATOR
-#define MC13783_USE_LED		MC13XXX_USE_LED
 
 #define MC13783_ADC_MODE_TS		1
 #define MC13783_ADC_MODE_SINGLE_CHAN	2
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index 22d8930..6c4b854 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -159,8 +159,6 @@ struct mc13xxx_platform_data {
 #define MC13XXX_USE_ADC		(1 << 2)
 #define MC13XXX_USE_RTC		(1 << 3)
 #define MC13XXX_USE_REGULATOR	(1 << 4)
-#define MC13XXX_USE_LED		(1 << 5)
-#define MC13XXX_USE_BUTTON	(1 << 6)
 	unsigned int flags;
 
 	struct mc13xxx_regulator_platform_data regulators;
-- 
1.6.3.3

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

  reply	other threads:[~2011-07-09 22:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-09 23:06 [PATCH v3 0/3] mc13783: add pwr button support Philippe Rétornaz
2011-07-09 23:06 ` [PATCH 1/3] mc13783: add power " Philippe Rétornaz
2011-07-09 23:06   ` [PATCH 2/3] mx31moboard: Add MC13783 " Philippe Rétornaz
2011-07-09 23:06     ` Philippe Rétornaz [this message]
2011-07-10  8:04       ` [PATCH 3/3] mc13xxx: implicitly enable leds and buttons Uwe Kleine-König
2011-07-10  8:37         ` Mark Brown
2011-07-10 11:33         ` Philippe Rétornaz
2011-07-10 14:15           ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310252796-10596-4-git-send-email-philippe.retornaz@epfl.ch \
    --to=philippe.retornaz@epfl.ch \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).