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

Andy Shevchenko
2025-03-17T09:31:07Z

On Mon, Mar 17, 2025 at 09:39:11AM +0100, Francesco Dolcini wrote:
> 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:

...

> > > + 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.

Thanks, don't forget to summarize this in the commit message, it seems
useful information.

--
With Best Regards,
Andy Shevchenko