[PATCH 08/62] ARM: davinci: use explicit 'select' for DA850_EVM

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 08/62] ARM: davinci: use explicit 'select' for DA850_EVM

Arnd Bergmann
The DAVINCI_DA850_EVM board uses an unusual method to
enable the GPIO_PCA953X and KEYBOARD_GPIO_POLLED symbols,
which leads to the dependencies on these symbols being
ignored. As GPIO_PCA953X actually requires I2C, that
can lead to build failures when I2C is disabled.

This patch removes the duplicate symbol definitions
and instead adds equivalent 'select' statements that
are conditional on the underlying dependencies.

A different question whether we actually want to automatically
enable them at all or rather put them into defconfig,
but that should be a separate patch.

Signed-off-by: Arnd Bergmann <[hidden email]>
Cc: Sekhar Nori <[hidden email]>
Cc: Kevin Hilman <[hidden email]>
Cc: [hidden email]
---
 arch/arm/mach-davinci/Kconfig | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 3b98e34..df794e9 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -163,6 +163,8 @@ config MACH_DAVINCI_DA850_EVM
  bool "TI DA850/OMAP-L138/AM18x Reference Platform"
  default ARCH_DAVINCI_DA850
  depends on ARCH_DAVINCI_DA850
+ select GPIO_PCA953X if I2C
+ select KEYBOARD_GPIO_POLLED if GPIOLIB
  help
   Say Y here to select the TI DA850/OMAP-L138/AM18x Evaluation Module.
 
@@ -209,11 +211,6 @@ config DA850_WL12XX
   Say Y if you want to use a wl1271 expansion card connected to the
   AM18x EVM.
 
-config GPIO_PCA953X
- default MACH_DAVINCI_DA850_EVM
-
-config KEYBOARD_GPIO_POLLED
- default MACH_DAVINCI_DA850_EVM
 
 config MACH_MITYOMAPL138
  bool "Critical Link MityDSP-L138/MityARM-1808 SoM"
--
1.8.3.2

_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 08/62] ARM: davinci: use explicit 'select' for DA850_EVM

Sekhar Nori
On Thursday 20 March 2014 12:59 AM, Arnd Bergmann wrote:
> The DAVINCI_DA850_EVM board uses an unusual method to
> enable the GPIO_PCA953X and KEYBOARD_GPIO_POLLED symbols,
> which leads to the dependencies on these symbols being
> ignored. As GPIO_PCA953X actually requires I2C, that
> can lead to build failures when I2C is disabled.
>
> This patch removes the duplicate symbol definitions

I am okay with this..

> and instead adds equivalent 'select' statements that
> are conditional on the underlying dependencies.

.. but not sure this is needed. The PCA953X was defaulted to y mainly
because the IO expander was used to detect presence of daughter cards.
Even then, I don't think there is any need to force its selection.

>
> A different question whether we actually want to automatically
> enable them at all or rather put them into defconfig,
> but that should be a separate patch.

It can be enabled through defconfig as you said. I agree that can be a
separate patch. For now, just dropping the replicated Kconfig symbols
should be okay.

Thanks,
Sekhar
_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 08/62] ARM: davinci: use explicit 'select' for DA850_EVM

Arnd Bergmann
On Thursday 20 March 2014, Sekhar Nori wrote:

> On Thursday 20 March 2014 12:59 AM, Arnd Bergmann wrote:
> > The DAVINCI_DA850_EVM board uses an unusual method to
> > enable the GPIO_PCA953X and KEYBOARD_GPIO_POLLED symbols,
> > which leads to the dependencies on these symbols being
> > ignored. As GPIO_PCA953X actually requires I2C, that
> > can lead to build failures when I2C is disabled.
> >
> > This patch removes the duplicate symbol definitions
>
> I am okay with this..
>
> > and instead adds equivalent 'select' statements that
> > are conditional on the underlying dependencies.
>
> .. but not sure this is needed. The PCA953X was defaulted to y mainly
> because the IO expander was used to detect presence of daughter cards.
> Even then, I don't think there is any need to force its selection.
>
> >
> > A different question whether we actually want to automatically
> > enable them at all or rather put them into defconfig,
> > but that should be a separate patch.
>
> It can be enabled through defconfig as you said. I agree that can be a
> separate patch. For now, just dropping the replicated Kconfig symbols
> should be okay.

Ok, even better then. I was trying to change the behavior as little
as possible, but not selecting the drivers is certainly the correct
approach. I've put the two symbols into the defconfig now so the builds
are unchanged.

        Arnd

8<----

>From 5eaf7fdfe7c831d3aa24428a6e8d4509ac160db6 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[hidden email]>
Date: Tue, 18 Feb 2014 12:23:19 +0100
Subject: [PATCH] ARM: davinci: use explicit 'select' for DA850_EVM

The DAVINCI_DA850_EVM board uses an unusual method to
enable the GPIO_PCA953X and KEYBOARD_GPIO_POLLED symbols,
which leads to the dependencies on these symbols being
ignored. As GPIO_PCA953X actually requires I2C, that
can lead to build failures when I2C is disabled.

This patch removes the duplicate symbol definitions
and instead enables them from the davinci_all_defconfig
file.

A different question whether we actually want to automatically
enable them at all or rather put them into defconfig,
but that should be a separate patch.

Signed-off-by: Arnd Bergmann <[hidden email]>
Acked-by: Sekhar Nori <[hidden email]>
Cc: Kevin Hilman <[hidden email]>
Cc: [hidden email]

diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index fff4eb6..16bdfab 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -218,3 +218,5 @@ CONFIG_DEBUG_ERRORS=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
 # CONFIG_CRYPTO_HW is not set
 CONFIG_CRC_T10DIF=m
+CONFIG_GPIO_PCA953X=y
+CONFIG_KEYBOARD_GPIO_POLLED=y
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 3b98e34..db18ef8 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -209,11 +209,6 @@ config DA850_WL12XX
   Say Y if you want to use a wl1271 expansion card connected to the
   AM18x EVM.
 
-config GPIO_PCA953X
- default MACH_DAVINCI_DA850_EVM
-
-config KEYBOARD_GPIO_POLLED
- default MACH_DAVINCI_DA850_EVM
 
 config MACH_MITYOMAPL138
  bool "Critical Link MityDSP-L138/MityARM-1808 SoM"
_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 08/62] ARM: davinci: use explicit 'select' for DA850_EVM

Sekhar Nori
On Friday 21 March 2014 09:26 PM, Arnd Bergmann wrote:

> From 5eaf7fdfe7c831d3aa24428a6e8d4509ac160db6 Mon Sep 17 00:00:00 2001
> From: Arnd Bergmann <[hidden email]>
> Date: Tue, 18 Feb 2014 12:23:19 +0100
> Subject: [PATCH] ARM: davinci: use explicit 'select' for DA850_EVM
>
> The DAVINCI_DA850_EVM board uses an unusual method to
> enable the GPIO_PCA953X and KEYBOARD_GPIO_POLLED symbols,
> which leads to the dependencies on these symbols being
> ignored. As GPIO_PCA953X actually requires I2C, that
> can lead to build failures when I2C is disabled.
>
> This patch removes the duplicate symbol definitions
> and instead enables them from the davinci_all_defconfig
> file.

> A different question whether we actually want to automatically
> enable them at all or rather put them into defconfig,
> but that should be a separate patch.

This para can be dropped now.

>
> Signed-off-by: Arnd Bergmann <[hidden email]>
> Acked-by: Sekhar Nori <[hidden email]>
> Cc: Kevin Hilman <[hidden email]>
> Cc: [hidden email]

Acked-by: Sekhar Nori <[hidden email]>

Thanks,
Sekhar

_______________________________________________
Davinci-linux-open-source mailing list
[hidden email]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source