* [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB
@ 2024-01-25 8:15 Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 2/3] gpiolib: add gpio_device_get_base() " Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25 8:15 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Peter Rosin, linux-gpio,
linux-kernel
Cc: Krzysztof Kozlowski, stable, Philipp Zabel
Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled.
Cc: <stable@vger.kernel.org>
Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Philipp Zabel <p.zabel@pengutronix.de>
---
include/linux/gpio/driver.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 9a5c6c76e653..012797e7106d 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
return ERR_PTR(-ENODEV);
}
+static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
+{
+ WARN_ON(1);
+ return ERR_PTR(-ENODEV);
+}
+
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
unsigned int offset)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] gpiolib: add gpio_device_get_base() stub for !GPIOLIB
2024-01-25 8:15 [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Krzysztof Kozlowski
@ 2024-01-25 8:16 ` Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 3/3] gpiolib: add gpio_device_get_label() " Krzysztof Kozlowski
2024-01-25 8:36 ` [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() " Bartosz Golaszewski
2 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25 8:16 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Peter Rosin, linux-gpio,
linux-kernel
Cc: Krzysztof Kozlowski, stable, Philipp Zabel
Add empty stub of gpio_device_get_base() when GPIOLIB is not enabled.
Cc: <stable@vger.kernel.org>
Fixes: 8c85a102fc4e ("gpiolib: provide gpio_device_get_base()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Philipp Zabel <p.zabel@pengutronix.de>
---
include/linux/gpio/driver.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 012797e7106d..c1df7698edb0 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -825,6 +825,12 @@ static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
return ERR_PTR(-ENODEV);
}
+static inline int gpio_device_get_base(struct gpio_device *gdev)
+{
+ WARN_ON(1);
+ return -ENODEV;
+}
+
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
unsigned int offset)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] gpiolib: add gpio_device_get_label() stub for !GPIOLIB
2024-01-25 8:15 [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 2/3] gpiolib: add gpio_device_get_base() " Krzysztof Kozlowski
@ 2024-01-25 8:16 ` Krzysztof Kozlowski
2024-01-25 9:04 ` Bartosz Golaszewski
2024-01-25 8:36 ` [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() " Bartosz Golaszewski
2 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25 8:16 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Peter Rosin, linux-gpio,
linux-kernel
Cc: Krzysztof Kozlowski, stable, kernel test robot, Philipp Zabel
Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled.
Cc: <stable@vger.kernel.org>
Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()")
Suggested-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Reset framework will need it:
https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/
---
include/linux/gpio/driver.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index c1df7698edb0..7f75c9a51874 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev)
return -ENODEV;
}
+static inline const char *gpio_device_get_label(struct gpio_device *gdev)
+{
+ WARN_ON(1);
+ return NULL;
+}
+
static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
unsigned int offset)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB
2024-01-25 8:15 [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 2/3] gpiolib: add gpio_device_get_base() " Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 3/3] gpiolib: add gpio_device_get_label() " Krzysztof Kozlowski
@ 2024-01-25 8:36 ` Bartosz Golaszewski
2024-01-25 8:59 ` Krzysztof Kozlowski
2 siblings, 1 reply; 10+ messages in thread
From: Bartosz Golaszewski @ 2024-01-25 8:36 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linus Walleij, Peter Rosin, linux-gpio, linux-kernel, stable,
Philipp Zabel
On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> include/linux/gpio/driver.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index 9a5c6c76e653..012797e7106d 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
> return ERR_PTR(-ENODEV);
> }
>
> +static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
> +{
> + WARN_ON(1);
> + return ERR_PTR(-ENODEV);
> +}
> +
> static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
> unsigned int offset)
> {
> --
> 2.34.1
>
Why is this needed? Users of gpio/driver.h should select GPIOLIB.
Bart
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB
2024-01-25 8:36 ` [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() " Bartosz Golaszewski
@ 2024-01-25 8:59 ` Krzysztof Kozlowski
2024-01-31 9:00 ` Linus Walleij
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25 8:59 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, Peter Rosin, linux-gpio, linux-kernel, stable,
Philipp Zabel
On 25/01/2024 09:36, Bartosz Golaszewski wrote:
> On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled.
>>
>> Cc: <stable@vger.kernel.org>
>> Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Cc: Philipp Zabel <p.zabel@pengutronix.de>
>> ---
>> include/linux/gpio/driver.h | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
>> index 9a5c6c76e653..012797e7106d 100644
>> --- a/include/linux/gpio/driver.h
>> +++ b/include/linux/gpio/driver.h
>> @@ -819,6 +819,12 @@ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
>> return ERR_PTR(-ENODEV);
>> }
>>
>> +static inline struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
>> +{
>> + WARN_ON(1);
>> + return ERR_PTR(-ENODEV);
>> +}
>> +
>> static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
>> unsigned int offset)
>> {
>> --
>> 2.34.1
>>
>
> Why is this needed? Users of gpio/driver.h should select GPIOLIB.
The third patch shows you the user which will not select GPIOLIB. Why?
Because there is no hard dependency between one core framework (RESET)
on other core framework (GPIOLIB).
The first two patches are added for the same purpose, even though there
is no need currently.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] gpiolib: add gpio_device_get_label() stub for !GPIOLIB
2024-01-25 8:16 ` [PATCH 3/3] gpiolib: add gpio_device_get_label() " Krzysztof Kozlowski
@ 2024-01-25 9:04 ` Bartosz Golaszewski
2024-01-25 9:14 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Bartosz Golaszewski @ 2024-01-25 9:04 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linus Walleij, Peter Rosin, linux-gpio, linux-kernel, stable,
kernel test robot, Philipp Zabel
On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled.
>
> Cc: <stable@vger.kernel.org>
> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()")
> Suggested-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
>
> Reset framework will need it:
> https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/
And I suppose you'll want an immutable branch for that?
Bart
> ---
> include/linux/gpio/driver.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index c1df7698edb0..7f75c9a51874 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev)
> return -ENODEV;
> }
>
> +static inline const char *gpio_device_get_label(struct gpio_device *gdev)
> +{
> + WARN_ON(1);
> + return NULL;
> +}
> +
> static inline int gpiochip_lock_as_irq(struct gpio_chip *gc,
> unsigned int offset)
> {
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] gpiolib: add gpio_device_get_label() stub for !GPIOLIB
2024-01-25 9:04 ` Bartosz Golaszewski
@ 2024-01-25 9:14 ` Krzysztof Kozlowski
2024-01-25 9:28 ` Bartosz Golaszewski
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-25 9:14 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, Peter Rosin, linux-gpio, linux-kernel, stable,
kernel test robot, Philipp Zabel
On 25/01/2024 10:04, Bartosz Golaszewski wrote:
> On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled.
>>
>> Cc: <stable@vger.kernel.org>
>> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()")
>> Suggested-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Cc: Philipp Zabel <p.zabel@pengutronix.de>
>>
>> Reset framework will need it:
>> https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/
>
> And I suppose you'll want an immutable branch for that?
I guess that's the question to Philipp, but other way could be an Ack.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] gpiolib: add gpio_device_get_label() stub for !GPIOLIB
2024-01-25 9:14 ` Krzysztof Kozlowski
@ 2024-01-25 9:28 ` Bartosz Golaszewski
2024-01-25 9:34 ` Philipp Zabel
0 siblings, 1 reply; 10+ messages in thread
From: Bartosz Golaszewski @ 2024-01-25 9:28 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linus Walleij, Peter Rosin, linux-gpio, linux-kernel, stable,
kernel test robot, Philipp Zabel
On Thu, Jan 25, 2024 at 10:14 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 25/01/2024 10:04, Bartosz Golaszewski wrote:
> > On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled.
> >>
> >> Cc: <stable@vger.kernel.org>
> >> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()")
> >> Suggested-by: kernel test robot <lkp@intel.com>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> ---
> >>
> >> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> >>
> >> Reset framework will need it:
> >> https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/
> >
> > And I suppose you'll want an immutable branch for that?
>
> I guess that's the question to Philipp, but other way could be an Ack.
>
I prefer it to go through my tree in case of conflicts as I have a big
refactor coming up. I'll give it a day or two on the list and set up a
tag for Philipp.
Bartosz
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] gpiolib: add gpio_device_get_label() stub for !GPIOLIB
2024-01-25 9:28 ` Bartosz Golaszewski
@ 2024-01-25 9:34 ` Philipp Zabel
0 siblings, 0 replies; 10+ messages in thread
From: Philipp Zabel @ 2024-01-25 9:34 UTC (permalink / raw)
To: Bartosz Golaszewski, Krzysztof Kozlowski
Cc: Linus Walleij, Peter Rosin, linux-gpio, linux-kernel, stable,
kernel test robot
On Do, 2024-01-25 at 10:28 +0100, Bartosz Golaszewski wrote:
> On Thu, Jan 25, 2024 at 10:14 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> >
> > On 25/01/2024 10:04, Bartosz Golaszewski wrote:
> > > On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski
> > > <krzysztof.kozlowski@linaro.org> wrote:
> > > >
> > > > Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled.
> > > >
> > > > Cc: <stable@vger.kernel.org>
> > > > Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()")
> > > > Suggested-by: kernel test robot <lkp@intel.com>
> > > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > >
> > > > ---
> > > >
> > > > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > > >
> > > > Reset framework will need it:
> > > > https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/
> > >
> > > And I suppose you'll want an immutable branch for that?
> >
> > I guess that's the question to Philipp, but other way could be an Ack.
> >
>
> I prefer it to go through my tree in case of conflicts as I have a big
> refactor coming up. I'll give it a day or two on the list and set up a
> tag for Philipp.
Works for me, thank you.
regards
Philipp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB
2024-01-25 8:59 ` Krzysztof Kozlowski
@ 2024-01-31 9:00 ` Linus Walleij
0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2024-01-31 9:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bartosz Golaszewski, Peter Rosin, linux-gpio, linux-kernel,
stable, Philipp Zabel
On Thu, Jan 25, 2024 at 9:59 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> [Bart]
> > Why is this needed? Users of gpio/driver.h should select GPIOLIB.
>
> The third patch shows you the user which will not select GPIOLIB. Why?
> Because there is no hard dependency between one core framework (RESET)
> on other core framework (GPIOLIB).
>
> The first two patches are added for the same purpose, even though there
> is no need currently.
That reset driver implementing a GPIO chip has not been reviewed by the
GPIO maintainers so I looked up the patch and replied, we have
review comments.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-01-31 9:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25 8:15 [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 2/3] gpiolib: add gpio_device_get_base() " Krzysztof Kozlowski
2024-01-25 8:16 ` [PATCH 3/3] gpiolib: add gpio_device_get_label() " Krzysztof Kozlowski
2024-01-25 9:04 ` Bartosz Golaszewski
2024-01-25 9:14 ` Krzysztof Kozlowski
2024-01-25 9:28 ` Bartosz Golaszewski
2024-01-25 9:34 ` Philipp Zabel
2024-01-25 8:36 ` [PATCH 1/3] gpiolib: add gpiod_to_gpio_device() " Bartosz Golaszewski
2024-01-25 8:59 ` Krzysztof Kozlowski
2024-01-31 9:00 ` Linus Walleij
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).