LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/3] platform/chrome: cros_ec_lpc - Build fixes
@ 2015-02-27  5:37 Javier Martinez Canillas
  2015-02-27  5:37 ` [PATCH 1/3] platform/chrome: cros_ec_lpc - Include linux/io.h header file Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2015-02-27  5:37 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Doug Anderson, Bill Richardson, Simon Glass, Gwendal Grignou,
	Fengguang Wu, linux-kernel, Javier Martinez Canillas

Hello Olof,

This series adds a set of trivial fixes for build issues with the
cros_ec_lpc driver that were reported by Fengguang Wu's build bot.

It is composed of the following patches:

Javier Martinez Canillas (3):
  platform/chrome: cros_ec_lpc - Include linux/io.h header file
  platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
  platform/chrome: cros_ec_lpc - Drop owner assignment

 drivers/platform/chrome/Kconfig       | 2 +-
 drivers/platform/chrome/cros_ec_lpc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Best regards,
Javier

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

* [PATCH 1/3] platform/chrome: cros_ec_lpc - Include linux/io.h header file
  2015-02-27  5:37 [PATCH 0/3] platform/chrome: cros_ec_lpc - Build fixes Javier Martinez Canillas
@ 2015-02-27  5:37 ` Javier Martinez Canillas
  2015-02-27  5:37 ` [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST Javier Martinez Canillas
  2015-02-27  5:37 ` [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment Javier Martinez Canillas
  2 siblings, 0 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2015-02-27  5:37 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Doug Anderson, Bill Richardson, Simon Glass, Gwendal Grignou,
	Fengguang Wu, linux-kernel, Javier Martinez Canillas

The driver uses the inb() and outb() I/O functions so should
include the header file that has these functions definitions.

This patch fixes the following error when the header is not
explicitly included:

drivers/platform/chrome//cros_ec_lpc.c: In function ‘ec_response_timed_out’:
drivers/platform/chrome//cros_ec_lpc.c:40:3: error: implicit declaration of function ‘inb’ [-Werror=implicit-function-declaration]
drivers/platform/chrome//cros_ec_lpc.c: In function ‘cros_ec_cmd_xfer_lpc’:
drivers/platform/chrome//cros_ec_lpc.c:75:3: error: implicit declaration of function ‘outb’ [-Werror=implicit-function-declaration]

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/platform/chrome/cros_ec_lpc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index 822fdb36ded9..f00bf4d246a1 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -23,6 +23,7 @@
 
 #include <linux/dmi.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 #include <linux/mfd/cros_ec.h>
 #include <linux/mfd/cros_ec_commands.h>
 #include <linux/module.h>
-- 
2.1.3


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

* [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
  2015-02-27  5:37 [PATCH 0/3] platform/chrome: cros_ec_lpc - Build fixes Javier Martinez Canillas
  2015-02-27  5:37 ` [PATCH 1/3] platform/chrome: cros_ec_lpc - Include linux/io.h header file Javier Martinez Canillas
@ 2015-02-27  5:37 ` Javier Martinez Canillas
  2015-03-02 13:45   ` One Thousand Gnomes
  2015-02-27  5:37 ` [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment Javier Martinez Canillas
  2 siblings, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2015-02-27  5:37 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Doug Anderson, Bill Richardson, Simon Glass, Gwendal Grignou,
	Fengguang Wu, linux-kernel, Javier Martinez Canillas

The Low Pin Count bus was introduced by Intel and is only used
in x86 computers so it should depend on the X86 Kconfig option.

But also build the driver if the COMPILE_TEST option is enabled
to have build coverage in other architectures.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/platform/chrome/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index d4befbffae85..2a6531a5fde8 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -49,7 +49,7 @@ config CROS_EC_CHARDEV
 
 config CROS_EC_LPC
         tristate "ChromeOS Embedded Controller (LPC)"
-        depends on MFD_CROS_EC
+        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.1.3


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

* [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment
  2015-02-27  5:37 [PATCH 0/3] platform/chrome: cros_ec_lpc - Build fixes Javier Martinez Canillas
  2015-02-27  5:37 ` [PATCH 1/3] platform/chrome: cros_ec_lpc - Include linux/io.h header file Javier Martinez Canillas
  2015-02-27  5:37 ` [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST Javier Martinez Canillas
@ 2015-02-27  5:37 ` Javier Martinez Canillas
  2015-03-04 19:29   ` Olof Johansson
  2 siblings, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2015-02-27  5:37 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Doug Anderson, Bill Richardson, Simon Glass, Gwendal Grignou,
	Fengguang Wu, linux-kernel, Javier Martinez Canillas

Platform drivers don't need to set an owner
since it will be populated by the driver core.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/platform/chrome/cros_ec_lpc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index f00bf4d246a1..8f9ac4d7bbd0 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -270,7 +270,6 @@ MODULE_DEVICE_TABLE(dmi, cros_ec_lpc_dmi_table);
 static struct platform_driver cros_ec_lpc_driver = {
 	.driver = {
 		.name = DRV_NAME,
-		.owner = THIS_MODULE,
 	},
 	.probe = cros_ec_lpc_probe,
 	.remove = cros_ec_lpc_remove,
-- 
2.1.3


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

* Re: [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
  2015-02-27  5:37 ` [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST Javier Martinez Canillas
@ 2015-03-02 13:45   ` One Thousand Gnomes
  2015-03-02 13:58     ` Javier Martinez Canillas
  0 siblings, 1 reply; 9+ messages in thread
From: One Thousand Gnomes @ 2015-03-02 13:45 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Olof Johansson, Doug Anderson, Bill Richardson, Simon Glass,
	Gwendal Grignou, Fengguang Wu, linux-kernel

On Fri, 27 Feb 2015 06:37:49 +0100
Javier Martinez Canillas <javier.martinez@collabora.co.uk> wrote:

> The Low Pin Count bus was introduced by Intel and is only used
> in x86 computers

The LPC bus is in all but name a slightly chopped down ISA bus. It is not
x86 specific any more, and indeed there are wishbone/LPC busses used on
all sorts of systems and processor types.

The ChromeOS EC may well be X86 specific but if so please fix the commit
message accordingly.

Alan

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

* Re: [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
  2015-03-02 13:45   ` One Thousand Gnomes
@ 2015-03-02 13:58     ` Javier Martinez Canillas
  2015-03-04 19:27       ` Olof Johansson
  0 siblings, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2015-03-02 13:58 UTC (permalink / raw)
  To: One Thousand Gnomes
  Cc: Olof Johansson, Doug Anderson, Bill Richardson, Simon Glass,
	Gwendal Grignou, Fengguang Wu, linux-kernel

Hello Alan,

On 03/02/2015 02:45 PM, One Thousand Gnomes wrote:
> On Fri, 27 Feb 2015 06:37:49 +0100
> Javier Martinez Canillas <javier.martinez@collabora.co.uk> wrote:
> 
>> The Low Pin Count bus was introduced by Intel and is only used
>> in x86 computers
> 
> The LPC bus is in all but name a slightly chopped down ISA bus. It is not
> x86 specific any more, and indeed there are wishbone/LPC busses used on
> all sorts of systems and processor types.
>

Thanks a lot for the clarification, I didn't know that.
 
> The ChromeOS EC may well be X86 specific but if so please fix the commit
> message accordingly.
>

I'll let the ChromiumOS folks to answer if EC connected through LPC will
only be used in x86 Chromebooks and non-x86 Chromebooks will always use
either SPI or I2C. Or if a non-x86 Chromebook with a EC connected through
LPC may exist in the future.

To know if I should either update the commit message or drop $subject,
since after patch 1/3 the driver builds correctly in other architectures.
 
> Alan
>

Best regards,
Javier

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

* Re: [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST
  2015-03-02 13:58     ` Javier Martinez Canillas
@ 2015-03-04 19:27       ` Olof Johansson
  0 siblings, 0 replies; 9+ messages in thread
From: Olof Johansson @ 2015-03-04 19:27 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: One Thousand Gnomes, Doug Anderson, Bill Richardson, Simon Glass,
	Gwendal Grignou, Fengguang Wu, linux-kernel

On Mon, Mar 2, 2015 at 5:58 AM, Javier Martinez Canillas
<javier.martinez@collabora.co.uk> wrote:
> Hello Alan,
>
> On 03/02/2015 02:45 PM, One Thousand Gnomes wrote:
>> On Fri, 27 Feb 2015 06:37:49 +0100
>> Javier Martinez Canillas <javier.martinez@collabora.co.uk> wrote:
>>
>>> The Low Pin Count bus was introduced by Intel and is only used
>>> in x86 computers
>>
>> The LPC bus is in all but name a slightly chopped down ISA bus. It is not
>> x86 specific any more, and indeed there are wishbone/LPC busses used on
>> all sorts of systems and processor types.
>>
>
> Thanks a lot for the clarification, I didn't know that.
>
>> The ChromeOS EC may well be X86 specific but if so please fix the commit
>> message accordingly.
>>
>
> I'll let the ChromiumOS folks to answer if EC connected through LPC will
> only be used in x86 Chromebooks and non-x86 Chromebooks will always use
> either SPI or I2C. Or if a non-x86 Chromebook with a EC connected through
> LPC may exist in the future.

I doubt we'll connect it with LPC on anything but x86, on other
platforms we tend to go with SPI or i2c instead.

> To know if I should either update the commit message or drop $subject,
> since after patch 1/3 the driver builds correctly in other architectures.

I'll reword the commit message when I apply (which I'll do shortly).


-Olof

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

* Re: [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment
  2015-02-27  5:37 ` [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment Javier Martinez Canillas
@ 2015-03-04 19:29   ` Olof Johansson
  2015-03-04 20:24     ` Javier Martinez Canillas
  0 siblings, 1 reply; 9+ messages in thread
From: Olof Johansson @ 2015-03-04 19:29 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Doug Anderson, Bill Richardson, Simon Glass, Gwendal Grignou,
	Fengguang Wu, linux-kernel

On Fri, Feb 27, 2015 at 06:37:50AM +0100, Javier Martinez Canillas wrote:
> Platform drivers don't need to set an owner
> since it will be populated by the driver core.
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

I applied the version that came from Fengguang instead here, but thanks for
following up.

Patch 1 and 2 applied, with a changed commit message on 2.


-Olof

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

* Re: [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment
  2015-03-04 19:29   ` Olof Johansson
@ 2015-03-04 20:24     ` Javier Martinez Canillas
  0 siblings, 0 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2015-03-04 20:24 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Doug Anderson, Bill Richardson, Simon Glass, Gwendal Grignou,
	Fengguang Wu, linux-kernel

Hello Olof,

On 03/04/2015 08:29 PM, Olof Johansson wrote:
> On Fri, Feb 27, 2015 at 06:37:50AM +0100, Javier Martinez Canillas wrote:
>> Platform drivers don't need to set an owner
>> since it will be populated by the driver core.
>> 
>> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> 
> I applied the version that came from Fengguang instead here, but thanks for
> following up.
>

Oh, I just saw Fengguang's email that reported the warning but
missed the patch dropping the field, sorry about that.
 
> Patch 1 and 2 applied, with a changed commit message on 2.
> 
>

Great, thanks a lot.

> -Olof
> 

Best regards,
Javier

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

end of thread, other threads:[~2015-03-04 20:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27  5:37 [PATCH 0/3] platform/chrome: cros_ec_lpc - Build fixes Javier Martinez Canillas
2015-02-27  5:37 ` [PATCH 1/3] platform/chrome: cros_ec_lpc - Include linux/io.h header file Javier Martinez Canillas
2015-02-27  5:37 ` [PATCH 2/3] platform/chrome: cros_ec_lpc - Depend on X86 || COMPILE_TEST Javier Martinez Canillas
2015-03-02 13:45   ` One Thousand Gnomes
2015-03-02 13:58     ` Javier Martinez Canillas
2015-03-04 19:27       ` Olof Johansson
2015-02-27  5:37 ` [PATCH 3/3] platform/chrome: cros_ec_lpc - Drop owner assignment Javier Martinez Canillas
2015-03-04 19:29   ` Olof Johansson
2015-03-04 20:24     ` Javier Martinez Canillas

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