From patchwork Mon Jun 12 15:34:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 9781633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B3AF560352 for ; Mon, 12 Jun 2017 15:36:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A220A2853D for ; Mon, 12 Jun 2017 15:36:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96A9628633; Mon, 12 Jun 2017 15:36:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1E1222853D for ; Mon, 12 Jun 2017 15:36:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KKtvNJzTGlzrk9QlDk+j30OQcqmmtAnqHc6UbZSsrhg=; b=d1+KF3dP1FPLeRYBBWEcY95aNS JYAfE354VpW4whR3hMGAoG+WB6Tod2YU1t6hrmxGPx3Nf89K9e9eKs2ebHyzuZGQMrlj+ZL5FiqMn BZGYSV9+wWwMn00U4bQY+A8G2m8EmqXzhEuI3hK6NJDs2bd7RKOJ9GLg4nHgVwYdNZ1EkO/SI5HsH YXmOCLumLT3dbNtGT2sDT3SDXBqO62vnotmp7Z2tuxdovvuqCGBhoyDpbwQQiSpoiM+BBxTnr3ENh 1AIyfuYRn+W9+EQQZUwZPOKbE1roT/BgjRICq5fljv/06CWxdUkr8KorW8XfxPaKsQFSMfBY8YN5D kwnn0PEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKRO8-0008UK-Tm; Mon, 12 Jun 2017 15:36:20 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKRNM-0007XP-OJ for linux-arm-kernel@lists.infradead.org; Mon, 12 Jun 2017 15:35:36 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 4861821CEC; Mon, 12 Jun 2017 17:35:08 +0200 (CEST) Received: from localhost (unknown [93.29.146.83]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2026D212E6; Mon, 12 Jun 2017 17:35:08 +0200 (CEST) From: Gregory CLEMENT To: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/9] pinctrl: mvebu: remove the offset property for regmap Date: Mon, 12 Jun 2017 17:34:53 +0200 Message-Id: <9cbcf3247ef2e18381c95645c73c31dade2c2ccb.1497281623.git-series.gregory.clement@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170612_083533_146815_7DC1B638 X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Andrew Lunn , Jason Cooper , devicetree@vger.kernel.org, Omri Itach , Nadav Haklai , Kostya Porotchkin , Russell King , Rob Herring , Neta Zur Hershkovits , Gregory CLEMENT , Shadi Ammouri , Marcin Wojtas , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The offset property of the pinctrl node, when a regmap is used in the device tree, was never used nor documented in the binding. Moreover, the compatible string is enough to let the driver know which offset using. So this patch removes the property and move the information at the driver level. Reviewed-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT --- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 6 +----- drivers/pinctrl/mvebu/pinctrl-mvebu.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index e4dda12d371a..163d4614b0f8 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c @@ -810,21 +810,17 @@ int mvebu_regmap_mpp_ctrl_set(struct mvebu_mpp_ctrl_data *data, } int mvebu_pinctrl_simple_regmap_probe(struct platform_device *pdev, - struct device *syscon_dev) + struct device *syscon_dev, u32 offset) { struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev); struct mvebu_mpp_ctrl_data *mpp_data; struct regmap *regmap; - u32 offset; int i; regmap = syscon_node_to_regmap(syscon_dev->of_node); if (IS_ERR(regmap)) return PTR_ERR(regmap); - if (of_property_read_u32(pdev->dev.of_node, "offset", &offset)) - return -EINVAL; - mpp_data = devm_kcalloc(&pdev->dev, soc->ncontrols, sizeof(*mpp_data), GFP_KERNEL); if (!mpp_data) diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h index c90704e74884..75bba436bf59 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h @@ -210,6 +210,6 @@ int mvebu_regmap_mpp_ctrl_set(struct mvebu_mpp_ctrl_data *data, unsigned pid, int mvebu_pinctrl_probe(struct platform_device *pdev); int mvebu_pinctrl_simple_mmio_probe(struct platform_device *pdev); int mvebu_pinctrl_simple_regmap_probe(struct platform_device *pdev, - struct device *syscon_dev); + struct device *syscon_dev, u32 offset); #endif