diff mbox series

[2/3] usb: typec: tipd: add error log to provide firmware name and size

Message ID 20240606-tps6598x_fw_update_log-v1-2-2b5b8369a0ba@wolfvision.net (mailing list archive)
State Accepted
Commit 916b8e5fa73d399a61156da7d914abfae74b962b
Headers show
Series usb: typec: tipd: minor improvements in the firmware update code | expand

Commit Message

Javier Carrasco June 6, 2024, 9:03 a.m. UTC
The current error logs do not show the firmware name and size for the
tps6598x. On the other hand, this information is provided for the
tps25750. Both implementations have access to that information, and the
existing message for the tps25750 can be used for the tps6598x without
extra modifications.

Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
 drivers/usb/typec/tipd/core.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Heikki Krogerus June 6, 2024, 9:35 a.m. UTC | #1
On Thu, Jun 06, 2024 at 11:03:56AM +0200, Javier Carrasco wrote:
> The current error logs do not show the firmware name and size for the
> tps6598x. On the other hand, this information is provided for the
> tps25750. Both implementations have access to that information, and the
> existing message for the tps25750 can be used for the tps6598x without
> extra modifications.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tipd/core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 851b0d02727a..58f6eeffd070 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1195,6 +1195,10 @@ static int tps6598x_apply_patch(struct tps6598x *tps)
>  
>  release_fw:
>  	release_firmware(fw);
> +	if (ret) {
> +		dev_err(tps->dev, "Failed to write patch %s of %zu bytes\n",
> +			firmware_name, fw->size);
> +	}
>  
>  	return ret;
>  };
> 
> -- 
> 2.40.1
diff mbox series

Patch

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 851b0d02727a..58f6eeffd070 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -1195,6 +1195,10 @@  static int tps6598x_apply_patch(struct tps6598x *tps)
 
 release_fw:
 	release_firmware(fw);
+	if (ret) {
+		dev_err(tps->dev, "Failed to write patch %s of %zu bytes\n",
+			firmware_name, fw->size);
+	}
 
 	return ret;
 };