Re: [PATCH 7/7] usb: typec: tipd: Fail probe when the controller is in BOOT mode

From: Heikki Krogerus
Date: Mon Apr 04 2022 - 10:05:00 EST


On Thu, Mar 17, 2022 at 04:45:18PM +0100, Sebastian Krzyszkowiak wrote:
> BOOT mode means that the device isn't operational because of missing
> firmware, so there's no reason to try to continue in this condition
> (probe will fail in a different place anyway).
>
> Aside of that, the warning that used to be emited about "dead-battery
> condition" was misleading, as dead-battery condition is a different
> thing that's unrelated to operation mode.
>
> Therefore, assume that BOOT mode is not a supported mode of operation.
>
> Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@xxxxxxx>

Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>

> ---
> drivers/usb/typec/tipd/core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index d3c70aaf1a0c..c818cc40139d 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -729,8 +729,6 @@ static int tps6598x_check_mode(struct tps6598x *tps)
> case TPS_MODE_APP:
> return 0;
> case TPS_MODE_BOOT:
> - dev_warn(tps->dev, "dead-battery condition\n");
> - return 0;
> case TPS_MODE_BIST:
> case TPS_MODE_DISC:
> default:
> --
> 2.35.1

thanks,

--
heikki