From patchwork Wed Oct 31 15:55:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1672271 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 1181FDFB7B for ; Tue, 30 Oct 2012 18:18:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934045Ab2J3SMm (ORCPT ); Tue, 30 Oct 2012 14:12:42 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:59039 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965163Ab2J3SMl (ORCPT ); Tue, 30 Oct 2012 14:12:41 -0400 X-Greylist: delayed 614 seconds by postgrey-1.27 at vger.kernel.org; Tue, 30 Oct 2012 14:12:40 EDT 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 3632D9C185; Tue, 30 Oct 2012 18:02:22 +0000 (UTC) From: Pantelis Antoniou To: Tony Lindgren Cc: Pantelis Antoniou , "Ben Dooks (embedded platforms)" , "Wolfram Sang (embedded platforms)" , linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Koen Kooi , Matt Porter , Russ Dill Subject: [PATCH] i2c: pinctrl-ify i2c-omap.c Date: Wed, 31 Oct 2012 17:55:30 +0200 Message-Id: <1351698930-3797-1-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Enable pinctrl for i2c-omap. Signed-off-by: Pantelis Antoniou Acked-by: Tony Lindgren --- drivers/i2c/busses/i2c-omap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index db31eae..4c38aa0 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -44,6 +44,8 @@ #include #include #include +#include +#include /* I2C controller revisions */ #define OMAP_I2C_OMAP1_REV_2 0x20 @@ -1064,6 +1066,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); @@ -1202,6 +1205,13 @@ 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, "unable to select pin group\n"); + + dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr, + dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed); + pm_runtime_mark_last_busy(dev->dev); pm_runtime_put_autosuspend(dev->dev);