devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device
@ 2013-03-01 12:07 Linus Walleij
  2013-03-22  8:14 ` Linus Walleij
       [not found] ` <1362139646-23613-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2013-03-01 12:07 UTC (permalink / raw)
  To: Samuel Ortiz, linux-kernel
  Cc: Anmar Oueja, Gabriel Fernandez, devicetree-discuss, Linus Walleij

From: Gabriel Fernandez <gabriel.fernandez@stericsson.com>

This patch augments the STMP driver to read the device id
from the stmpe-i2c dt alias if present.

Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mfd/stmpe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index e550dcb..bc85877 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1015,7 +1015,10 @@ void stmpe_of_probe(struct stmpe_platform_data *pdata, struct device_node *np)
 {
 	struct device_node *child;
 
-	pdata->id = -1;
+	pdata->id = of_alias_get_id(np, "stmpe-i2c");
+	if (pdata->id < 0)
+		pdata->id = -1;
+
 	pdata->irq_trigger = IRQF_TRIGGER_NONE;
 
 	of_property_read_u32(np, "st,autosleep-timeout",
-- 
1.7.11.3

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

* Re: [PATCH 2/2] mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device
  2013-03-01 12:07 [PATCH 2/2] mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device Linus Walleij
@ 2013-03-22  8:14 ` Linus Walleij
       [not found] ` <1362139646-23613-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-03-22  8:14 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Samuel Ortiz, linux-kernel, Anmar Oueja, Gabriel Fernandez,
	devicetree-discuss

On Fri, Mar 1, 2013 at 1:07 PM, Linus Walleij
<linus.walleij@stericsson.com> wrote:

> From: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
>
> This patch augments the STMP driver to read the device id
> from the stmpe-i2c dt alias if present.
>
> Cc: devicetree-discuss@lists.ozlabs.org
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Hi Sam,

ping on this!

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device
       [not found] ` <1362139646-23613-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
@ 2013-04-05 16:07   ` Samuel Ortiz
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2013-04-05 16:07 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Anmar Oueja, Gabriel Fernandez,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hi Linus,

On Fri, Mar 01, 2013 at 01:07:26PM +0100, Linus Walleij wrote:
> From: Gabriel Fernandez <gabriel.fernandez-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> 
> This patch augments the STMP driver to read the device id
> from the stmpe-i2c dt alias if present.
> 
> Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  drivers/mfd/stmpe.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
Applied to mfd-next as well.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2013-04-05 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 12:07 [PATCH 2/2] mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device Linus Walleij
2013-03-22  8:14 ` Linus Walleij
     [not found] ` <1362139646-23613-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2013-04-05 16:07   ` Samuel Ortiz

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