All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Fabien Dessenne <fabien.dessenne@foss.st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"open list:ARM/Amlogic Meson..."
	<linux-amlogic@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	linux-stm32@st-md-mailman.stormreply.com,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v1 1/5] gpiolib: Introduce gpiochip_count() helper
Date: Mon, 28 Mar 2022 09:35:25 +0200	[thread overview]
Message-ID: <CAMuHMdXJo=XWNLKpFFe65fx-c7oPXmydvXxiPzGicNaxYthGbg@mail.gmail.com> (raw)
In-Reply-To: <20220325200338.54270-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

On Fri, Mar 25, 2022 at 9:04 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The gpiochip_count() helper iterates over the device child nodes that have
> the "gpio-controller" property set. It returns the number of such nodes
> under given device.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks for your patch!

> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -750,4 +751,17 @@ static inline void gpiochip_unlock_as_irq(struct gpio_chip *gc,
>  }
>  #endif /* CONFIG_GPIOLIB */
>
> +static inline unsigned int gpiochip_count(struct device *dev)
> +{
> +       struct fwnode_handle *child;
> +       unsigned int count = 0;
> +
> +       device_for_each_child_node(dev, child) {
> +               if (device_property_read_bool(child, "gpio-controller"))

error: passing argument 1 of ‘device_property_read_bool’ from
incompatible pointer type [-Werror=incompatible-pointer-types]

So I'm afraid I cannot test patch 3/5 yet ;-)

> +                       count++;
> +       }
> +
> +       return count;
> +}
> +
>  #endif /* __LINUX_GPIO_DRIVER_H */

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
	 Geert Uytterhoeven <geert+renesas@glider.be>,
	Fabien Dessenne <fabien.dessenne@foss.st.com>,
	 Linus Walleij <linus.walleij@linaro.org>,
	 "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 "open list:ARM/Amlogic Meson..."
	<linux-amlogic@lists.infradead.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	 Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	 linux-stm32@st-md-mailman.stormreply.com,
	 Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	 Jerome Brunet <jbrunet@baylibre.com>,
	 Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	 Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	 Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v1 1/5] gpiolib: Introduce gpiochip_count() helper
Date: Mon, 28 Mar 2022 09:35:25 +0200	[thread overview]
Message-ID: <CAMuHMdXJo=XWNLKpFFe65fx-c7oPXmydvXxiPzGicNaxYthGbg@mail.gmail.com> (raw)
In-Reply-To: <20220325200338.54270-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

On Fri, Mar 25, 2022 at 9:04 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The gpiochip_count() helper iterates over the device child nodes that have
> the "gpio-controller" property set. It returns the number of such nodes
> under given device.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks for your patch!

> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -750,4 +751,17 @@ static inline void gpiochip_unlock_as_irq(struct gpio_chip *gc,
>  }
>  #endif /* CONFIG_GPIOLIB */
>
> +static inline unsigned int gpiochip_count(struct device *dev)
> +{
> +       struct fwnode_handle *child;
> +       unsigned int count = 0;
> +
> +       device_for_each_child_node(dev, child) {
> +               if (device_property_read_bool(child, "gpio-controller"))

error: passing argument 1 of ‘device_property_read_bool’ from
incompatible pointer type [-Werror=incompatible-pointer-types]

So I'm afraid I cannot test patch 3/5 yet ;-)

> +                       count++;
> +       }
> +
> +       return count;
> +}
> +
>  #endif /* __LINUX_GPIO_DRIVER_H */

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
	 Geert Uytterhoeven <geert+renesas@glider.be>,
	Fabien Dessenne <fabien.dessenne@foss.st.com>,
	 Linus Walleij <linus.walleij@linaro.org>,
	 "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 "open list:ARM/Amlogic Meson..."
	<linux-amlogic@lists.infradead.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	 Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	 linux-stm32@st-md-mailman.stormreply.com,
	 Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	 Jerome Brunet <jbrunet@baylibre.com>,
	 Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	 Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	 Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v1 1/5] gpiolib: Introduce gpiochip_count() helper
Date: Mon, 28 Mar 2022 09:35:25 +0200	[thread overview]
Message-ID: <CAMuHMdXJo=XWNLKpFFe65fx-c7oPXmydvXxiPzGicNaxYthGbg@mail.gmail.com> (raw)
In-Reply-To: <20220325200338.54270-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

On Fri, Mar 25, 2022 at 9:04 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The gpiochip_count() helper iterates over the device child nodes that have
> the "gpio-controller" property set. It returns the number of such nodes
> under given device.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks for your patch!

> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -750,4 +751,17 @@ static inline void gpiochip_unlock_as_irq(struct gpio_chip *gc,
>  }
>  #endif /* CONFIG_GPIOLIB */
>
> +static inline unsigned int gpiochip_count(struct device *dev)
> +{
> +       struct fwnode_handle *child;
> +       unsigned int count = 0;
> +
> +       device_for_each_child_node(dev, child) {
> +               if (device_property_read_bool(child, "gpio-controller"))

error: passing argument 1 of ‘device_property_read_bool’ from
incompatible pointer type [-Werror=incompatible-pointer-types]

So I'm afraid I cannot test patch 3/5 yet ;-)

> +                       count++;
> +       }
> +
> +       return count;
> +}
> +
>  #endif /* __LINUX_GPIO_DRIVER_H */

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-03-28  7:35 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25 20:03 [PATCH v1 1/5] gpiolib: Introduce gpiochip_count() helper Andy Shevchenko
2022-03-25 20:03 ` Andy Shevchenko
2022-03-25 20:03 ` Andy Shevchenko
2022-03-25 20:03 ` [PATCH v1 2/5] pinctrl: stm32: Replace custom code by gpiochip_count() call Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-29  7:59   ` Fabien DESSENNE
2022-03-29  7:59     ` Fabien DESSENNE
2022-03-29  7:59     ` Fabien DESSENNE
2022-03-29 11:14     ` Andy Shevchenko
2022-03-29 11:14       ` Andy Shevchenko
2022-03-29 11:14       ` Andy Shevchenko
2022-03-29 12:07   ` Fabien DESSENNE
2022-03-29 12:07     ` Fabien DESSENNE
2022-03-29 12:07     ` Fabien DESSENNE
2022-03-29 12:25     ` Andy Shevchenko
2022-03-29 12:25       ` Andy Shevchenko
2022-03-29 12:25       ` Andy Shevchenko
2022-03-25 20:03 ` [PATCH v1 3/5] pinctrl: renesas: " Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-25 20:03 ` [PATCH v1 4/5] pinctrl: meson: " Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-29 12:29   ` Neil Armstrong
2022-03-29 12:29     ` Neil Armstrong
2022-03-29 12:29     ` Neil Armstrong
2022-03-25 20:03 ` [PATCH v1 5/5] pinctrl: armada-37xx: " Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-25 20:03   ` Andy Shevchenko
2022-03-26  8:41   ` Sergey Shtylyov
2022-03-26  8:41     ` Sergey Shtylyov
2022-03-26  8:41     ` Sergey Shtylyov
2022-03-27 19:58     ` Andy Shevchenko
2022-03-27 19:58       ` Andy Shevchenko
2022-03-27 19:58       ` Andy Shevchenko
2022-03-28  7:35 ` Geert Uytterhoeven [this message]
2022-03-28  7:35   ` [PATCH v1 1/5] gpiolib: Introduce gpiochip_count() helper Geert Uytterhoeven
2022-03-28  7:35   ` Geert Uytterhoeven
2022-03-28  9:14   ` Andy Shevchenko
2022-03-28  9:14     ` Andy Shevchenko
2022-03-28  9:14     ` Andy Shevchenko

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='CAMuHMdXJo=XWNLKpFFe65fx-c7oPXmydvXxiPzGicNaxYthGbg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=fabien.dessenne@foss.st.com \
    --cc=geert+renesas@glider.be \
    --cc=gregory.clement@bootlin.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=sebastian.hesselbarth@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.