From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: Michael Walle <michael@walle.cc>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com,
Jonas Gorski <jonas.gorski@gmail.com>,
Necip Fazil Yildiran <fazilyildiran@gmail.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node
Date: Wed, 3 Mar 2021 17:12:35 +0100 [thread overview]
Message-ID: <E341768B-BF42-4749-8D43-8C5CB24D64C3@gmail.com> (raw)
In-Reply-To: <40403445ae34e822474e5f39be75fd0b@walle.cc>
Hi Linus,
Do you want me to send v4 with these changes?
Or maybe just this single patch?
Best regards,
Álvaro.
> El 3 mar 2021, a las 17:08, Michael Walle <michael@walle.cc> escribió:
>
> Am 2021-03-03 15:22, schrieb Álvaro Fernández Rojas:
>> This is needed for properly registering gpio regmap as a child of a regmap
>> pin controller.
>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>> ---
>> v3: introduce patch needed for properly parsing gpio-ranges.
>> drivers/gpio/gpio-regmap.c | 1 +
>> include/linux/gpio/regmap.h | 3 +++
>> 2 files changed, 4 insertions(+)
>> diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
>> index 5412cb3b0b2a..752ccd780b7d 100644
>> --- a/drivers/gpio/gpio-regmap.c
>> +++ b/drivers/gpio/gpio-regmap.c
>> @@ -249,6 +249,7 @@ struct gpio_regmap *gpio_regmap_register(const
>> struct gpio_regmap_config *config
>> chip = &gpio->gpio_chip;
>> chip->parent = config->parent;
>> + chip->of_node = config->of_node;
>
> chip->of_node = config->of_node ?: dev_of_node(config->parent);
>
> As mentioned in my previous reply in this thread, for clarity
> reasons.
>
>> chip->base = -1;
>> chip->ngpio = config->ngpio;
>> chip->names = config->names;
>> diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h
>> index ad76f3d0a6ba..f6e638e32d2a 100644
>> --- a/include/linux/gpio/regmap.h
>> +++ b/include/linux/gpio/regmap.h
>> @@ -4,6 +4,7 @@
>> #define _LINUX_GPIO_REGMAP_H
>> struct device;
>> +struct device_node;
>> struct gpio_regmap;
>> struct irq_domain;
>> struct regmap;
>> @@ -14,6 +15,7 @@ struct regmap;
>> /**
>> * struct gpio_regmap_config - Description of a generic regmap gpio_chip.
>> * @parent: The parent device
>> + * @of_node: The device node
>
> Please add "(Optional)" and move it below @regmap. This should also
> mention that if not supplied parent->of_node is used.
>
>> * @regmap: The regmap used to access the registers
>> * given, the name of the device is used
>> * @label: (Optional) Descriptive name for GPIO controller.
>> @@ -56,6 +58,7 @@ struct regmap;
>> */
>> struct gpio_regmap_config {
>> struct device *parent;
>> + struct device_node *of_node;
>> struct regmap *regmap;
>> const char *label;
>
> With these changes:
> Reviewed-by: Michael Walle <michael@walle.cc>
>
> -michael
next prev parent reply other threads:[~2021-03-03 19:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 14:22 [PATCH v3 00/14] pinctrl: add BCM63XX pincontrol support Álvaro Fernández Rojas
2021-03-03 14:22 ` [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node Álvaro Fernández Rojas
2021-03-03 15:27 ` Linus Walleij
2021-03-03 15:39 ` Michael Walle
2021-03-03 16:08 ` Michael Walle
2021-03-03 16:12 ` Álvaro Fernández Rojas [this message]
2021-03-04 8:13 ` Linus Walleij
2021-03-04 8:27 ` Álvaro Fernández Rojas
2021-03-03 14:22 ` [PATCH v3 02/14] pinctrl: bcm: add bcm63xx base code Álvaro Fernández Rojas
2021-03-03 14:22 ` [PATCH v3 03/14] Documentation: add BCM6328 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 04/14] pinctrl: add a pincontrol driver for BCM6328 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 05/14] Documentation: add BCM6358 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 06/14] pinctrl: add a pincontrol driver for BCM6358 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 07/14] Documentation: add BCM6362 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 08/14] pinctrl: add a pincontrol driver for BCM6362 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 09/14] Documentation: add BCM6368 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 10/14] pinctrl: add a pincontrol driver for BCM6368 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 11/14] Documentation: add BCM63268 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 12/14] pinctrl: add a pincontrol driver for BCM63268 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 13/14] Documentation: add BCM6318 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 14/14] pinctrl: add a pincontrol driver for BCM6318 Álvaro Fernández Rojas
2021-03-03 15:29 ` [PATCH v3 00/14] pinctrl: add BCM63XX pincontrol support Linus Walleij
2021-03-03 16:23 ` Álvaro Fernández Rojas
2021-03-04 0:13 ` Linus Walleij
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=E341768B-BF42-4749-8D43-8C5CB24D64C3@gmail.com \
--to=noltari@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bgolaszewski@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=fazilyildiran@gmail.com \
--cc=jonas.gorski@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--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).