Re: [PATCH v3 4/6] pwm: cros-ec: Accept more error codes from cros_ec_cmd_xfer_status

From: Thierry Reding
Date: Mon Jul 27 2020 - 04:36:06 EST


On Sun, Jul 26, 2020 at 03:00:59PM -0700, Guenter Roeck wrote:
> Since commit c5cd2b47b203 ("platform/chrome: cros_ec_proto: Report command
> not supported") we can no longer assume that cros_ec_cmd_xfer_status()
> reports -EPROTO for all errors returned by the EC itself. A follow-up
> patch will change cros_ec_cmd_xfer_status() to report additional errors
> reported by the EC as distinguished Linux error codes.
>
> Handle this change by no longer assuming that only -EPROTO is used
> to report all errors returned by the EC itself. Instead, support both
> the old and the new error codes.
>
> Cc: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> Cc: Yu-Hsuan Hsu <yuhsuan@xxxxxxxxxxxx>
> Cc: Prashant Malani <pmalani@xxxxxxxxxxxx>
> Cc: Brian Norris <briannorris@xxxxxxxxxxxx>
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
> v3: Added patch
>
> drivers/pwm/pwm-cros-ec.c | 21 ++++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)

Acked-by: Thierry Reding <thierry.reding@xxxxxxxxx>

Attachment: signature.asc
Description: PGP signature