From patchwork Tue Dec 3 14:50:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21963 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C67FE202AE for ; Tue, 3 Dec 2013 14:50:27 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id b10sf26720793qen.10 for ; Tue, 03 Dec 2013 06:50:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=QOLM3S+Gx54D9krux6dtPgPQWsLwSJkjpPim5y+2Xuk=; b=LUBV4gRT/Rjd4Vg0y9leIgiPM+yJR0oGBnbBe626FM27jISWcuHrzKuu/FkGbjmmOE xZfckWhnVDYqCAU3q8uE3ZYXCkaGrE5RstZz7kFunZ4HiYC7FIJS8Ly1Dy+dncutYqYA Krx2ACoDTg0Kis2Z9Gbma4gbzKbBs7adBKggjVIADRXLT9pdhVfudpMHMWIO4dZMxq5J LLNF7Utx/i0bJUv2nQTbguuN7v0h5zxG8D4615+9esBDMoMO7NltjvmUxxrXQAhMGmqa ci1nV7q8ckTMjI3TwzWEO0zqGhaMLWFNY+RJHaCMIoSoOtJf1J01fet379/XSfppD++u MxOw== X-Gm-Message-State: ALoCoQkzWKHrhiNkEAGsDSn9s9OZ4HKk3h7H9XjqX9IXWk7+Mfg081CNRWi2u4YxRBLBAApQOlTT X-Received: by 10.58.39.202 with SMTP id r10mr24365133vek.12.1386082226835; Tue, 03 Dec 2013 06:50:26 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.10 with SMTP id q10ls3729330qen.0.gmail; Tue, 03 Dec 2013 06:50:26 -0800 (PST) X-Received: by 10.58.248.198 with SMTP id yo6mr1011354vec.40.1386082226673; Tue, 03 Dec 2013 06:50:26 -0800 (PST) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id sl9si16580033vdc.99.2013.12.03.06.50.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 06:50:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id jw12so10515948veb.10 for ; Tue, 03 Dec 2013 06:50:26 -0800 (PST) X-Received: by 10.220.186.202 with SMTP id ct10mr57144985vcb.14.1386082226480; Tue, 03 Dec 2013 06:50:26 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp214019vcz; Tue, 3 Dec 2013 06:50:26 -0800 (PST) X-Received: by 10.112.53.201 with SMTP id d9mr939344lbp.26.1386082225466; Tue, 03 Dec 2013 06:50:25 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id ax2si14086341lbc.90.2013.12.03.06.50.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 06:50:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.49 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id er20so8920300lab.8 for ; Tue, 03 Dec 2013 06:50:24 -0800 (PST) X-Received: by 10.112.135.165 with SMTP id pt5mr913913lbb.33.1386082224870; Tue, 03 Dec 2013 06:50:24 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id mx3sm2438678lbc.14.2013.12.03.06.50.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Dec 2013 06:50:24 -0800 (PST) From: Linus Walleij To: Samuel Ortiz , Lee Jones , linux-kernel@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 1/3] pinctrl: abx500: delete non-devicetree probe path Date: Tue, 3 Dec 2013 15:50:17 +0100 Message-Id: <1386082217-18883-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , All instances of this device are now coming from device tree- enabled platforms probing without using platform data. Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-abx500.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index 4780959e11d4..66a06d5194cd 100644 --- a/drivers/pinctrl/pinctrl-abx500.c +++ b/drivers/pinctrl/pinctrl-abx500.c @@ -1218,21 +1218,15 @@ static const struct of_device_id abx500_gpio_match[] = { static int abx500_gpio_probe(struct platform_device *pdev) { - struct ab8500_platform_data *abx500_pdata = - dev_get_platdata(pdev->dev.parent); - struct abx500_gpio_platform_data *pdata = NULL; struct device_node *np = pdev->dev.of_node; + const struct of_device_id *match; struct abx500_pinctrl *pct; - const struct platform_device_id *platid = platform_get_device_id(pdev); unsigned int id = -1; int ret, err; int i; - if (abx500_pdata) - pdata = abx500_pdata->gpio; - - if (!(pdata || np)) { - dev_err(&pdev->dev, "gpio dt and platform data missing\n"); + if (!np) { + dev_err(&pdev->dev, "gpio dt node missing\n"); return -ENODEV; } @@ -1248,17 +1242,14 @@ static int abx500_gpio_probe(struct platform_device *pdev) pct->parent = dev_get_drvdata(pdev->dev.parent); pct->chip = abx500gpio_chip; pct->chip.dev = &pdev->dev; - pct->chip.base = (np) ? -1 : pdata->gpio_base; - - if (platid) - id = platid->driver_data; - else if (np) { - const struct of_device_id *match; + pct->chip.base = -1; /* Dynamic allocation */ - match = of_match_device(abx500_gpio_match, &pdev->dev); - if (match) - id = (unsigned long)match->data; + match = of_match_device(abx500_gpio_match, &pdev->dev); + if (!match) { + dev_err(&pdev->dev, "gpio dt not matching\n"); + return -ENODEV; } + id = (unsigned long)match->data; /* Poke in other ASIC variants here */ switch (id) { @@ -1349,14 +1340,6 @@ static int abx500_gpio_remove(struct platform_device *pdev) return 0; } -static const struct platform_device_id abx500_pinctrl_id[] = { - { "pinctrl-ab8500", PINCTRL_AB8500 }, - { "pinctrl-ab8540", PINCTRL_AB8540 }, - { "pinctrl-ab9540", PINCTRL_AB9540 }, - { "pinctrl-ab8505", PINCTRL_AB8505 }, - { }, -}; - static struct platform_driver abx500_gpio_driver = { .driver = { .name = "abx500-gpio", @@ -1365,7 +1348,6 @@ static struct platform_driver abx500_gpio_driver = { }, .probe = abx500_gpio_probe, .remove = abx500_gpio_remove, - .id_table = abx500_pinctrl_id, }; static int __init abx500_gpio_init(void)