Re: [PATCH] i2c: Enable Cadence driver for ARM64

2015-10-26 Thread Javier Martinez Canillas
Hello Lee, On 10/27/2015 01:45 AM, Lee Jones wrote: > On Tue, 27 Oct 2015, Javier Martinez Canillas wrote: > >> Hello, >> >> On 10/27/2015 12:00 AM, Lee Jones wrote: >>> On Mon, 26 Oct 2015, Wolfram Sang wrote: >>>> On Mon, Oct 26, 2015 at 02:32:36PM

Re: [PATCH] i2c: Enable Cadence driver for ARM64

2015-10-26 Thread Javier Martinez Canillas
>From d6dc34810d24f33afb3c158d519966c1b6167a2f Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas <jav...@osg.samsung.com> Date: Mon, 26 Oct 2015 23:46:52 +0900 Subject: [RFC PATCH] get_maintainer: Don't fallback to git by default The get_maintainer.pl script could be used to g

Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing

2015-09-24 Thread Javier Martinez Canillas
Hello Lee, On 09/20/2015 06:15 AM, Lee Jones wrote: > On Thu, 17 Sep 2015, Javier Martinez Canillas wrote: > >> Hello, >> >> On 09/11/2015 01:55 PM, Kieran Bingham wrote: >>> Hi Wolfram, >>> >>> I have picked this patchset [0] up from Lee to r

Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing

2015-09-24 Thread Javier Martinez Canillas
gt; to bring the I2C .probe() call-back more into line with the majority > of the other .probe() calls in the kernel i.e. with only a single > parameter. I'm really not a fan of passing some random void pointer > in. Using a look-up call to fetch ACPI/OF/I2C/etc data is the current >

Re: [RESEND PATCH v4 0/8] i2c: Relax mandatory I2C ID table passing

2015-09-17 Thread Javier Martinez Canillas
inter to a struct i2c_client as parameter and returns the data from the correct table so drivers that don't need that information won't get it at probe time but drivers that need it, can get it easily assisted by the core. Both options are similar, the question is if the I2C core should match and

Re: [RESEND PATCH 1/7] i2c: core: Export I2C module alias information in dummy driver

2015-08-31 Thread Javier Martinez Canillas
this part is pretty obvious... > Yes, sorry for missing that obvious detail... Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger

Re: [RESEND PATCH 1/7] i2c: core: Export I2C module alias information in dummy driver

2015-08-26 Thread Javier Martinez Canillas
Hello Wolfram, On 08/26/2015 06:55 PM, Wolfram Sang wrote: On Tue, Aug 25, 2015 at 08:31:11AM +0200, Javier Martinez Canillas wrote: The I2C core always reports the MODALIAS uevent as i2c:modalias regardless of the mechanism that was used to register the device (i.e: OF or board code

[RESEND PATCH 1/7] i2c: core: Export I2C module alias information in dummy driver

2015-08-25 Thread Javier Martinez Canillas
id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. Signed-off-by: Javier Martinez Canillas jav...@osg.samsung.com --- drivers/i2c/i2c-core.c | 1 + 1 file changed, 1 insertion(+) diff --git

[RESEND PATCH 0/7] Export I2C and OF module aliases in missing drivers

2015-08-25 Thread Javier Martinez Canillas
of sending a naked ping for each patch that I got no answer. Best regards, Javier Javier Martinez Canillas (7): i2c: core: Export I2C module alias information in dummy driver backlight: tosa: Export I2C module alias information usb: phy: isp1301: Export I2C module alias information ALSA

[PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency

2015-08-19 Thread Javier Martinez Canillas
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 jav...@osg.samsung.com --- drivers

[PATCH 0/6] ChromeOS EC Kconfig cleanups

2015-08-19 Thread Javier Martinez Canillas
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

[PATCH 27/27] i2c: (RFC, don't apply) report OF style modalias when probing using DT

2015-07-30 Thread Javier Martinez Canillas
instead so the module can be auto-loaded and also report the correct alias using sysfs: $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias of:NtrackpadTNULLCatmel,maxtouch Signed-off-by: Javier Martinez Canillas jav...@osg.samsung.com --- drivers/i2c/i2c-core.c | 8 1 file changed, 8

[PATCH 00/27] Export I2C and OF module aliases in missing drivers

2015-07-30 Thread Javier Martinez Canillas
with OF but that don't have a of_match_table. Although arguably, those drivers were relying on the assumption that a MODALIAS=i2c:foo would always be reported even for the OF case which is not the true on other subsystems. [0]: https://lkml.org/lkml/2014/8/28/283 Best regards, Javier Javier Martinez

[PATCH 09/27] i2c: core: Export I2C module alias information in dummy driver

2015-07-30 Thread Javier Martinez Canillas
module when the device is added. Signed-off-by: Javier Martinez Canillas jav...@osg.samsung.com --- drivers/i2c/i2c-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index e6d4935161e4..92dddfeb3f39 100644 --- a/drivers/i2c/i2c-core.c

Re: [PATCH 00/27] Export I2C and OF module aliases in missing drivers

2015-07-30 Thread Javier Martinez Canillas
Hello Dmitry, Thanks a lot for your feedback. On 07/30/2015 06:37 PM, Dmitry Torokhov wrote: On Thu, Jul 30, 2015 at 09:35:17AM -0700, Dmitry Torokhov wrote: Hi Javier, On Thu, Jul 30, 2015 at 06:18:25PM +0200, Javier Martinez Canillas wrote: Hello, Short version: This series add

Re: [PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-29 Thread Javier Martinez Canillas
Hello Lee, On 09/25/2014 04:48 PM, Lee Jones wrote: On Thu, 25 Sep 2014, Javier Martinez Canillas wrote: Understood, that's why I dropped this since as explained earlier, it makes more sense to include this change once the cros_ec_dev driver is pushed to upstream. The last version

Re: [PATCH 1/2 v2] i2c: cros-ec-tunnel: Add of match table

2014-09-29 Thread Javier Martinez Canillas
as the Cros EC MFD driver registers the MFD subdevices with an of_compatibility string. Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk Reviewed-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Applied to for-next, thanks! However, since you are working

Re: [PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-26 Thread Javier Martinez Canillas
On 09/26/2014 09:21 AM, Lee Jones wrote: On Thu, 25 Sep 2014, Javier Martinez Canillas wrote: Unfortunately this is going to have to wait until v3.19 now, as Linus is closing the -rcs early. I have subsequently applied my last patch to the MFD tree for v3.18. It will be good

Re: [PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-25 Thread Javier Martinez Canillas
Hello Lee, On 09/19/2014 02:15 AM, Lee Jones wrote: As explained above, DT, non-DT and x86 platforms instantiate the cros-ec-dev cells but DT platforms can define other child nodes. But I can remove the conditional if you want and reintroduce it once cros-ec-dev support is added. Yes,

Re: [PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-25 Thread Javier Martinez Canillas
On 09/25/2014 04:48 PM, Lee Jones wrote: On Thu, 25 Sep 2014, Javier Martinez Canillas wrote: The last version of the series (v4) I posted a week ago [0], does not include this patch so I hope the series can be picked for 3.18 since most of the patches were already acked by you

Re: [PATCH v3 5/6] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-09-18 Thread Javier Martinez Canillas
Hello Lee, Thanks a lot for your feedback. On 09/17/2014 06:23 PM, Lee Jones wrote: mutex_lock(ec_dev-lock); ret = ec_dev-cmd_xfer(ec_dev, msg); +if (msg-result == EC_RES_IN_PROGRESS) { +int i; +struct cros_ec_command status_msg; +struct

Re: [PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-18 Thread Javier Martinez Canillas
Hello Lee, On 09/17/2014 06:31 PM, Lee Jones wrote: -static const struct mfd_cell cros_devs[] = { -{ -.name = cros-ec-keyb, -.id = 1, -.of_compatible = google,cros-ec-keyb, -}, -{ -.name = cros-ec-i2c-tunnel, -.id

[PATCH v4 0/5] Second batch of cleanups for cros_ec

2014-09-18 Thread Javier Martinez Canillas
Hello, This is a second batch of cleanups patches for the mfd cros_ec driver and its subdevices drivers. The first batch of cleanups was posted by Doug Anderson [0] and have already been merged. The patches were picked from the ChromeOS 3.8 kernel and after these no cleanups patches for cros_ec

[PATCH v4 1/5] mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC

2014-09-18 Thread Javier Martinez Canillas
long term. * This same logic probably needs to be applied to the i2c driver. Signed-off-by: Doug Anderson diand...@chromium.org Reviewed-by: Randall Spangler rspang...@chromium.org Reviewed-by: Vadim Bendebury vben...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[PATCH v4 2/5] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-09-18 Thread Javier Martinez Canillas
...@chromium.org Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Wolfram Sang w...@the-dreams.de Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros

[PATCH v4 5/5] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-09-18 Thread Javier Martinez Canillas
-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- Changes since v3: - Fix us time and use raw values instead of a define. Suggested by Lee Jones. Changes since v2: - Explain in the commit message from where the delay and retry values come from. Commented by Andrew Bresticker. - Move

[PATCH v4 3/5] mfd: cros_ec: stop calling -cmd_xfer() directly

2014-09-18 Thread Javier Martinez Canillas
it across the different drivers. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Lee Jones lee.jo...@linaro.org

Re: [PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-18 Thread Javier Martinez Canillas
Hello Lee, On 09/18/2014 09:49 AM, Javier Martinez Canillas wrote: int cros_ec_register(struct cros_ec_device *ec_dev) { struct device *dev = ec_dev-dev; + struct device_node *node = dev-of_node; int err = 0; if (ec_dev-din_size) { @@ -140,12 +129,12 @@ int

Re: [PATCH RESEND 0/8] i2c: Relax mandatory I2C ID table passing

2014-09-16 Thread Javier Martinez Canillas
Hello Lee, On Tue, Sep 16, 2014 at 12:46 AM, Lee Jones lee.jo...@linaro.org wrote: On Fri, 12 Sep 2014, Javier Martinez Canillas wrote: So what I propose is to do it incrementally: 1) Merge Lee's series since that is definitely a step in the right direction to not make an I2C table mandatory

Re: [PATCH RESEND 0/8] i2c: Relax mandatory I2C ID table passing

2014-09-12 Thread Javier Martinez Canillas
[adding Sjoerd as cc who was the one that raised the module auto-loading issue] Hello, On Fri, Sep 12, 2014 at 3:46 PM, Wolfram Sang w...@the-dreams.de wrote: Placing this firmly back on your plate. I truly hope we don't miss another merge-window. This patch-set has the support of some

[PATCH v3 3/6] mfd: cros_ec: stop calling -cmd_xfer() directly

2014-09-11 Thread Javier Martinez Canillas
it across the different drivers. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Lee Jones lee.jo...@linaro.org

[PATCH v3 1/6] mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC

2014-09-11 Thread Javier Martinez Canillas
long term. * This same logic probably needs to be applied to the i2c driver. Signed-off-by: Doug Anderson diand...@chromium.org Reviewed-by: Randall Spangler rspang...@chromium.org Reviewed-by: Vadim Bendebury vben...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[PATCH v3 6/6] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-11 Thread Javier Martinez Canillas
From: Todd Broch tbr...@chromium.org If the EC device tree node has sub-nodes, try to instantiate them as MFD sub-devices. We can configure the EC features provided by the board. Signed-off-by: Todd Broch tbr...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[PATCH v3 2/6] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-09-11 Thread Javier Martinez Canillas
...@chromium.org Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Wolfram Sang w...@the-dreams.de Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros

[PATCH v3 4/6] mfd: cros_ec: move locking into cros_ec_cmd_xfer

2014-09-11 Thread Javier Martinez Canillas
From: Andrew Bresticker abres...@chromium.org Now that there's a central cros_ec_cmd_xfer(), move the locking out of the SPI driver. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[PATCH v3 5/6] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-09-11 Thread Javier Martinez Canillas
-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- Changes since v2: - Explain in the commit message from where the delay and retry values come from. Commented by Andrew Bresticker. - Move the needed definitions inside the if block. Suggested by Lee Jones. - Only check if result

[PATCH v3 0/6] Second batch of cleanups for cros_ec

2014-09-11 Thread Javier Martinez Canillas
Hello, This is a second batch of cleanups patches for the mfd cros_ec driver and its subdevices drivers. The first batch of cleanups was posted by Doug Anderson [0] and have already been merged. The patches were picked from the ChromeOS 3.8 kernel and after these no cleanups patches for cros_ec

[PATCH RFC] i2c: report OF style modalias when probing using DT

2014-09-11 Thread Javier Martinez Canillas
the module can be auto-loaded report the correct alias using sysfs: $ cat /sys/class/i2c-adapter/i2c-8/8-004b/modalias of:NtrackpadTNULLCatmel,maxtouch Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- Hello, I'm posting this patch as an RFC because it will regress

Re: [PATCH v2 6/7] mfd: cros_ec: Instantiate sub-devices from device tree

2014-09-08 Thread Javier Martinez Canillas
Hello Lee, Sorry for the delay but had been on holidays last week. On 09/04/2014 10:25 AM, Lee Jones wrote: -static const struct mfd_cell cros_devs[] = { -{ -.name = cros-ec-keyb, -.id = 1, -.of_compatible = google,cros-ec-keyb, -}, -{ -

Re: [PATCH v2 5/7] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-09-08 Thread Javier Martinez Canillas
Hello Lee, On 09/04/2014 10:34 AM, Lee Jones wrote: On Mon, 25 Aug 2014, Javier Martinez Canillas wrote: From: Andrew Bresticker abres...@chromium.org When an EC command returns EC_RES_IN_PROGRESS, we need to query the state of the EC until it indicates that it is no longer busy. Do

Re: [PATCH v2 0/7] Second batch of cleanups for cros_ec

2014-08-26 Thread Javier Martinez Canillas
Hello Dmitry, On 08/25/2014 08:01 PM, Dmitry Torokhov wrote: On Mon, Aug 25, 2014 at 07:28:01PM +0200, Javier Martinez Canillas wrote: #7 does not apply to my tree (I guess it depends on the 1st batch which I expect will go through MFD tree?). Maybe you could rebase it on top of my

[PATCH v2 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-08-25 Thread Javier Martinez Canillas
...@chromium.org Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Wolfram Sang w...@the-dreams.de Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros

[PATCH v2 0/7] Second batch of cleanups for cros_ec

2014-08-25 Thread Javier Martinez Canillas
This is a second batch of cleanups patches for the mfd cros_ec driver and its subdevices drivers. The first batch of cleanups was posted by Doug Anderson [0] and have already been merged. The patches were picked from the ChromeOS 3.8 kernel and after these no cleanups patches for cros_ec are left,

[PATCH v2 1/7] mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC

2014-08-25 Thread Javier Martinez Canillas
long term. * This same logic probably needs to be applied to the i2c driver. Signed-off-by: Doug Anderson diand...@chromium.org Reviewed-by: Randall Spangler rspang...@chromium.org Reviewed-by: Vadim Bendebury vben...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[PATCH v2 3/7] mfd: cros_ec: stop calling -cmd_xfer() directly

2014-08-25 Thread Javier Martinez Canillas
it across the different drivers. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Lee Jones lee.jo...@linaro.org

[PATCH v2 4/7] mfd: cros_ec: move locking into cros_ec_cmd_xfer

2014-08-25 Thread Javier Martinez Canillas
From: Andrew Bresticker abres...@chromium.org Now that there's a central cros_ec_cmd_xfer(), move the locking out of the SPI driver. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[PATCH v2 7/7] Input: cros_ec_keyb: Optimize ghosting algorithm.

2014-08-25 Thread Javier Martinez Canillas
-by: Andreas Färber afaer...@suse.de Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/input/keyboard/cros_ec_keyb.c | 92 +++ 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b

[PATCH v2 5/7] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-08-25 Thread Javier Martinez Canillas
to the EC while it is working on the in-progress command. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- Changes since v1: - The *xfer() calls don't modify the passed

[PATCH v2 6/7] mfd: cros_ec: Instantiate sub-devices from device tree

2014-08-25 Thread Javier Martinez Canillas
From: Todd Broch tbr...@chromium.org If the EC device tree node has sub-nodes, try to instantiate them as MFD sub-devices. We can configure the EC features provided by the board. Signed-off-by: Todd Broch tbr...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

Re: [PATCH v2 0/7] Second batch of cleanups for cros_ec

2014-08-25 Thread Javier Martinez Canillas
Hello Dmitry, On 08/25/2014 07:05 PM, Dmitry Torokhov wrote: Patches #1, #2, #6 and #7 do not depend of others so they can be merged independently but patches #3, #4 and #5 have to be merged in that specific order since they depend on the previous one. #7 does not apply to my tree (I

Re: [RESEND PATCH 5/7] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-08-22 Thread Javier Martinez Canillas
Hello Lee, Thanks a lot for your feedback. On 08/21/2014 04:21 PM, Lee Jones wrote: On Wed, 20 Aug 2014, Javier Martinez Canillas wrote: From: Andrew Bresticker abres...@chromium.org When an EC command returns EC_RES_IN_PROGRESS, we need to query the state of the EC until it indicates

Re: [RESEND PATCH 6/7] mfd: cros_ec: Instantiate sub-devices from device tree

2014-08-22 Thread Javier Martinez Canillas
Hello Lee, On 08/21/2014 04:25 PM, Lee Jones wrote: static const struct mfd_cell cros_devs[] = { -{ -.name = cros-ec-keyb, -.id = 1, -.of_compatible = google,cros-ec-keyb, -}, -{ -.name = cros-ec-i2c-tunnel, -.id

Re: [RESEND PATCH 4/7] mfd: cros_ec: move locking into cros_ec_cmd_xfer

2014-08-21 Thread Javier Martinez Canillas
Hello Doug, On 08/21/2014 12:36 AM, Doug Anderson wrote: Javier, On Wed, Aug 20, 2014 at 5:13 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: From: Andrew Bresticker abres...@chromium.org Now that there's a central cros_ec_cmd_xfer(), move the locking out of the SPI

Re: [RESEND PATCH 1/7] mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC

2014-08-21 Thread Javier Martinez Canillas
Hello Lee, On 08/21/2014 03:37 PM, Lee Jones wrote: On Wed, 20 Aug 2014, Javier Martinez Canillas wrote: From: Doug Anderson diand...@chromium.org If someone sends a EC_CMD_REBOOT_EC to the EC, the EC will likely be unresponsive for quite a while. Add a delay to the end of the command

[RESEND PATCH 6/7] mfd: cros_ec: Instantiate sub-devices from device tree

2014-08-20 Thread Javier Martinez Canillas
From: Todd Broch tbr...@chromium.org If the EC device tree node has sub-nodes, try to instantiate them as MFD sub-devices. We can configure the EC features provided by the board. Signed-off-by: Todd Broch tbr...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[RESEND PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-08-20 Thread Javier Martinez Canillas
...@chromium.org Reviewed-by: Doug Anderson diand...@chromium.org Acked-by: Wolfram Sang w...@the-dreams.de Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-cros

[RESEND PATCH 5/7] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-08-20 Thread Javier Martinez Canillas
to the EC while it is working on the in-progress command. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/mfd/cros_ec.c | 35 ++- 1 file

[RESEND PATCH 0/7] Second batch of cleanups for cros_ec

2014-08-20 Thread Javier Martinez Canillas
Hello Lee, This is a resend of a patch series originally sent [0] almost a month ago (July, 28). The series add a batch of cleanups patches for the mfd cros_ec driver and its subdevices drivers. The first batch of cleanups was posted by Doug Anderson [1] and have already been merged. The patches

[RESEND PATCH 4/7] mfd: cros_ec: move locking into cros_ec_cmd_xfer

2014-08-20 Thread Javier Martinez Canillas
From: Andrew Bresticker abres...@chromium.org Now that there's a central cros_ec_cmd_xfer(), move the locking out of the SPI and LPC drivers. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[RESEND PATCH 1/7] mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC

2014-08-20 Thread Javier Martinez Canillas
long term. * This same logic probably needs to be applied to the i2c driver. Signed-off-by: Doug Anderson diand...@chromium.org Reviewed-by: Randall Spangler rspang...@chromium.org Reviewed-by: Vadim Bendebury vben...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti

[RESEND PATCH 3/7] mfd: cros_ec: stop calling -cmd_xfer() directly

2014-08-20 Thread Javier Martinez Canillas
it across the different drivers. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk --- drivers/i2c/busses/i2c-cros-ec-tunnel.c | 2 +- drivers/input/keyboard/cros_ec_keyb.c

Re: [PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-08-01 Thread Javier Martinez Canillas
Hello Wolfram, On 08/01/2014 07:59 PM, Wolfram Sang wrote: +#define I2C_MAX_RETRIES 3 I think a define for this is overkill, yet I don't really mind. Acked-by: Wolfram Sang w...@the-dreams.de Thanks a lot. I assume this goes via MFD, let me know if I should take it. Yes, if

Re: [PATCH 0/7] Second batch of cleanups for cros_ec

2014-07-29 Thread Javier Martinez Canillas
Hi Andreas, On 07/29/2014 02:27 PM, Andreas Färber wrote: Hi Javier, Am 28.07.2014 14:19, schrieb Javier Martinez Canillas: The patches in this series are authored by different people (all on cc) and consist of the following: Andrew Bresticker (3): mfd: cros_ec: stop calling -cmd_xfer

Re: [PATCH 6/7] mfd: cros_ec: Instantiate sub-devices from device tree

2014-07-29 Thread Javier Martinez Canillas
Hello Andreas, On 07/29/2014 02:34 PM, Andreas Färber wrote: Hi Javier, Am 28.07.2014 14:19, schrieb Javier Martinez Canillas: From: Todd Broch tbr...@chromium.org If the EC device tree node has sub-nodes, try to instantiate them as MFD sub-devices. We can configure the EC features

[PATCH 1/7] mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC

2014-07-28 Thread Javier Martinez Canillas
From: Doug Anderson diand...@chromium.org If someone sends a EC_CMD_REBOOT_EC to the EC, the EC will likely be unresponsive for quite a while. Add a delay to the end of the command to prevent random failures of future commands. NOTES: * This could be optimized a bit by simply delaying the next

[PATCH 2/7] i2c: i2c-cros-ec-tunnel: Set retries to 3

2014-07-28 Thread Javier Martinez Canillas
From: Derek Basehore dbaseh...@chromium.org Since the i2c bus can get wedged on the EC sometimes, set the number of retries to 3. Since we un-wedge the bus immediately after the wedge happens, this is the correct fix since only one transfer will fail. Signed-off-by: Derek Basehore

[PATCH 7/7] Input: cros_ec_keyb: Optimize ghosting algorithm.

2014-07-28 Thread Javier Martinez Canillas
From: Todd Broch tbr...@chromium.org Previous algorithm was a bit conservative and complicating with respect to identifying key ghosting. This CL uses the bitops hamming weight function (hweight8) to count the number of matching rows for colM colN. If that number is 1 ghosting is present.

[PATCH 6/7] mfd: cros_ec: Instantiate sub-devices from device tree

2014-07-28 Thread Javier Martinez Canillas
From: Todd Broch tbr...@chromium.org If the EC device tree node has sub-nodes, try to instantiate them as MFD sub-devices. We can configure the EC features provided by the board. Signed-off-by: Todd Broch tbr...@chromium.org --- drivers/mfd/cros_ec.c | 40

[PATCH 5/7] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-07-28 Thread Javier Martinez Canillas
From: Andrew Bresticker abres...@chromium.org When an EC command returns EC_RES_IN_PROGRESS, we need to query the state of the EC until it indicates that it is no longer busy. Do this in cros_ec_cmd_xfer() under the EC's mutex so that other commands (e.g. keyboard, I2C passtru) aren't issued to

[PATCH 4/7] mfd: cros_ec: move locking into cros_ec_cmd_xfer

2014-07-28 Thread Javier Martinez Canillas
From: Andrew Bresticker abres...@chromium.org Now that there's a central cros_ec_cmd_xfer(), move the locking out of the SPI and LPC drivers. Signed-off-by: Andrew Bresticker abres...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- drivers/mfd/cros_ec.c | 10 +-

[PATCH 0/7] Second batch of cleanups for cros_ec

2014-07-28 Thread Javier Martinez Canillas
This is a second batch of cleanups patches for the mfd cros_ec driver and its subdevices drivers. The first batch of cleanups was posted by Doug Anderson [0] and have already been merged. The patches were picked from the ChromeOS 3.8 kernel and after these no cleanups patches for cros_ec are left,

[PATCH 3/7] mfd: cros_ec: stop calling -cmd_xfer() directly

2014-07-28 Thread Javier Martinez Canillas
From: Andrew Bresticker abres...@chromium.org Instead of having users of the ChromeOS EC call the interface-specific cmd_xfer() callback directly, introduce a central cros_ec_cmd_xfer() to use instead. This will allow us to put all the locking and retry logic in one place instead of duplicating

Re: [PATCH v2] i2c: s3c2410: resume the I2C controller earlier

2014-06-25 Thread Javier Martinez Canillas
, + .resume_noirq = s3c24xx_i2c_resume_noirq, + .freeze_noirq = s3c24xx_i2c_suspend_noirq, + .thaw_noirq = s3c24xx_i2c_resume_noirq, + .poweroff_noirq = s3c24xx_i2c_suspend_noirq, + .restore_noirq = s3c24xx_i2c_resume_noirq, #endif }; Looks good to me. Reviewed-by: Javier Martinez