diff mbox series

[1/3] gpio: xilinx: drop dependency on GPIO_OF

Message ID 20240930144804.75068-1-brgl@bgdev.pl (mailing list archive)
State New, archived
Headers show
Series [1/3] gpio: xilinx: drop dependency on GPIO_OF | expand

Commit Message

Bartosz Golaszewski Sept. 30, 2024, 2:48 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

This driver doesn't really depend on gpiolib-of being built and can be
compiled without it.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/gpio/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Comments

Michal Simek Oct. 1, 2024, 10:30 a.m. UTC | #1
On 9/30/24 16:48, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> This driver doesn't really depend on gpiolib-of being built and can be
> compiled without it.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>   drivers/gpio/Kconfig | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index d93cd4f722b4..0d676c96b72d 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -796,7 +796,6 @@ config GPIO_XGENE_SB
>   config GPIO_XILINX
>   	tristate "Xilinx GPIO support"
>   	select GPIOLIB_IRQCHIP
> -	depends on OF_GPIO
>   	help
>   	  Say yes here to support the Xilinx FPGA GPIO device.
>   

The patch itself is fine but it should be likely applied as last one not the 
first one.
If this is applied like that feel free to add

Acked-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal
Bartosz Golaszewski Oct. 1, 2024, 10:44 a.m. UTC | #2
On Tue, Oct 1, 2024 at 12:30 PM Michal Simek <michal.simek@amd.com> wrote:
>
> On 9/30/24 16:48, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > This driver doesn't really depend on gpiolib-of being built and can be
> > compiled without it.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> >   drivers/gpio/Kconfig | 1 -
> >   1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index d93cd4f722b4..0d676c96b72d 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -796,7 +796,6 @@ config GPIO_XGENE_SB
> >   config GPIO_XILINX
> >       tristate "Xilinx GPIO support"
> >       select GPIOLIB_IRQCHIP
> > -     depends on OF_GPIO
> >       help
> >         Say yes here to support the Xilinx FPGA GPIO device.
> >
>
> The patch itself is fine but it should be likely applied as last one not the
> first one.
> If this is applied like that feel free to add
>
> Acked-by: Michal Simek <michal.simek@amd.com>
>

I think you may be confusing CONFIG_OF with CONFIG_OF_GPIO. This
driver doesn't depend at build-time on the latter and this patch can
be applied right away.

Bart
Michal Simek Oct. 1, 2024, 11:13 a.m. UTC | #3
On 10/1/24 12:44, Bartosz Golaszewski wrote:
> On Tue, Oct 1, 2024 at 12:30 PM Michal Simek <michal.simek@amd.com> wrote:
>>
>> On 9/30/24 16:48, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>
>>> This driver doesn't really depend on gpiolib-of being built and can be
>>> compiled without it.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>> ---
>>>    drivers/gpio/Kconfig | 1 -
>>>    1 file changed, 1 deletion(-)
>>>
>>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
>>> index d93cd4f722b4..0d676c96b72d 100644
>>> --- a/drivers/gpio/Kconfig
>>> +++ b/drivers/gpio/Kconfig
>>> @@ -796,7 +796,6 @@ config GPIO_XGENE_SB
>>>    config GPIO_XILINX
>>>        tristate "Xilinx GPIO support"
>>>        select GPIOLIB_IRQCHIP
>>> -     depends on OF_GPIO
>>>        help
>>>          Say yes here to support the Xilinx FPGA GPIO device.
>>>
>>
>> The patch itself is fine but it should be likely applied as last one not the
>> first one.
>> If this is applied like that feel free to add
>>
>> Acked-by: Michal Simek <michal.simek@amd.com>
>>
> 
> I think you may be confusing CONFIG_OF with CONFIG_OF_GPIO. This
> driver doesn't depend at build-time on the latter and this patch can
> be applied right away.

ok then.

Thanks,
Michal
Bartosz Golaszewski Oct. 1, 2024, 12:31 p.m. UTC | #4
On Tue, Oct 1, 2024 at 1:13 PM Michal Simek <michal.simek@amd.com> wrote:
>
>
>
> On 10/1/24 12:44, Bartosz Golaszewski wrote:
> > On Tue, Oct 1, 2024 at 12:30 PM Michal Simek <michal.simek@amd.com> wrote:
> >>
> >> On 9/30/24 16:48, Bartosz Golaszewski wrote:
> >>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >>>
> >>> This driver doesn't really depend on gpiolib-of being built and can be
> >>> compiled without it.
> >>>
> >>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >>> ---
> >>>    drivers/gpio/Kconfig | 1 -
> >>>    1 file changed, 1 deletion(-)
> >>>
> >>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> >>> index d93cd4f722b4..0d676c96b72d 100644
> >>> --- a/drivers/gpio/Kconfig
> >>> +++ b/drivers/gpio/Kconfig
> >>> @@ -796,7 +796,6 @@ config GPIO_XGENE_SB
> >>>    config GPIO_XILINX
> >>>        tristate "Xilinx GPIO support"
> >>>        select GPIOLIB_IRQCHIP
> >>> -     depends on OF_GPIO
> >>>        help
> >>>          Say yes here to support the Xilinx FPGA GPIO device.
> >>>
> >>
> >> The patch itself is fine but it should be likely applied as last one not the
> >> first one.
> >> If this is applied like that feel free to add
> >>
> >> Acked-by: Michal Simek <michal.simek@amd.com>
> >>
> >
> > I think you may be confusing CONFIG_OF with CONFIG_OF_GPIO. This
> > driver doesn't depend at build-time on the latter and this patch can
> > be applied right away.
>
> ok then.
>
> Thanks,
> Michal
>

Now that I think about it - we should probably use of_match_ptr() once
we drop this dependency though.

Bart
Bartosz Golaszewski Oct. 2, 2024, 2:34 p.m. UTC | #5
On Tue, Oct 1, 2024 at 2:31 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Tue, Oct 1, 2024 at 1:13 PM Michal Simek <michal.simek@amd.com> wrote:
> >
> >
> >
> > On 10/1/24 12:44, Bartosz Golaszewski wrote:
> > > On Tue, Oct 1, 2024 at 12:30 PM Michal Simek <michal.simek@amd.com> wrote:
> > >>
> > >> On 9/30/24 16:48, Bartosz Golaszewski wrote:
> > >>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >>>
> > >>> This driver doesn't really depend on gpiolib-of being built and can be
> > >>> compiled without it.
> > >>>
> > >>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >>> ---
> > >>>    drivers/gpio/Kconfig | 1 -
> > >>>    1 file changed, 1 deletion(-)
> > >>>
> > >>> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > >>> index d93cd4f722b4..0d676c96b72d 100644
> > >>> --- a/drivers/gpio/Kconfig
> > >>> +++ b/drivers/gpio/Kconfig
> > >>> @@ -796,7 +796,6 @@ config GPIO_XGENE_SB
> > >>>    config GPIO_XILINX
> > >>>        tristate "Xilinx GPIO support"
> > >>>        select GPIOLIB_IRQCHIP
> > >>> -     depends on OF_GPIO
> > >>>        help
> > >>>          Say yes here to support the Xilinx FPGA GPIO device.
> > >>>
> > >>
> > >> The patch itself is fine but it should be likely applied as last one not the
> > >> first one.
> > >> If this is applied like that feel free to add
> > >>
> > >> Acked-by: Michal Simek <michal.simek@amd.com>
> > >>
> > >
> > > I think you may be confusing CONFIG_OF with CONFIG_OF_GPIO. This
> > > driver doesn't depend at build-time on the latter and this patch can
> > > be applied right away.
> >
> > ok then.
> >
> > Thanks,
> > Michal
> >
>
> Now that I think about it - we should probably use of_match_ptr() once
> we drop this dependency though.
>
> Bart

Scratch that - that would actually require us to conditionally define
the ids struct.

Bart
Bartosz Golaszewski Oct. 8, 2024, 8:18 a.m. UTC | #6
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Mon, 30 Sep 2024 16:48:02 +0200, Bartosz Golaszewski wrote:
> This driver doesn't really depend on gpiolib-of being built and can be
> compiled without it.
> 
> 

Applied, thanks!

[1/3] gpio: xilinx: drop dependency on GPIO_OF
      commit: e96c6de61233bfea7d0d0c32a7d539906ac23180
[2/3] gpio: xilinx: use helper variable to store the address of pdev->dev
      commit: 3cc3af160be758e95c9b4008b3bf06f4a81b653f
[3/3] gpio: xilinx: use generic device properties
      commit: 06c88b7ac9eed417f02cd748499b29318a9795be

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d93cd4f722b4..0d676c96b72d 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -796,7 +796,6 @@  config GPIO_XGENE_SB
 config GPIO_XILINX
 	tristate "Xilinx GPIO support"
 	select GPIOLIB_IRQCHIP
-	depends on OF_GPIO
 	help
 	  Say yes here to support the Xilinx FPGA GPIO device.