[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1409101353500.2790@atx-linux-37>
Date: Wed, 10 Sep 2014 14:11:19 -0500
From: atull <atull@...nsource.altera.com>
To: Weike Chen <alvin.chen@...el.com>
CC: Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>, <linux-gpio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
Boon Leong Ong <boon.leong.ong@...el.com>,
Hock Leong Kweh <hock.leong.kweh@...el.com>,
Darren Hart <dvhart@...ux.intel.com>,
Sebastian Andrzej Siewior <sebastian@...akpoint.cc>,
Mika Westerberg <mika.westerberg@...el.com>,
Andriy Shevchenko <andriy.shevchenko@...el.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding
to MFD driver
On Tue, 9 Sep 2014, Weike Chen wrote:
> The Synopsys DesignWare APB GPIO driver only supports open firmware devices.
> But, like Intel Quark X1000 SOC, which has a single PCI function exporting
> a GPIO and an I2C controller, it is a Multifunction device. This patch is
> to enable the current Synopsys DesignWare APB GPIO driver to support the
> Multifunction device which exports the designware GPIO controller.
>
> Reviewed-by: Hock Leong Kweh <hock.leong.kweh@...el.com>
> Signed-off-by: Weike Chen <alvin.chen@...el.com>
Hi Alvin,
I did a quick test and this looks like it works for me (with device tree).
I had a couple of small fixes below.
Alan
>
> - port->bgc.gc.ngpio = ngpio;
> - port->bgc.gc.of_node = port_np;
> +#ifdef CONFIG_OF_GPIO
> + port->bgc.gc.of_node = pp->node;
> +#endif
Please use 'if (IS_ENABLED(CONFIG_OF_GPIO)) as a conditional as you do
elsewhere.
> static int dwapb_gpio_probe(struct platform_device *pdev)
> {
> + int i;
> struct resource *res;
> struct dwapb_gpio *gpio;
> - struct device_node *np;
> int err;
> - unsigned int offs = 0;
> + struct device *dev = &pdev->dev;
> + struct dwapb_platform_data *pdata = dev_get_platdata(dev);
> + bool is_pdata_alloc = !pdata;
Please combine the int's in one line (int err, i;) and put them as
the last one on this list. It looks the same to the compiler of
course, but more uniform for human eyes :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists