Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4511915ybh; Tue, 6 Aug 2019 13:03:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzna3AG4N+FUoXH3oXvYirlFEq5PPsitnRvhMzaJ5MtVhoS5TH6fMAIn0Z+rALZZLiWeMhi X-Received: by 2002:a65:6152:: with SMTP id o18mr3785807pgv.279.1565121817707; Tue, 06 Aug 2019 13:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565121817; cv=none; d=google.com; s=arc-20160816; b=Rn0uwB0mRReIptyVXXUV1fzK47xt8AuY9zuX94EzJWw6jQo83PRiVyGTXDheZz6Q1E f9yXqAPFnXdfnSzv0LnbCakEQTAEC2+VsyF560go9lFuvWNmRjbw3UigPom80HohGTrg Db09bRtCgqUYmoVKd7CAXji1tncKq6yrCNpBEpraa5BJ27J5Jett9oi2GNGeR9auzEMl MgPDjDgP9mT0MUSJg0ilTuiNP3pWKkr845IgNfku4MjUg65s+4YRQQnExGPea5/y46Ju oCBJqLI441fo0JL1V3yECpountK2f3gfK2lp0kU88zc8A9NEWjUK5h4qEHv33AuERmek 3aig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gqjViCXObN2WgC0+IhrtTb7Ll35AmMVzauFcMWGTI3Y=; b=VI9BPtsYmb3y6LXPLAtM5zTAdfpT42fxrKT2sWjCZx7CnnYIPXHafmzF//5yV7fEXp 1NvO5hKXx9/VJDVxMzbvQxeW+eUTS7QCVl1Pn3SeQDRLUL4zi8jUsCsby/OR/YGnvBON z9qCP/CUsvu+2gG6CNTou+xwMInSu87rL7/P0qQ5csRaFJBwUsfrlh545u4QCirIB66S ea7PNNWxmNCNX6LQnaWT+nLaTq5lcovNnQM9yZAr2rLuW7hF+eQpqZYP4D/fB7/nfMk1 v7sdwxMYYKPLO6+AO8SnHHi1r6z3Fqnhb4av3jeVukiyv3dT7T3eTtkFY3M6Imgw+mvl /uTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g6geZrRS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si48717782pgu.319.2019.08.06.13.03.20; Tue, 06 Aug 2019 13:03:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g6geZrRS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726345AbfHFUCk (ORCPT + 99 others); Tue, 6 Aug 2019 16:02:40 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:40000 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfHFUCk (ORCPT ); Tue, 6 Aug 2019 16:02:40 -0400 Received: by mail-ot1-f68.google.com with SMTP id l15so38386698oth.7; Tue, 06 Aug 2019 13:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gqjViCXObN2WgC0+IhrtTb7Ll35AmMVzauFcMWGTI3Y=; b=g6geZrRSw1Dk72HeV3MeqgqDiCymOKGzorDS9kcJv2KYasDx9IRJzWdUCQ5iz/Ck/a sMOqtrYcPYFkeOtOkh3EZ6BQOFZFtjfX4FeNaR7psKg3xzJZZT2HZI2UO45VHTO99KCa 5DJfIPEVo7ChrD9UA9ksvW4WKmWAYqfMY6fVOBsARhj6ITM/Y954KCB64DT/86RovKv+ v3izTjlAuvKv3KGD3bthq9dyPH36SX8i7m0+F89SRk5FQznew6pgkuE+/KIjfgWA0K30 KRvE8YQ5YyG26Sgb8bPl/FmaHp9h4HQXgX6WZJSlRti8akUyiqMHCDslkE+F9DWvSgMq +SWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gqjViCXObN2WgC0+IhrtTb7Ll35AmMVzauFcMWGTI3Y=; b=DAVKmvYCat5Dj/ruLiTDzFFuhZq4kak1ETB6I0A26uw55TdS6uBJmEri64wRgyHQVs GN0Hy5n4PPvA4kEaPHcBmPMzYLhiipyLt5cVtdtxMbMaA5/o5SReiskWf1eMKNW0iPH1 e4DwW70VB23KpGrgxdaSpWb29r9f194r6Ro7GM7esYhQ0u0xEquCc8jXCfeKeAqWU8rL QHTybgeHsj6D1htR0yXbCfmlDtKElfBibDqXLIv4CfekibAMhtjmTZ3r04tBCHWvTopq yXqopfEBABpB5N5VkeK5JNRcYTvhc2ynumq8hJR0CH5cmo0QtomaTzLcDwfnVnVl0N6f 1IVw== X-Gm-Message-State: APjAAAUv/enkbaZmdiOEMTkClH/qX+lO8nl3kZrRCiqzEPZP78AwDiNv C4f3UQG58s/Izj9E+KwZXS+RfZRthcf/rEJWTYc= X-Received: by 2002:a5d:9942:: with SMTP id v2mr5555846ios.177.1565121759065; Tue, 06 Aug 2019 13:02:39 -0700 (PDT) MIME-Version: 1.0 References: <20190731195713.3150463-1-arnd@arndb.de> <20190731195713.3150463-6-arnd@arndb.de> In-Reply-To: <20190731195713.3150463-6-arnd@arndb.de> From: Sylvain Lemieux Date: Tue, 6 Aug 2019 16:02:27 -0400 Message-ID: Subject: Re: [PATCH 05/14] gpio: lpc32xx: allow building on non-lpc32xx targets To: Arnd Bergmann Cc: soc@kernel.org, "moderated list:ARM PORT" , Vladimir Zapolskiy , Russell King , Gregory Clement , Linus Walleij , Bartosz Golaszewski , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , "David S. Miller" , Greg Kroah-Hartman , Alan Stern , Guenter Roeck , "open list:GPIO SUBSYSTEM" , Networking , linux-serial@vger.kernel.org, USB list , LINUXWATCHDOG , Lee Jones , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Wed, Jul 31, 2019 at 4:00 PM Arnd Bergmann wrote: > > The driver uses hardwire MMIO addresses instead of the data > that is passed in device tree. Change it over to only > hardcode the register offset values and allow compile-testing. > > Signed-off-by: Arnd Bergmann > --- > drivers/gpio/Kconfig | 8 +++++ > drivers/gpio/Makefile | 2 +- > drivers/gpio/gpio-lpc32xx.c | 63 ++++++++++++++++++++++++------------- > 3 files changed, 50 insertions(+), 23 deletions(-) > [...] > diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c > index 24885b3db3d5..548f7cb69386 100644 > --- a/drivers/gpio/gpio-lpc32xx.c > +++ b/drivers/gpio/gpio-lpc32xx.c [...] > @@ -498,6 +509,10 @@ static int lpc32xx_gpio_probe(struct platform_device *pdev) > { > int i; > > + gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); > + if (gpio_reg_base) > + return -ENXIO; The probe function will always return an error. Please replace the previous 2 lines with: if (IS_ERR(gpio_reg_base)) return PTR_ERR(gpio_reg_base); You can add my acked-by and tested-by in the v2 patch. Acked-by: Sylvain Lemieux Tested-by: Sylvain Lemieux > + > for (i = 0; i < ARRAY_SIZE(lpc32xx_gpiochip); i++) { > if (pdev->dev.of_node) { > lpc32xx_gpiochip[i].chip.of_xlate = lpc32xx_of_xlate; > @@ -527,3 +542,7 @@ static struct platform_driver lpc32xx_gpio_driver = { > }; > > module_platform_driver(lpc32xx_gpio_driver); > + > +MODULE_AUTHOR("Kevin Wells "); > +MODULE_LICENSE("GPL"); > +MODULE_DESCRIPTION("GPIO driver for LPC32xx SoC"); > -- > 2.20.0 > Sylvain