From patchwork Sat May 16 00:23:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 6418581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A09A7C0432 for ; Sat, 16 May 2015 00:31:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D4BA20570 for ; Sat, 16 May 2015 00:31:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9972420567 for ; Sat, 16 May 2015 00:31:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtPxW-0001EP-1w; Sat, 16 May 2015 00:28:06 +0000 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtPtn-0006E5-I0 for linux-arm-kernel@lists.infradead.org; Sat, 16 May 2015 00:24:23 +0000 Received: by wicmc15 with SMTP id mc15so49744884wic.1 for ; Fri, 15 May 2015 17:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YrQpl19xKSX/F8VeAAzRywZ013KMzCAjgTeMLLBqkgI=; b=hrwAPfnIQJG1OjiRoT4rLxm35NpnRpE+taornjr2H10ku3ySMgys852UU8JrRMd0Ib Go+8hPe2NQyOBB1dMt8TsVkf95kenDuOtYaZw0Zu5eG16iMtzAFurEBPXOZaEL5eypAd i6EiqJJjuVDnZ9ySDWQNbtueUXDCuq7bRwLrJDfWVL9dknVb7AI0HphDWRpRuTGcGYco G61fVbiFJuzMPdqvwECRFCe334QOOvcaH8DPsiEoQZgY7S28ifqLtpcxsVXLYq2S5+Kn qe7X6zZZaHz1FqP2jC7wRs58YjzC3Tih8IgUPgIDfXcT7Qp4ytKpKlNHQsfRnMXY+/J7 z2FQ== X-Received: by 10.180.97.129 with SMTP id ea1mr1981998wib.24.1431735834506; Fri, 15 May 2015 17:23:54 -0700 (PDT) Received: from topkick.lan (x5ce62600.dyn.telefonica.de. [92.230.38.0]) by mx.google.com with ESMTPSA id it5sm453211wid.3.2015.05.15.17.23.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 17:23:52 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 08/14] pinctrl: berlin: drop SoC stub provided regmap Date: Sat, 16 May 2015 02:23:37 +0200 Message-Id: <1431735823-28006-9-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1431735823-28006-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1431735823-28006-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150515_172415_923685_BEC1EE28 X-CRM114-Status: GOOD ( 10.80 ) X-Spam-Score: -0.8 (/) Cc: Antoine Ternart , linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Linus Walleij X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Antoine Tenart With convertsion to simple-mfd sub-nodes, drop the regmap registration by SoC stubs. Signed-off-by: Antoine Tenart Acked-by: Linus Walleij Signed-off-by: Sebastian Hesselbarth --- Cc: Linus Walleij --- drivers/pinctrl/berlin/berlin-bg2.c | 30 ------------------------------ drivers/pinctrl/berlin/berlin-bg2cd.c | 30 ------------------------------ drivers/pinctrl/berlin/berlin-bg2q.c | 30 ------------------------------ drivers/pinctrl/berlin/berlin.c | 4 +--- 4 files changed, 1 insertion(+), 93 deletions(-) diff --git a/drivers/pinctrl/berlin/berlin-bg2.c b/drivers/pinctrl/berlin/berlin-bg2.c index 6931ce4b1e12..3769eaedf519 100644 --- a/drivers/pinctrl/berlin/berlin-bg2.c +++ b/drivers/pinctrl/berlin/berlin-bg2.c @@ -218,14 +218,6 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = { static const struct of_device_id berlin2_pinctrl_match[] = { { - .compatible = "marvell,berlin2-chip-ctrl", - .data = &berlin2_soc_pinctrl_data - }, - { - .compatible = "marvell,berlin2-system-ctrl", - .data = &berlin2_sysmgr_pinctrl_data - }, - { .compatible = "marvell,berlin2-soc-pinctrl", .data = &berlin2_soc_pinctrl_data }, @@ -241,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(berlin2_pinctrl_match, &pdev->dev); - struct regmap_config *rmconfig; - struct regmap *regmap; - struct resource *res; - void __iomem *base; - - rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); - if (!rmconfig) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - rmconfig->reg_bits = 32, - rmconfig->val_bits = 32, - rmconfig->reg_stride = 4, - rmconfig->max_register = resource_size(res); - - regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); return berlin_pinctrl_probe(pdev, match->data); } diff --git a/drivers/pinctrl/berlin/berlin-bg2cd.c b/drivers/pinctrl/berlin/berlin-bg2cd.c index 18e1af0e6b8c..9e11f191d643 100644 --- a/drivers/pinctrl/berlin/berlin-bg2cd.c +++ b/drivers/pinctrl/berlin/berlin-bg2cd.c @@ -161,14 +161,6 @@ static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = { static const struct of_device_id berlin2cd_pinctrl_match[] = { { - .compatible = "marvell,berlin2cd-chip-ctrl", - .data = &berlin2cd_soc_pinctrl_data - }, - { - .compatible = "marvell,berlin2cd-system-ctrl", - .data = &berlin2cd_sysmgr_pinctrl_data - }, - { .compatible = "marvell,berlin2cd-soc-pinctrl", .data = &berlin2cd_soc_pinctrl_data }, @@ -184,28 +176,6 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(berlin2cd_pinctrl_match, &pdev->dev); - struct regmap_config *rmconfig; - struct regmap *regmap; - struct resource *res; - void __iomem *base; - - rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); - if (!rmconfig) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - rmconfig->reg_bits = 32, - rmconfig->val_bits = 32, - rmconfig->reg_stride = 4, - rmconfig->max_register = resource_size(res); - - regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); return berlin_pinctrl_probe(pdev, match->data); } diff --git a/drivers/pinctrl/berlin/berlin-bg2q.c b/drivers/pinctrl/berlin/berlin-bg2q.c index 24e4cbb4d044..ba7a8a8ad010 100644 --- a/drivers/pinctrl/berlin/berlin-bg2q.c +++ b/drivers/pinctrl/berlin/berlin-bg2q.c @@ -380,14 +380,6 @@ static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = { static const struct of_device_id berlin2q_pinctrl_match[] = { { - .compatible = "marvell,berlin2q-chip-ctrl", - .data = &berlin2q_soc_pinctrl_data, - }, - { - .compatible = "marvell,berlin2q-system-ctrl", - .data = &berlin2q_sysmgr_pinctrl_data, - }, - { .compatible = "marvell,berlin2q-soc-pinctrl", .data = &berlin2q_soc_pinctrl_data, }, @@ -403,28 +395,6 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(berlin2q_pinctrl_match, &pdev->dev); - struct regmap_config *rmconfig; - struct regmap *regmap; - struct resource *res; - void __iomem *base; - - rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); - if (!rmconfig) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - rmconfig->reg_bits = 32, - rmconfig->val_bits = 32, - rmconfig->reg_stride = 4, - rmconfig->max_register = resource_size(res); - - regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); return berlin_pinctrl_probe(pdev, match->data); } diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c index 28551123d04f..65b0e211b89e 100644 --- a/drivers/pinctrl/berlin/berlin.c +++ b/drivers/pinctrl/berlin/berlin.c @@ -301,9 +301,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev, struct regmap *regmap; int ret; - regmap = dev_get_regmap(&pdev->dev, NULL); - if (!regmap) - regmap = syscon_node_to_regmap(parent_np); + regmap = syscon_node_to_regmap(parent_np); of_node_put(parent_np); if (IS_ERR(regmap)) return PTR_ERR(regmap);