[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhJPsVUEe8h8an5ywWTjcLSXj3uHyxW7bg8q4=Byp-3CTgL0w@mail.gmail.com>
Date: Thu, 2 Mar 2023 19:08:44 +0800
From: Kelvin Cheung <keguang.zhang@...il.com>
To: andy.shevchenko@...il.com
Cc: linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Subject: Re: [PATCH 3/4] gpio: loongson1: Add DT support
On Wed, Feb 22, 2023 at 8:21 PM <andy.shevchenko@...il.com> wrote:
>
> Wed, Feb 22, 2023 at 07:12:12PM +0800, Keguang Zhang kirjoitti:
> > This patch adds DT support for Loongson-1 GPIO driver,
> > including the following changes.
> > - Add the of_match_table
> > - Parse the ngpios property
> > - Parse the alias id
>
> Split!
>
> ...
>
> > + if (of_property_read_u32(dn, "ngpios", &ngpios)) {
> > + dev_err(dev, "Missing ngpios OF property\n");
> > + return -ENODEV;
> > + }
>
> Why?! GPIO library has this already.
>
Will make use of gpiolib and remove this part.
> ...
>
> > + id = of_alias_get_id(dn, "gpio");
> > + if (id < 0) {
> > + dev_err(dev, "Couldn't get OF id\n");
> > + return id;
> > + }
>
> What is this for?
>
Will remove this part.
> ...
>
> > + ls1x_gc->gc.base = pdev->id * BITS_PER_LONG;
> > - ls1x_gc->gc.base = pdev->id * 32;
>
> No way. This is change makes me thing that initially it's simply wrong. Please,
> just use -1 for the base.
>
Sure. And this is already done by bgpio_init().
So I will simply remove this line.
> ...
>
> > +static const struct of_device_id ls1x_gpio_dt_ids[] = {
> > + { .compatible = "loongson,ls1x-gpio", },
>
> Inner comma is not needed.
>
Will do.
> > + { /* sentinel */ }
> > +};
>
> You missed MODULE_DEVICE_TABLE().
>
Will add MODULE_DEVICE_TABLE().
> --
> With Best Regards,
> Andy Shevchenko
>
>
--
Best regards,
Kelvin Cheung
Powered by blists - more mailing lists