From patchwork Thu Sep 20 06:34:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1476431 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 842CADF283 for ; Wed, 19 Sep 2012 08:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755454Ab2ISIkA (ORCPT ); Wed, 19 Sep 2012 04:40:00 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:40397 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755441Ab2ISIjm (ORCPT ); Wed, 19 Sep 2012 04:39:42 -0400 Received: from sles11esa.localdomain (unknown [195.97.110.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: panto) by li42-95.members.linode.com (Postfix) with ESMTPSA id BBE049C0B8; Wed, 19 Sep 2012 08:39:39 +0000 (UTC) From: Pantelis Antoniou To: Shubhrajyoti D Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Porter , Koen Kooi , Benoit Cousson , Tony Lindgren , Pantelis Antoniou Subject: [PATCH 2/2] OMAP i2c: pinctrl-ify i2c-omap.c Date: Thu, 20 Sep 2012 09:34:49 +0300 Message-Id: <1348122889-28271-3-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1348122889-28271-1-git-send-email-panto@antoniou-consulting.com> References: <50596F8F.60506@ti.com> <1348122889-28271-1-git-send-email-panto@antoniou-consulting.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Add support for pinctrl mux settings in the OMAP I2C driver. If no such pinctl bindings are found a warning message is printed. Signed-off-by: Pantelis Antoniou Acked-by: Shubhrajyoti D Acked-by: Tony Lindgren --- drivers/i2c/busses/i2c-omap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index b149e32..d192614 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -43,6 +43,7 @@ #include #include #include +#include /* I2C controller revisions */ #define OMAP_I2C_OMAP1_REV_2 0x20 @@ -1057,6 +1058,7 @@ omap_i2c_probe(struct platform_device *pdev) const struct of_device_id *match; int irq; int r; + struct pinctrl *pinctrl; /* NOTE: driver uses the static register mapping */ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -1197,6 +1199,10 @@ omap_i2c_probe(struct platform_device *pdev) of_i2c_register_devices(adap); + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + dev_warn(dev->dev, "pins are not configured from the driver\n"); + pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev);