From patchwork Fri Mar 1 12:07:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 15195 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 49DA323E24 for ; Fri, 1 Mar 2013 12:07:49 +0000 (UTC) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 07ED1A19157 for ; Fri, 1 Mar 2013 12:07:48 +0000 (UTC) Received: by mail-vc0-f180.google.com with SMTP id fo13so1916494vcb.11 for ; Fri, 01 Mar 2013 04:07:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=R0+tF/LNwgM8rg5xPGPpP5fhN5rEdMn3ne5slcxQ8IM=; b=Ig61q+T4HG3LEXSqnouzfRDneAkFEA5VyRI8DsRp1R2WLll6mRqxVjwceZEUuAv5D5 CDhUV5owsOt6r1FgkVHMpkKwmP419VqsGXL6uEcDLOSYDHu7xQbw++JolRlsdolvM3kd VeeHBGqIQYTyx4Z5LruUNObbkUyloYiiMtQAAOSHsz3TV5hsNW2EehbEH/6bs3uHYjNu j9ityzCsS1VwThJ9BaNYl9bX4zZx159dX2XrpLW7dOm+bulB+Hch70+ZlGPjo3qv/3JV E4KUVIuE8lcvnUg70q23VaAOUrgjowyUQ78n/W2ArxLKBZKtTb/3VBCP6DySn+tsoVjx JSEA== X-Received: by 10.52.18.148 with SMTP id w20mr3473571vdd.8.1362139668509; Fri, 01 Mar 2013 04:07:48 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp28495veb; Fri, 1 Mar 2013 04:07:48 -0800 (PST) X-Received: by 10.14.223.199 with SMTP id v47mr27282402eep.18.1362139667634; Fri, 01 Mar 2013 04:07:47 -0800 (PST) Received: from eu1sys200aog108.obsmtp.com (eu1sys200aog108.obsmtp.com [207.126.144.125]) by mx.google.com with SMTP id g1si18131332eeo.141.2013.03.01.04.07.38 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 01 Mar 2013 04:07:47 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.125 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.125; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.125 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUTCaCj8QWSg4rAT/1fti5/Yak60ecsRe@postini.com; Fri, 01 Mar 2013 12:07:47 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 5CF57EC; Fri, 1 Mar 2013 11:59:25 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 13133FB6; Fri, 1 Mar 2013 12:07:34 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 3DD5724C07C; Fri, 1 Mar 2013 13:07:27 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 1 Mar 2013 13:07:33 +0100 From: Linus Walleij To: Samuel Ortiz , Cc: Anmar Oueja , Gabriel Fernandez , , Linus Walleij Subject: [PATCH 2/2] mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device Date: Fri, 1 Mar 2013 13:07:26 +0100 Message-ID: <1362139646-23613-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmxIQbq07eiEC0JdXMvpxa1EXKXgStqjKrT1M9tIsNxktRgxhBw8ulNYotrEyrD1Ls5UbBM From: Gabriel Fernandez 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 Signed-off-by: Linus Walleij --- 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",