From: Kelvin Cheung <keguang.zhang@gmail.com>
To: andy.shevchenko@gmail.com
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Subject: Re: [PATCH 3/4] gpio: loongson1: Add DT support
Date: Thu, 2 Mar 2023 19:08:44 +0800 [thread overview]
Message-ID: <CAJhJPsVUEe8h8an5ywWTjcLSXj3uHyxW7bg8q4=Byp-3CTgL0w@mail.gmail.com> (raw)
In-Reply-To: <Y/YIlb8axBVVW3VV@surfacebook>
On Wed, Feb 22, 2023 at 8:21 PM <andy.shevchenko@gmail.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
next prev parent reply other threads:[~2023-03-02 11:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 11:12 [PATCH 0/4] Devicetree support for Loongson-1 GPIO Keguang Zhang
2023-02-22 11:12 ` [PATCH 1/4] gpio: loongson1: Update copyright Keguang Zhang
2023-02-22 12:17 ` andy.shevchenko
2023-03-02 11:09 ` Kelvin Cheung
2023-03-02 11:40 ` Krzysztof Kozlowski
2023-03-02 12:16 ` Kelvin Cheung
2023-03-02 19:02 ` Andy Shevchenko
2023-02-22 11:12 ` [PATCH 2/4] gpio: loongson1: Introduce ls1x_gpio_chip struct Keguang Zhang
2023-02-22 12:18 ` andy.shevchenko
2023-03-02 11:11 ` Kelvin Cheung
2023-02-22 11:12 ` [PATCH 3/4] gpio: loongson1: Add DT support Keguang Zhang
2023-02-22 12:20 ` andy.shevchenko
2023-03-02 11:08 ` Kelvin Cheung [this message]
2023-02-22 11:12 ` [PATCH 4/4] dt-bindings: gpio: Add Loongson-1 GPIO Keguang Zhang
2023-02-22 12:35 ` Krzysztof Kozlowski
2023-03-01 9:50 ` Kelvin Cheung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJhJPsVUEe8h8an5ywWTjcLSXj3uHyxW7bg8q4=Byp-3CTgL0w@mail.gmail.com' \
--to=keguang.zhang@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).