* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-22 9:20 ` Amelie DELAUNAY
0 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-22 9:20 UTC (permalink / raw)
To: Lee Jones
Cc: Alexandre TORGUE, Linus Walleij, Randy Dunlap, linux-kernel,
linux-gpio, kbuild-all, Maxime Coquelin, linux-stm32,
linux-arm-kernel
On 5/22/19 10:41 AM, Lee Jones wrote:
> On Wed, 22 May 2019, Amelie DELAUNAY wrote:
>> On 5/22/19 7:48 AM, Lee Jones wrote:
>>> On Mon, 20 May 2019, Amelie Delaunay wrote:
>>>
>>>> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
>>>> not exist:
>>>> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
>>>> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
>>>> pctl->gpio_chip.of_node = np;
>>>>
>>>> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
>>>> Reported-by: kbuild test robot <lkp@intel.com>
>>>> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
>>>> ---
>>>> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
>>>> index eba872c..bb64aa0 100644
>>>> --- a/drivers/pinctrl/pinctrl-stmfx.c
>>>> +++ b/drivers/pinctrl/pinctrl-stmfx.c
>>>> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
>>>> pctl->gpio_chip.base = -1;
>>>> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
>>>> pctl->gpio_chip.can_sleep = true;
>>>> +#ifdef CONFIG_OF_GPIO
>>>> pctl->gpio_chip.of_node = np;
>>>> +#endif
>>>
>>> This is pretty ugly. Will STMFX ever be used without OF support? If
>>> not, it might be better to place this restriction on the driver as a
>>> whole.
>>>
>>> Incidentally, why is this blanked out in the structure definition?
>>> Even 'struct device' doesn't do this.
>>>
>> config PINCTRL_STMFX
>> tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
>> depends on I2C
>> depends on OF || COMPILE_TEST
>> select GENERIC_PINCONF
>> select GPIOLIB_IRQCHIP
>> select MFD_STMFX
>>
>> The issue is due to COMPILE_TEST: would "depends on OF || (OF &&
>> COMPILE_TEST)" be better ?
>
> Linus would be in a better position to respond, but from what I can
> see, maybe:
>
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> Although, I'm unsure why other COMPILE_TESTs haven't highlighted this
> issue. Perhaps because they have all been locked down to a particular
> arch:
>
> $ grep COMPILE_TEST -- drivers/pinctrl/Kconfig
> bool "Support pin multiplexing controllers" if COMPILE_TEST
> bool "Support pin configuration controllers" if COMPILE_TEST
> depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
> depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
> depends on ARCH_R7S72100 || COMPILE_TEST
> depends on ARCH_R7S9210 || COMPILE_TEST
> depends on ARCH_RZN1 || COMPILE_TEST
> depends on MIPS || COMPILE_TEST
>
> What about adding this to your Kconfig entry:
>
> select OF_GPIO
>
Yes COMPILE_TEST is combined with arch when depending on OF. But STMFX
isn't arch dependent, it is just OF and I2C dependent.
Randy also see a build error in pinctrl-stmfx.c when CONFIG_OF is not
set/enabled (randconfig):
../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
OF_GPIO depends on OF.
So either
depends on OF || (OF && COMPILE_TEST)
or
depends on OF || (OF_GPIO && COMPILE_TEST)
and
select OF_GPIO
What is the prettiest way ?
>>>> pctl->gpio_chip.need_valid_mask = true;
>>>>
>>>> ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl);
>>>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-22 9:20 ` Amelie DELAUNAY
0 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-22 9:20 UTC (permalink / raw)
To: Lee Jones
Cc: Linus Walleij, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On 5/22/19 10:41 AM, Lee Jones wrote:
> On Wed, 22 May 2019, Amelie DELAUNAY wrote:
>> On 5/22/19 7:48 AM, Lee Jones wrote:
>>> On Mon, 20 May 2019, Amelie Delaunay wrote:
>>>
>>>> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
>>>> not exist:
>>>> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
>>>> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
>>>> pctl->gpio_chip.of_node = np;
>>>>
>>>> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
>>>> Reported-by: kbuild test robot <lkp@intel.com>
>>>> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
>>>> ---
>>>> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
>>>> index eba872c..bb64aa0 100644
>>>> --- a/drivers/pinctrl/pinctrl-stmfx.c
>>>> +++ b/drivers/pinctrl/pinctrl-stmfx.c
>>>> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
>>>> pctl->gpio_chip.base = -1;
>>>> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
>>>> pctl->gpio_chip.can_sleep = true;
>>>> +#ifdef CONFIG_OF_GPIO
>>>> pctl->gpio_chip.of_node = np;
>>>> +#endif
>>>
>>> This is pretty ugly. Will STMFX ever be used without OF support? If
>>> not, it might be better to place this restriction on the driver as a
>>> whole.
>>>
>>> Incidentally, why is this blanked out in the structure definition?
>>> Even 'struct device' doesn't do this.
>>>
>> config PINCTRL_STMFX
>> tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
>> depends on I2C
>> depends on OF || COMPILE_TEST
>> select GENERIC_PINCONF
>> select GPIOLIB_IRQCHIP
>> select MFD_STMFX
>>
>> The issue is due to COMPILE_TEST: would "depends on OF || (OF &&
>> COMPILE_TEST)" be better ?
>
> Linus would be in a better position to respond, but from what I can
> see, maybe:
>
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> Although, I'm unsure why other COMPILE_TESTs haven't highlighted this
> issue. Perhaps because they have all been locked down to a particular
> arch:
>
> $ grep COMPILE_TEST -- drivers/pinctrl/Kconfig
> bool "Support pin multiplexing controllers" if COMPILE_TEST
> bool "Support pin configuration controllers" if COMPILE_TEST
> depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
> depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
> depends on ARCH_R7S72100 || COMPILE_TEST
> depends on ARCH_R7S9210 || COMPILE_TEST
> depends on ARCH_RZN1 || COMPILE_TEST
> depends on MIPS || COMPILE_TEST
>
> What about adding this to your Kconfig entry:
>
> select OF_GPIO
>
Yes COMPILE_TEST is combined with arch when depending on OF. But STMFX
isn't arch dependent, it is just OF and I2C dependent.
Randy also see a build error in pinctrl-stmfx.c when CONFIG_OF is not
set/enabled (randconfig):
../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
OF_GPIO depends on OF.
So either
depends on OF || (OF && COMPILE_TEST)
or
depends on OF || (OF_GPIO && COMPILE_TEST)
and
select OF_GPIO
What is the prettiest way ?
>>>> pctl->gpio_chip.need_valid_mask = true;
>>>>
>>>> ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl);
>>>
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
2019-05-22 9:20 ` Amelie DELAUNAY
(?)
@ 2019-05-22 9:30 ` Lee Jones
-1 siblings, 0 replies; 30+ messages in thread
From: Lee Jones @ 2019-05-22 9:30 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Linus Walleij, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On Wed, 22 May 2019, Amelie DELAUNAY wrote:
> On 5/22/19 10:41 AM, Lee Jones wrote:
> > On Wed, 22 May 2019, Amelie DELAUNAY wrote:
> >> On 5/22/19 7:48 AM, Lee Jones wrote:
> >>> On Mon, 20 May 2019, Amelie Delaunay wrote:
> >>>
> >>>> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
> >>>> not exist:
> >>>> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
> >>>> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
> >>>> pctl->gpio_chip.of_node = np;
> >>>>
> >>>> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
> >>>> Reported-by: kbuild test robot <lkp@intel.com>
> >>>> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> >>>> ---
> >>>> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
> >>>> 1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
> >>>> index eba872c..bb64aa0 100644
> >>>> --- a/drivers/pinctrl/pinctrl-stmfx.c
> >>>> +++ b/drivers/pinctrl/pinctrl-stmfx.c
> >>>> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
> >>>> pctl->gpio_chip.base = -1;
> >>>> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
> >>>> pctl->gpio_chip.can_sleep = true;
> >>>> +#ifdef CONFIG_OF_GPIO
> >>>> pctl->gpio_chip.of_node = np;
> >>>> +#endif
> >>>
> >>> This is pretty ugly. Will STMFX ever be used without OF support? If
> >>> not, it might be better to place this restriction on the driver as a
> >>> whole.
> >>>
> >>> Incidentally, why is this blanked out in the structure definition?
> >>> Even 'struct device' doesn't do this.
> >>>
> >> config PINCTRL_STMFX
> >> tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
> >> depends on I2C
> >> depends on OF || COMPILE_TEST
> >> select GENERIC_PINCONF
> >> select GPIOLIB_IRQCHIP
> >> select MFD_STMFX
> >>
> >> The issue is due to COMPILE_TEST: would "depends on OF || (OF &&
> >> COMPILE_TEST)" be better ?
> >
> > Linus would be in a better position to respond, but from what I can
> > see, maybe:
> >
> > depends on OF || (OF_GPIO && COMPILE_TEST)
> >
> > Although, I'm unsure why other COMPILE_TESTs haven't highlighted this
> > issue. Perhaps because they have all been locked down to a particular
> > arch:
> >
> > $ grep COMPILE_TEST -- drivers/pinctrl/Kconfig
> > bool "Support pin multiplexing controllers" if COMPILE_TEST
> > bool "Support pin configuration controllers" if COMPILE_TEST
> > depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> > depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
> > depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
> > depends on ARCH_R7S72100 || COMPILE_TEST
> > depends on ARCH_R7S9210 || COMPILE_TEST
> > depends on ARCH_RZN1 || COMPILE_TEST
> > depends on MIPS || COMPILE_TEST
> >
> > What about adding this to your Kconfig entry:
> >
> > select OF_GPIO
> >
>
> Yes COMPILE_TEST is combined with arch when depending on OF. But STMFX
> isn't arch dependent, it is just OF and I2C dependent.
>
> Randy also see a build error in pinctrl-stmfx.c when CONFIG_OF is not
> set/enabled (randconfig):
>
> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>
> OF_GPIO depends on OF.
>
> So either
> depends on OF || (OF && COMPILE_TEST)
> or
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> and
>
> select OF_GPIO
>
> What is the prettiest way ?
I'll leave the final call up to Linus.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-22 9:30 ` Lee Jones
0 siblings, 0 replies; 30+ messages in thread
From: Lee Jones @ 2019-05-22 9:30 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Alexandre TORGUE, Linus Walleij, Randy Dunlap, linux-kernel,
linux-gpio, kbuild-all, Maxime Coquelin, linux-stm32,
linux-arm-kernel
On Wed, 22 May 2019, Amelie DELAUNAY wrote:
> On 5/22/19 10:41 AM, Lee Jones wrote:
> > On Wed, 22 May 2019, Amelie DELAUNAY wrote:
> >> On 5/22/19 7:48 AM, Lee Jones wrote:
> >>> On Mon, 20 May 2019, Amelie Delaunay wrote:
> >>>
> >>>> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
> >>>> not exist:
> >>>> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
> >>>> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
> >>>> pctl->gpio_chip.of_node = np;
> >>>>
> >>>> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
> >>>> Reported-by: kbuild test robot <lkp@intel.com>
> >>>> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> >>>> ---
> >>>> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
> >>>> 1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
> >>>> index eba872c..bb64aa0 100644
> >>>> --- a/drivers/pinctrl/pinctrl-stmfx.c
> >>>> +++ b/drivers/pinctrl/pinctrl-stmfx.c
> >>>> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
> >>>> pctl->gpio_chip.base = -1;
> >>>> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
> >>>> pctl->gpio_chip.can_sleep = true;
> >>>> +#ifdef CONFIG_OF_GPIO
> >>>> pctl->gpio_chip.of_node = np;
> >>>> +#endif
> >>>
> >>> This is pretty ugly. Will STMFX ever be used without OF support? If
> >>> not, it might be better to place this restriction on the driver as a
> >>> whole.
> >>>
> >>> Incidentally, why is this blanked out in the structure definition?
> >>> Even 'struct device' doesn't do this.
> >>>
> >> config PINCTRL_STMFX
> >> tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
> >> depends on I2C
> >> depends on OF || COMPILE_TEST
> >> select GENERIC_PINCONF
> >> select GPIOLIB_IRQCHIP
> >> select MFD_STMFX
> >>
> >> The issue is due to COMPILE_TEST: would "depends on OF || (OF &&
> >> COMPILE_TEST)" be better ?
> >
> > Linus would be in a better position to respond, but from what I can
> > see, maybe:
> >
> > depends on OF || (OF_GPIO && COMPILE_TEST)
> >
> > Although, I'm unsure why other COMPILE_TESTs haven't highlighted this
> > issue. Perhaps because they have all been locked down to a particular
> > arch:
> >
> > $ grep COMPILE_TEST -- drivers/pinctrl/Kconfig
> > bool "Support pin multiplexing controllers" if COMPILE_TEST
> > bool "Support pin configuration controllers" if COMPILE_TEST
> > depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> > depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
> > depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
> > depends on ARCH_R7S72100 || COMPILE_TEST
> > depends on ARCH_R7S9210 || COMPILE_TEST
> > depends on ARCH_RZN1 || COMPILE_TEST
> > depends on MIPS || COMPILE_TEST
> >
> > What about adding this to your Kconfig entry:
> >
> > select OF_GPIO
> >
>
> Yes COMPILE_TEST is combined with arch when depending on OF. But STMFX
> isn't arch dependent, it is just OF and I2C dependent.
>
> Randy also see a build error in pinctrl-stmfx.c when CONFIG_OF is not
> set/enabled (randconfig):
>
> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>
> OF_GPIO depends on OF.
>
> So either
> depends on OF || (OF && COMPILE_TEST)
> or
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> and
>
> select OF_GPIO
>
> What is the prettiest way ?
I'll leave the final call up to Linus.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-22 9:30 ` Lee Jones
0 siblings, 0 replies; 30+ messages in thread
From: Lee Jones @ 2019-05-22 9:30 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Linus Walleij, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On Wed, 22 May 2019, Amelie DELAUNAY wrote:
> On 5/22/19 10:41 AM, Lee Jones wrote:
> > On Wed, 22 May 2019, Amelie DELAUNAY wrote:
> >> On 5/22/19 7:48 AM, Lee Jones wrote:
> >>> On Mon, 20 May 2019, Amelie Delaunay wrote:
> >>>
> >>>> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does
> >>>> not exist:
> >>>> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe':
> >>>> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node'
> >>>> pctl->gpio_chip.of_node = np;
> >>>>
> >>>> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
> >>>> Reported-by: kbuild test robot <lkp@intel.com>
> >>>> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> >>>> ---
> >>>> drivers/pinctrl/pinctrl-stmfx.c | 2 ++
> >>>> 1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
> >>>> index eba872c..bb64aa0 100644
> >>>> --- a/drivers/pinctrl/pinctrl-stmfx.c
> >>>> +++ b/drivers/pinctrl/pinctrl-stmfx.c
> >>>> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev)
> >>>> pctl->gpio_chip.base = -1;
> >>>> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins;
> >>>> pctl->gpio_chip.can_sleep = true;
> >>>> +#ifdef CONFIG_OF_GPIO
> >>>> pctl->gpio_chip.of_node = np;
> >>>> +#endif
> >>>
> >>> This is pretty ugly. Will STMFX ever be used without OF support? If
> >>> not, it might be better to place this restriction on the driver as a
> >>> whole.
> >>>
> >>> Incidentally, why is this blanked out in the structure definition?
> >>> Even 'struct device' doesn't do this.
> >>>
> >> config PINCTRL_STMFX
> >> tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
> >> depends on I2C
> >> depends on OF || COMPILE_TEST
> >> select GENERIC_PINCONF
> >> select GPIOLIB_IRQCHIP
> >> select MFD_STMFX
> >>
> >> The issue is due to COMPILE_TEST: would "depends on OF || (OF &&
> >> COMPILE_TEST)" be better ?
> >
> > Linus would be in a better position to respond, but from what I can
> > see, maybe:
> >
> > depends on OF || (OF_GPIO && COMPILE_TEST)
> >
> > Although, I'm unsure why other COMPILE_TESTs haven't highlighted this
> > issue. Perhaps because they have all been locked down to a particular
> > arch:
> >
> > $ grep COMPILE_TEST -- drivers/pinctrl/Kconfig
> > bool "Support pin multiplexing controllers" if COMPILE_TEST
> > bool "Support pin configuration controllers" if COMPILE_TEST
> > depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> > depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
> > depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
> > depends on ARCH_R7S72100 || COMPILE_TEST
> > depends on ARCH_R7S9210 || COMPILE_TEST
> > depends on ARCH_RZN1 || COMPILE_TEST
> > depends on MIPS || COMPILE_TEST
> >
> > What about adding this to your Kconfig entry:
> >
> > select OF_GPIO
> >
>
> Yes COMPILE_TEST is combined with arch when depending on OF. But STMFX
> isn't arch dependent, it is just OF and I2C dependent.
>
> Randy also see a build error in pinctrl-stmfx.c when CONFIG_OF is not
> set/enabled (randconfig):
>
> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>
> OF_GPIO depends on OF.
>
> So either
> depends on OF || (OF && COMPILE_TEST)
> or
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> and
>
> select OF_GPIO
>
> What is the prettiest way ?
I'll leave the final call up to Linus.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
2019-05-22 9:20 ` Amelie DELAUNAY
(?)
@ 2019-05-22 21:48 ` Linus Walleij
-1 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2019-05-22 21:48 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>
> OF_GPIO depends on OF.
>
> So either
> depends on OF || (OF && COMPILE_TEST)
> or
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> and
>
> select OF_GPIO
I would use just:
depends on OF_GPIO
Because OF_GPIO already depends on OF, and
compile tests will not work without OF_GPIO which
require OF so...
Besides it is what most other GPIO drivers do.
So just keep that one line and drop the rest.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-22 21:48 ` Linus Walleij
0 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2019-05-22 21:48 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Alexandre TORGUE, Randy Dunlap, linux-kernel, linux-gpio,
kbuild-all, Maxime Coquelin, Lee Jones, linux-stm32,
linux-arm-kernel
On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>
> OF_GPIO depends on OF.
>
> So either
> depends on OF || (OF && COMPILE_TEST)
> or
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> and
>
> select OF_GPIO
I would use just:
depends on OF_GPIO
Because OF_GPIO already depends on OF, and
compile tests will not work without OF_GPIO which
require OF so...
Besides it is what most other GPIO drivers do.
So just keep that one line and drop the rest.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-22 21:48 ` Linus Walleij
0 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2019-05-22 21:48 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>
> OF_GPIO depends on OF.
>
> So either
> depends on OF || (OF && COMPILE_TEST)
> or
> depends on OF || (OF_GPIO && COMPILE_TEST)
>
> and
>
> select OF_GPIO
I would use just:
depends on OF_GPIO
Because OF_GPIO already depends on OF, and
compile tests will not work without OF_GPIO which
require OF so...
Besides it is what most other GPIO drivers do.
So just keep that one line and drop the rest.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
2019-05-22 21:48 ` Linus Walleij
(?)
@ 2019-05-23 14:11 ` Amelie DELAUNAY
-1 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-23 14:11 UTC (permalink / raw)
To: Linus Walleij
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On 5/22/19 11:48 PM, Linus Walleij wrote:
> On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>
>> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
>> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
>> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>>
>> OF_GPIO depends on OF.
>>
>> So either
>> depends on OF || (OF && COMPILE_TEST)
>> or
>> depends on OF || (OF_GPIO && COMPILE_TEST)
>>
>> and
>>
>> select OF_GPIO
>
> I would use just:
>
> depends on OF_GPIO
>
> Because OF_GPIO already depends on OF, and
> compile tests will not work without OF_GPIO which
> require OF so...
>
> Besides it is what most other GPIO drivers do.
>
> So just keep that one line and drop the rest.
>
> Yours,
> Linus Walleij
>
Ok so I can get rid of COMPILE_TEST ?
depends on I2C
depends on OF_GPIO
select GENERIC_PINCONF
select GPIOLIB_IRQCHIP
select MFD_STMFX
Because I've no arch to balance COMPILE_TEST. Or maybe something like
depends on OF_GPIO && (OF || COMPILE_TEST)
even if OF_GPIO && OF is redundant ?
Regards,
Amelie
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-23 14:11 ` Amelie DELAUNAY
0 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-23 14:11 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre TORGUE, Randy Dunlap, linux-kernel, linux-gpio,
kbuild-all, Maxime Coquelin, Lee Jones, linux-stm32,
linux-arm-kernel
On 5/22/19 11:48 PM, Linus Walleij wrote:
> On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>
>> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
>> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
>> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>>
>> OF_GPIO depends on OF.
>>
>> So either
>> depends on OF || (OF && COMPILE_TEST)
>> or
>> depends on OF || (OF_GPIO && COMPILE_TEST)
>>
>> and
>>
>> select OF_GPIO
>
> I would use just:
>
> depends on OF_GPIO
>
> Because OF_GPIO already depends on OF, and
> compile tests will not work without OF_GPIO which
> require OF so...
>
> Besides it is what most other GPIO drivers do.
>
> So just keep that one line and drop the rest.
>
> Yours,
> Linus Walleij
>
Ok so I can get rid of COMPILE_TEST ?
depends on I2C
depends on OF_GPIO
select GENERIC_PINCONF
select GPIOLIB_IRQCHIP
select MFD_STMFX
Because I've no arch to balance COMPILE_TEST. Or maybe something like
depends on OF_GPIO && (OF || COMPILE_TEST)
even if OF_GPIO && OF is redundant ?
Regards,
Amelie
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-23 14:11 ` Amelie DELAUNAY
0 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-23 14:11 UTC (permalink / raw)
To: Linus Walleij
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On 5/22/19 11:48 PM, Linus Walleij wrote:
> On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>
>> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
>> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
>> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>>
>> OF_GPIO depends on OF.
>>
>> So either
>> depends on OF || (OF && COMPILE_TEST)
>> or
>> depends on OF || (OF_GPIO && COMPILE_TEST)
>>
>> and
>>
>> select OF_GPIO
>
> I would use just:
>
> depends on OF_GPIO
>
> Because OF_GPIO already depends on OF, and
> compile tests will not work without OF_GPIO which
> require OF so...
>
> Besides it is what most other GPIO drivers do.
>
> So just keep that one line and drop the rest.
>
> Yours,
> Linus Walleij
>
Ok so I can get rid of COMPILE_TEST ?
depends on I2C
depends on OF_GPIO
select GENERIC_PINCONF
select GPIOLIB_IRQCHIP
select MFD_STMFX
Because I've no arch to balance COMPILE_TEST. Or maybe something like
depends on OF_GPIO && (OF || COMPILE_TEST)
even if OF_GPIO && OF is redundant ?
Regards,
Amelie
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
2019-05-23 14:11 ` Amelie DELAUNAY
@ 2019-05-23 19:18 ` Linus Walleij
-1 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2019-05-23 19:18 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Alexandre TORGUE, Randy Dunlap, linux-kernel, linux-gpio,
kbuild-all, Maxime Coquelin, Lee Jones, linux-stm32,
linux-arm-kernel
On Thu, May 23, 2019 at 4:11 PM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> On 5/22/19 11:48 PM, Linus Walleij wrote:
> > On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> >
> >> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> >> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> >> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
> >>
> >> OF_GPIO depends on OF.
> >>
> >> So either
> >> depends on OF || (OF && COMPILE_TEST)
> >> or
> >> depends on OF || (OF_GPIO && COMPILE_TEST)
> >>
> >> and
> >>
> >> select OF_GPIO
> >
> > I would use just:
> >
> > depends on OF_GPIO
> >
> > Because OF_GPIO already depends on OF, and
> > compile tests will not work without OF_GPIO which
> > require OF so...
> >
> > Besides it is what most other GPIO drivers do.
> >
> > So just keep that one line and drop the rest.
> >
> > Yours,
> > Linus Walleij
> >
>
> Ok so I can get rid of COMPILE_TEST ?
> depends on I2C
> depends on OF_GPIO
> select GENERIC_PINCONF
> select GPIOLIB_IRQCHIP
> select MFD_STMFX
Yep just like that.
> Because I've no arch to balance COMPILE_TEST. Or maybe something like
> depends on OF_GPIO && (OF || COMPILE_TEST)
> even if OF_GPIO && OF is redundant ?
COMPILE_TEST is just to make something available for testing
on other architectures, such as testing ARM-specific drivers
on x86.
With just OF_GPIO as dependency, it will be compile tested anyways
because x86 allyesconfig will enable OF and OF_GPIO, and also
all the STMFX drivers.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-23 19:18 ` Linus Walleij
0 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2019-05-23 19:18 UTC (permalink / raw)
To: Amelie DELAUNAY
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On Thu, May 23, 2019 at 4:11 PM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> On 5/22/19 11:48 PM, Linus Walleij wrote:
> > On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
> >
> >> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
> >> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
> >> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
> >>
> >> OF_GPIO depends on OF.
> >>
> >> So either
> >> depends on OF || (OF && COMPILE_TEST)
> >> or
> >> depends on OF || (OF_GPIO && COMPILE_TEST)
> >>
> >> and
> >>
> >> select OF_GPIO
> >
> > I would use just:
> >
> > depends on OF_GPIO
> >
> > Because OF_GPIO already depends on OF, and
> > compile tests will not work without OF_GPIO which
> > require OF so...
> >
> > Besides it is what most other GPIO drivers do.
> >
> > So just keep that one line and drop the rest.
> >
> > Yours,
> > Linus Walleij
> >
>
> Ok so I can get rid of COMPILE_TEST ?
> depends on I2C
> depends on OF_GPIO
> select GENERIC_PINCONF
> select GPIOLIB_IRQCHIP
> select MFD_STMFX
Yep just like that.
> Because I've no arch to balance COMPILE_TEST. Or maybe something like
> depends on OF_GPIO && (OF || COMPILE_TEST)
> even if OF_GPIO && OF is redundant ?
COMPILE_TEST is just to make something available for testing
on other architectures, such as testing ARM-specific drivers
on x86.
With just OF_GPIO as dependency, it will be compile tested anyways
because x86 allyesconfig will enable OF and OF_GPIO, and also
all the STMFX drivers.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
2019-05-23 19:18 ` Linus Walleij
(?)
@ 2019-05-24 7:27 ` Amelie DELAUNAY
-1 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-24 7:27 UTC (permalink / raw)
To: Linus Walleij
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On 5/23/19 9:18 PM, Linus Walleij wrote:
> On Thu, May 23, 2019 at 4:11 PM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>> On 5/22/19 11:48 PM, Linus Walleij wrote:
>>> On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>>>
>>>> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
>>>> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
>>>> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>>>>
>>>> OF_GPIO depends on OF.
>>>>
>>>> So either
>>>> depends on OF || (OF && COMPILE_TEST)
>>>> or
>>>> depends on OF || (OF_GPIO && COMPILE_TEST)
>>>>
>>>> and
>>>>
>>>> select OF_GPIO
>>>
>>> I would use just:
>>>
>>> depends on OF_GPIO
>>>
>>> Because OF_GPIO already depends on OF, and
>>> compile tests will not work without OF_GPIO which
>>> require OF so...
>>>
>>> Besides it is what most other GPIO drivers do.
>>>
>>> So just keep that one line and drop the rest.
>>>
>>> Yours,
>>> Linus Walleij
>>>
>>
>> Ok so I can get rid of COMPILE_TEST ?
>> depends on I2C
>> depends on OF_GPIO
>> select GENERIC_PINCONF
>> select GPIOLIB_IRQCHIP
>> select MFD_STMFX
>
> Yep just like that.
>
>> Because I've no arch to balance COMPILE_TEST. Or maybe something like
>> depends on OF_GPIO && (OF || COMPILE_TEST)
>> even if OF_GPIO && OF is redundant ?
>
> COMPILE_TEST is just to make something available for testing
> on other architectures, such as testing ARM-specific drivers
> on x86.
>
> With just OF_GPIO as dependency, it will be compile tested anyways
> because x86 allyesconfig will enable OF and OF_GPIO, and also
> all the STMFX drivers.
>
> Yours,
> Linus Walleij
>
Thanks Linus for this clarification!
Regards,
Amelie
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-24 7:27 ` Amelie DELAUNAY
0 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-24 7:27 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre TORGUE, Randy Dunlap, linux-kernel, linux-gpio,
kbuild-all, Maxime Coquelin, Lee Jones, linux-stm32,
linux-arm-kernel
On 5/23/19 9:18 PM, Linus Walleij wrote:
> On Thu, May 23, 2019 at 4:11 PM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>> On 5/22/19 11:48 PM, Linus Walleij wrote:
>>> On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>>>
>>>> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
>>>> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
>>>> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>>>>
>>>> OF_GPIO depends on OF.
>>>>
>>>> So either
>>>> depends on OF || (OF && COMPILE_TEST)
>>>> or
>>>> depends on OF || (OF_GPIO && COMPILE_TEST)
>>>>
>>>> and
>>>>
>>>> select OF_GPIO
>>>
>>> I would use just:
>>>
>>> depends on OF_GPIO
>>>
>>> Because OF_GPIO already depends on OF, and
>>> compile tests will not work without OF_GPIO which
>>> require OF so...
>>>
>>> Besides it is what most other GPIO drivers do.
>>>
>>> So just keep that one line and drop the rest.
>>>
>>> Yours,
>>> Linus Walleij
>>>
>>
>> Ok so I can get rid of COMPILE_TEST ?
>> depends on I2C
>> depends on OF_GPIO
>> select GENERIC_PINCONF
>> select GPIOLIB_IRQCHIP
>> select MFD_STMFX
>
> Yep just like that.
>
>> Because I've no arch to balance COMPILE_TEST. Or maybe something like
>> depends on OF_GPIO && (OF || COMPILE_TEST)
>> even if OF_GPIO && OF is redundant ?
>
> COMPILE_TEST is just to make something available for testing
> on other architectures, such as testing ARM-specific drivers
> on x86.
>
> With just OF_GPIO as dependency, it will be compile tested anyways
> because x86 allyesconfig will enable OF and OF_GPIO, and also
> all the STMFX drivers.
>
> Yours,
> Linus Walleij
>
Thanks Linus for this clarification!
Regards,
Amelie
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined
@ 2019-05-24 7:27 ` Amelie DELAUNAY
0 siblings, 0 replies; 30+ messages in thread
From: Amelie DELAUNAY @ 2019-05-24 7:27 UTC (permalink / raw)
To: Linus Walleij
Cc: Lee Jones, Alexandre TORGUE, Maxime Coquelin, linux-gpio,
linux-kernel, linux-arm-kernel, linux-stm32, kbuild-all,
Randy Dunlap
On 5/23/19 9:18 PM, Linus Walleij wrote:
> On Thu, May 23, 2019 at 4:11 PM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>> On 5/22/19 11:48 PM, Linus Walleij wrote:
>>> On Wed, May 22, 2019 at 11:21 AM Amelie DELAUNAY <amelie.delaunay@st.com> wrote:
>>>
>>>> ../drivers/pinctrl/pinctrl-stmfx.c:409:20: error:
>>>> ‘pinconf_generic_dt_node_to_map_pin’ undeclared here (not in a function)
>>>> .dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
>>>>
>>>> OF_GPIO depends on OF.
>>>>
>>>> So either
>>>> depends on OF || (OF && COMPILE_TEST)
>>>> or
>>>> depends on OF || (OF_GPIO && COMPILE_TEST)
>>>>
>>>> and
>>>>
>>>> select OF_GPIO
>>>
>>> I would use just:
>>>
>>> depends on OF_GPIO
>>>
>>> Because OF_GPIO already depends on OF, and
>>> compile tests will not work without OF_GPIO which
>>> require OF so...
>>>
>>> Besides it is what most other GPIO drivers do.
>>>
>>> So just keep that one line and drop the rest.
>>>
>>> Yours,
>>> Linus Walleij
>>>
>>
>> Ok so I can get rid of COMPILE_TEST ?
>> depends on I2C
>> depends on OF_GPIO
>> select GENERIC_PINCONF
>> select GPIOLIB_IRQCHIP
>> select MFD_STMFX
>
> Yep just like that.
>
>> Because I've no arch to balance COMPILE_TEST. Or maybe something like
>> depends on OF_GPIO && (OF || COMPILE_TEST)
>> even if OF_GPIO && OF is redundant ?
>
> COMPILE_TEST is just to make something available for testing
> on other architectures, such as testing ARM-specific drivers
> on x86.
>
> With just OF_GPIO as dependency, it will be compile tested anyways
> because x86 allyesconfig will enable OF and OF_GPIO, and also
> all the STMFX drivers.
>
> Yours,
> Linus Walleij
>
Thanks Linus for this clarification!
Regards,
Amelie
^ permalink raw reply [flat|nested] 30+ messages in thread