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 ec_response_get_comms_status status;
>> +
>> +            status_msg.version = 0;
>> +            status_msg.command = EC_CMD_GET_COMMS_STATUS;
>> +            status_msg.outdata = NULL;
>> +            status_msg.outsize = 0;
>> +            status_msg.indata = (uint8_t *)&status;
>> +            status_msg.insize = sizeof(status);
>> +
>> +            /*
>> +             * Query the EC's status until it's no longer busy or
>> +             * we encounter an error.
>> +             */
>> +            for (i = 0; i < EC_COMMAND_RETRIES; i++) {
>> +                    usleep_range(EC_RETRY_DELAY_MS, EC_RETRY_DELAY_MS + 1);
> 
> Remove the EC_RETRY_DELAY_MS define and place the values in raw.
>

Ok, will do.

> You're now sleeping for 10us.  Did you test the changes?
> 

Duh, I must had been sleepy since I thought about changing the define but I
completely missed... which proves your point that raw values are more explicit
than using a define here.

Yes, I'm testing the changes and making sure that it does not add any
regression but I was not able to reproduce the case when an EC command result
is IN_PROGRESS. I'll investigate further on how to properly test that branch
before posting v4.

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to