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 5/6] mfd: cros_ec: wait for completion of commands that return IN_PROGRESS

2014-09-17 Thread Lee Jones
On Thu, 11 Sep 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 this in cros_ec_cmd_xfer() under the EC's mutex so that

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

2014-09-11 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