Re: [RFC PATCH v1 2/2] platform: toradex: add preliminary support for Embedded Controller

From: Francesco Dolcini
Date: Mon Mar 17 2025 - 04:39:46 EST


Hello Andy,
thanks for the review.

On Thu, Mar 13, 2025 at 04:53:35PM +0200, Andy Shevchenko wrote:
> On Thu, Mar 13, 2025 at 03:43:31PM +0100, Francesco Dolcini wrote:
>
> > Add new platform driver for the Embedded Controller currently used
> > in Toradex SMARC iMX8MP and SMARC iMX95.
> > It currently provides power-off and restart (reset) handlers.

...

> > + err = regmap_bulk_read(ec->regmap, EC_CHIP_ID_REG, &reg_val, EC_ID_VERSION_LEN);
> > + if (err)
> > + return dev_err_probe(dev, err,
> > + "Cannot read id and version registers\n");
> > +
> > + dev_info(dev, "Toradex Embedded Controller id %x - Firmware %d.%d\n",
>
> Specifiers are semirandom. Why signed? Why x and not %u?

The firmware version ("Firmware %d.%d") is two unsigned decimal number,
so yes, I will change to "Firmware %u.%u".

The ID is just an identifier that is documented as hex, therefore I
think that the most convenient way to display it is as a hex number.

Francesco