linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] ChromeOS EC Kconfig cleanups
@ 2015-08-19 11:19 Javier Martinez Canillas
  2015-08-19 11:19 ` [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies Javier Martinez Canillas
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas, linux-i2c, linux-input

Hello,

This patch series attemp to fix the issues that exist with the ChromeOS
EC drivers Kconfig symbols. These are:

1) The MFD_CROS_EC config symbol select CROS_EC_PROTO and CHROME_PLATFORMS
   which caused a Kconfig unmet direct dependencies warning.

2) Mix of select and depends on for the CROS_EC_PROTO config symbol which
   may lead to circular Kconfig dependencies.

The first issue was because CHROME_PLATFORMS depend on X86 || ARM and the
MFD_CROS_EC didn't have this dependency. I thought the correct solution
was to remove the dependency for CHROME_PLATFORMS since in theory there
could be Chromebooks for other architectures.

That was made in commit d12bbcd3ea44 ("platform/chrome: Don't make
CHROME_PLATFORMS depends on X86 || ARM") but Geert nacked that and told me
the correct fix was the opposite, to add the dependencies to the driver
and possibly extend it with || COMPILE_TEST to have more build coverage.

So patch 1/5 do this and patch 2/5 reverts the mentioned commit and also
add || COMPILE_TEST to CHROME_PLATFORMS.

Patches 3/5 to 5/5 fix 2) by not making the drivers depend on CROS_EC_PROTO
since these should really depend on MFD_CROS_EC. And since MFD_CROSEC select
CROS_EC_PROTO already, that dependency is met as well.

Only patches 1/5 and 2/5 have to be applied in the same order and picked
through a single tree to avoid the Kconfig warning to appear again. The
other patches are independent and can go through the other subsystem trees.

Thanks a lot to Geert and Bartolomiej for the feedback and suggestions.

Best regards,
Javier


Javier Martinez Canillas (6):
  mfd: Add MFD_CROS_EC dependencies
  Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 ||
    ARM"
  platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO
  mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers
  i2c: Replace I2C_CROS_EC_TUNNEL dependency
  Input: Replace KEYBOARD_CROS_EC dependency

 drivers/i2c/busses/Kconfig      | 2 +-
 drivers/input/keyboard/Kconfig  | 2 +-
 drivers/mfd/Kconfig             | 5 +++--
 drivers/platform/chrome/Kconfig | 5 +++--
 4 files changed, 8 insertions(+), 6 deletions(-)

-- 
2.4.3


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies
  2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
@ 2015-08-19 11:19 ` Javier Martinez Canillas
  2015-08-19 13:00   ` Lee Jones
  2015-08-19 11:19 ` [PATCH 2/6] Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM" Javier Martinez Canillas
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas

The MFD_CROS_EC symbol select CHROME_PLATFORMS and CROS_EC_PROTO but
that caused a Kconfig unmet direct dependencies warning since these
symbols could only be selected for X86 || ARM.

The fix it, the CHROME_PLATFORMS dependencies were relexed on commit
d12bbcd3ea44 ("platform/chrome: Don't make CHROME_PLATFORMS depends
on X86 || ARM") but that was found to be wrong and the correct fix
is to add the needed dependencies to the MFD_CROS_EC config symbol.

There are only x86 and ARM based Chromebooks so to avoid showing up
the config option on unsupported platforms, make the symbol depend on
these architectures. Also add a || COMPILE_TEST so it can have build
coverage on other platforms.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 3dfe7bd4022f..feebc750aadf 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -97,6 +97,7 @@ config MFD_CROS_EC
 	select MFD_CORE
 	select CHROME_PLATFORMS
 	select CROS_EC_PROTO
+	depends on X86 || ARM || COMPILE_TEST
 	help
 	  If you say Y here you get support for the ChromeOS Embedded
 	  Controller (EC) providing keyboard, battery and power services.
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/6] Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM"
  2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
  2015-08-19 11:19 ` [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies Javier Martinez Canillas
@ 2015-08-19 11:19 ` Javier Martinez Canillas
  2015-08-21 17:03   ` Olof Johansson
  2015-08-19 11:19 ` [PATCH 3/6] platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO Javier Martinez Canillas
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas

This reverts commit d12bbcd3ea44 ("platform/chrome: Don't make
CHROME_PLATFORMS depends on X86 || ARM") since it was found to
not be the correct fix for the MFD_CROS_EC config unmet direct
dependencies warning.

The correct solution was to add the needed dependencies to the
MFD_CROS_EC symbol. Besides the revert, this patch extends the
CHROME_PLATFORMS symbol dependencies and adds || COMPILE_TEST
to allow drivers to have build coverage on other architectures.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/platform/chrome/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index 3271cd1abe7c..21f4ea6c6c21 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -4,6 +4,7 @@
 
 menuconfig CHROME_PLATFORMS
 	bool "Platform support for Chrome hardware"
+	depends on X86 || ARM || COMPILE_TEST
 	---help---
 	  Say Y here to get to see options for platform support for
 	  various Chromebooks and Chromeboxes. This option alone does
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/6] platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO
  2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
  2015-08-19 11:19 ` [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies Javier Martinez Canillas
  2015-08-19 11:19 ` [PATCH 2/6] Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM" Javier Martinez Canillas
@ 2015-08-19 11:19 ` Javier Martinez Canillas
  2015-08-21 17:03   ` Olof Johansson
  2015-08-19 11:19 ` [PATCH 4/6] mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers Javier Martinez Canillas
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas

The ChromeOS EC LPC and chardev drivers depend on CROS_EC_PROTO but
MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
on is bad practice as it may lead to circular Kconfig dependencies.

Since the platform devices that are matched with these drivers are
registered by the ChromeOS EC mfd driver, they really depend on
MFD_CROS_EC. And because this config option selects CROS_EC_PROTO,
that dependency is met as well. So make the drivers to depend on
MFD_CROS_EC instead of CROS_EC_PROTO.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/platform/chrome/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index 21f4ea6c6c21..fde1129501f5 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -40,7 +40,7 @@ config CHROMEOS_PSTORE
 
 config CROS_EC_CHARDEV
         tristate "Chrome OS Embedded Controller userspace device interface"
-        depends on CROS_EC_PROTO
+        depends on MFD_CROS_EC
         ---help---
           This driver adds support to talk with the ChromeOS EC from userspace.
 
@@ -49,7 +49,7 @@ config CROS_EC_CHARDEV
 
 config CROS_EC_LPC
         tristate "ChromeOS Embedded Controller (LPC)"
-        depends on MFD_CROS_EC && CROS_EC_PROTO && (X86 || COMPILE_TEST)
+        depends on MFD_CROS_EC && (X86 || COMPILE_TEST)
         help
           If you say Y here, you get support for talking to the ChromeOS EC
           over an LPC bus. This uses a simple byte-level protocol with a
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/6] mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers
  2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
                   ` (2 preceding siblings ...)
  2015-08-19 11:19 ` [PATCH 3/6] platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO Javier Martinez Canillas
@ 2015-08-19 11:19 ` Javier Martinez Canillas
  2015-08-19 12:59   ` Lee Jones
  2015-08-19 11:19 ` [PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency Javier Martinez Canillas
  2015-08-19 11:19 ` [PATCH 6/6] Input: Replace KEYBOARD_CROS_EC dependency Javier Martinez Canillas
  5 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas

The ChromeOS EC SPI and I2C transport drivers depends on CROS_EC_PROTO
but MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
on is bad practice as it may lead to circular Kconfig dependencies.

Since these drivers already depend on MFD_CROS_EC and that config option
already selects CROS_EC_PROTO, there is no need to make them explicitly
depend on CROS_EC_PROTO since that dependency is already met.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/mfd/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index feebc750aadf..99d63675f073 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -106,7 +106,7 @@ config MFD_CROS_EC
 
 config MFD_CROS_EC_I2C
 	tristate "ChromeOS Embedded Controller (I2C)"
-	depends on MFD_CROS_EC && CROS_EC_PROTO && I2C
+	depends on MFD_CROS_EC && I2C
 
 	help
 	  If you say Y here, you get support for talking to the ChromeOS
@@ -116,7 +116,7 @@ config MFD_CROS_EC_I2C
 
 config MFD_CROS_EC_SPI
 	tristate "ChromeOS Embedded Controller (SPI)"
-	depends on MFD_CROS_EC && CROS_EC_PROTO && SPI
+	depends on MFD_CROS_EC && SPI
 
 	---help---
 	  If you say Y here, you get support for talking to the ChromeOS EC
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency
  2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
                   ` (3 preceding siblings ...)
  2015-08-19 11:19 ` [PATCH 4/6] mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers Javier Martinez Canillas
@ 2015-08-19 11:19 ` Javier Martinez Canillas
  2015-08-24 12:18   ` Wolfram Sang
  2015-08-19 11:19 ` [PATCH 6/6] Input: Replace KEYBOARD_CROS_EC dependency Javier Martinez Canillas
  5 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas, linux-i2c

The ChromeOS EC tunnel I2C bus driver depend on CROS_EC_PROTO but
MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
on is bad practice as it may lead to circular Kconfig dependencies.

Since the platform device that is matched with the I2C bus driver
is registered by the ChromeOS EC mfd driver, I2C_CROS_EC_TUNNEL
really depends on MFD_CROS_EC. And because this config option
selects CROS_EC_PROTO, that dependency is met as well. So make the
driver to depend on MFD_CROS_EC instead of CROS_EC_PROTO.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 0b798ae708fe..f25b508bbd71 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -1130,7 +1130,7 @@ config I2C_SIBYTE
 
 config I2C_CROS_EC_TUNNEL
 	tristate "ChromeOS EC tunnel I2C bus"
-	depends on CROS_EC_PROTO
+	depends on MFD_CROS_EC
 	help
 	  If you say yes here you get an I2C bus that will tunnel i2c commands
 	  through to the other side of the ChromeOS EC to the i2c bus
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/6] Input: Replace KEYBOARD_CROS_EC dependency
  2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
                   ` (4 preceding siblings ...)
  2015-08-19 11:19 ` [PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency Javier Martinez Canillas
@ 2015-08-19 11:19 ` Javier Martinez Canillas
  2015-08-19 21:26   ` Dmitry Torokhov
  5 siblings, 1 reply; 13+ messages in thread
From: Javier Martinez Canillas @ 2015-08-19 11:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gwendal Grignou, Doug Anderson, Bartlomiej Zolnierkiewicz,
	Wolfram Sang, Dmitry Torokhov, Lee Jones, Geert Uytterhoeven,
	Olof Johansson, Javier Martinez Canillas, linux-input

The ChromeOS EC keyboard driver config depend on CROS_EC_PROTO but
MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
on is bad practice as it may lead to circular Kconfig dependencies.

Since the platform device that is matched with the keyboard driver
is registered by the ChromeOS EC mfd driver, KEYBOARD_CROS_EC really
should depend on MFD_CROS_EC. And because this config option selects
CROS_EC_PROTO, that dependency is met as well. So make the driver
to depend on MFD_CROS_EC instead of CROS_EC_PROTO.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>



---

 drivers/input/keyboard/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index da53ae6a9334..2e80107ff630 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -689,7 +689,7 @@ config KEYBOARD_W90P910
 config KEYBOARD_CROS_EC
 	tristate "ChromeOS EC keyboard"
 	select INPUT_MATRIXKMAP
-	depends on CROS_EC_PROTO
+	depends on MFD_CROS_EC
 	help
 	  Say Y here to enable the matrix keyboard used by ChromeOS devices
 	  and implemented on the ChromeOS EC. You must enable one bus option
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 4/6] mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers
  2015-08-19 11:19 ` [PATCH 4/6] mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers Javier Martinez Canillas
@ 2015-08-19 12:59   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2015-08-19 12:59 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Gwendal Grignou, Doug Anderson,
	Bartlomiej Zolnierkiewicz, Wolfram Sang, Dmitry Torokhov,
	Geert Uytterhoeven, Olof Johansson

On Wed, 19 Aug 2015, Javier Martinez Canillas wrote:

> The ChromeOS EC SPI and I2C transport drivers depends on CROS_EC_PROTO
> but MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
> on is bad practice as it may lead to circular Kconfig dependencies.
> 
> Since these drivers already depend on MFD_CROS_EC and that config option
> already selects CROS_EC_PROTO, there is no need to make them explicitly
> depend on CROS_EC_PROTO since that dependency is already met.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
> 
>  drivers/mfd/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index feebc750aadf..99d63675f073 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -106,7 +106,7 @@ config MFD_CROS_EC
>  
>  config MFD_CROS_EC_I2C
>  	tristate "ChromeOS Embedded Controller (I2C)"
> -	depends on MFD_CROS_EC && CROS_EC_PROTO && I2C
> +	depends on MFD_CROS_EC && I2C
>  
>  	help
>  	  If you say Y here, you get support for talking to the ChromeOS
> @@ -116,7 +116,7 @@ config MFD_CROS_EC_I2C
>  
>  config MFD_CROS_EC_SPI
>  	tristate "ChromeOS Embedded Controller (SPI)"
> -	depends on MFD_CROS_EC && CROS_EC_PROTO && SPI
> +	depends on MFD_CROS_EC && SPI
>  
>  	---help---
>  	  If you say Y here, you get support for talking to the ChromeOS EC

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies
  2015-08-19 11:19 ` [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies Javier Martinez Canillas
@ 2015-08-19 13:00   ` Lee Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Lee Jones @ 2015-08-19 13:00 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Gwendal Grignou, Doug Anderson,
	Bartlomiej Zolnierkiewicz, Wolfram Sang, Dmitry Torokhov,
	Geert Uytterhoeven, Olof Johansson

On Wed, 19 Aug 2015, Javier Martinez Canillas wrote:

> The MFD_CROS_EC symbol select CHROME_PLATFORMS and CROS_EC_PROTO but
> that caused a Kconfig unmet direct dependencies warning since these
> symbols could only be selected for X86 || ARM.
> 
> The fix it, the CHROME_PLATFORMS dependencies were relexed on commit
> d12bbcd3ea44 ("platform/chrome: Don't make CHROME_PLATFORMS depends
> on X86 || ARM") but that was found to be wrong and the correct fix
> is to add the needed dependencies to the MFD_CROS_EC config symbol.
> 
> There are only x86 and ARM based Chromebooks so to avoid showing up
> the config option on unsupported platforms, make the symbol depend on
> these architectures. Also add a || COMPILE_TEST so it can have build
> coverage on other platforms.
> 
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
> 
>  drivers/mfd/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 3dfe7bd4022f..feebc750aadf 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -97,6 +97,7 @@ config MFD_CROS_EC
>  	select MFD_CORE
>  	select CHROME_PLATFORMS
>  	select CROS_EC_PROTO
> +	depends on X86 || ARM || COMPILE_TEST
>  	help
>  	  If you say Y here you get support for the ChromeOS Embedded
>  	  Controller (EC) providing keyboard, battery and power services.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 6/6] Input: Replace KEYBOARD_CROS_EC dependency
  2015-08-19 11:19 ` [PATCH 6/6] Input: Replace KEYBOARD_CROS_EC dependency Javier Martinez Canillas
@ 2015-08-19 21:26   ` Dmitry Torokhov
  0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Torokhov @ 2015-08-19 21:26 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Gwendal Grignou, Doug Anderson,
	Bartlomiej Zolnierkiewicz, Wolfram Sang, Lee Jones,
	Geert Uytterhoeven, Olof Johansson, linux-input

On Wed, Aug 19, 2015 at 01:19:58PM +0200, Javier Martinez Canillas wrote:
> The ChromeOS EC keyboard driver config depend on CROS_EC_PROTO but
> MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
> on is bad practice as it may lead to circular Kconfig dependencies.
> 
> Since the platform device that is matched with the keyboard driver
> is registered by the ChromeOS EC mfd driver, KEYBOARD_CROS_EC really
> should depend on MFD_CROS_EC. And because this config option selects
> CROS_EC_PROTO, that dependency is met as well. So make the driver
> to depend on MFD_CROS_EC instead of CROS_EC_PROTO.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 

Applied, thank you.

> 
> 
> ---
> 
>  drivers/input/keyboard/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index da53ae6a9334..2e80107ff630 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -689,7 +689,7 @@ config KEYBOARD_W90P910
>  config KEYBOARD_CROS_EC
>  	tristate "ChromeOS EC keyboard"
>  	select INPUT_MATRIXKMAP
> -	depends on CROS_EC_PROTO
> +	depends on MFD_CROS_EC
>  	help
>  	  Say Y here to enable the matrix keyboard used by ChromeOS devices
>  	  and implemented on the ChromeOS EC. You must enable one bus option
> -- 
> 2.4.3
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM"
  2015-08-19 11:19 ` [PATCH 2/6] Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM" Javier Martinez Canillas
@ 2015-08-21 17:03   ` Olof Johansson
  0 siblings, 0 replies; 13+ messages in thread
From: Olof Johansson @ 2015-08-21 17:03 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Gwendal Grignou, Doug Anderson,
	Bartlomiej Zolnierkiewicz, Wolfram Sang, Dmitry Torokhov,
	Lee Jones, Geert Uytterhoeven

On Wed, Aug 19, 2015 at 01:19:54PM +0200, Javier Martinez Canillas wrote:
> This reverts commit d12bbcd3ea44 ("platform/chrome: Don't make
> CHROME_PLATFORMS depends on X86 || ARM") since it was found to
> not be the correct fix for the MFD_CROS_EC config unmet direct
> dependencies warning.
> 
> The correct solution was to add the needed dependencies to the
> MFD_CROS_EC symbol. Besides the revert, this patch extends the
> CHROME_PLATFORMS symbol dependencies and adds || COMPILE_TEST
> to allow drivers to have build coverage on other architectures.
> 
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---

Applied, thanks.


-Olof


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/6] platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO
  2015-08-19 11:19 ` [PATCH 3/6] platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO Javier Martinez Canillas
@ 2015-08-21 17:03   ` Olof Johansson
  0 siblings, 0 replies; 13+ messages in thread
From: Olof Johansson @ 2015-08-21 17:03 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Gwendal Grignou, Doug Anderson,
	Bartlomiej Zolnierkiewicz, Wolfram Sang, Dmitry Torokhov,
	Lee Jones, Geert Uytterhoeven

On Wed, Aug 19, 2015 at 01:19:55PM +0200, Javier Martinez Canillas wrote:
> The ChromeOS EC LPC and chardev drivers depend on CROS_EC_PROTO but
> MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
> on is bad practice as it may lead to circular Kconfig dependencies.
> 
> Since the platform devices that are matched with these drivers are
> registered by the ChromeOS EC mfd driver, they really depend on
> MFD_CROS_EC. And because this config option selects CROS_EC_PROTO,
> that dependency is met as well. So make the drivers to depend on
> MFD_CROS_EC instead of CROS_EC_PROTO.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>


Applied, thanks.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency
  2015-08-19 11:19 ` [PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency Javier Martinez Canillas
@ 2015-08-24 12:18   ` Wolfram Sang
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfram Sang @ 2015-08-24 12:18 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Gwendal Grignou, Doug Anderson,
	Bartlomiej Zolnierkiewicz, Dmitry Torokhov, Lee Jones,
	Geert Uytterhoeven, Olof Johansson, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Wed, Aug 19, 2015 at 01:19:57PM +0200, Javier Martinez Canillas wrote:
> The ChromeOS EC tunnel I2C bus driver depend on CROS_EC_PROTO but
> MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends
> on is bad practice as it may lead to circular Kconfig dependencies.
> 
> Since the platform device that is matched with the I2C bus driver
> is registered by the ChromeOS EC mfd driver, I2C_CROS_EC_TUNNEL
> really depends on MFD_CROS_EC. And because this config option
> selects CROS_EC_PROTO, that dependency is met as well. So make the
> driver to depend on MFD_CROS_EC instead of CROS_EC_PROTO.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-24 12:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-19 11:19 [PATCH 0/6] ChromeOS EC Kconfig cleanups Javier Martinez Canillas
2015-08-19 11:19 ` [PATCH 1/6] mfd: Add MFD_CROS_EC dependencies Javier Martinez Canillas
2015-08-19 13:00   ` Lee Jones
2015-08-19 11:19 ` [PATCH 2/6] Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM" Javier Martinez Canillas
2015-08-21 17:03   ` Olof Johansson
2015-08-19 11:19 ` [PATCH 3/6] platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO Javier Martinez Canillas
2015-08-21 17:03   ` Olof Johansson
2015-08-19 11:19 ` [PATCH 4/6] mfd: cros_ec: Remove CROS_EC_PROTO dependency for SPI and I2C drivers Javier Martinez Canillas
2015-08-19 12:59   ` Lee Jones
2015-08-19 11:19 ` [PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency Javier Martinez Canillas
2015-08-24 12:18   ` Wolfram Sang
2015-08-19 11:19 ` [PATCH 6/6] Input: Replace KEYBOARD_CROS_EC dependency Javier Martinez Canillas
2015-08-19 21:26   ` Dmitry Torokhov

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).