[PATCH v2 3/6] sysinfo: tq_eeprom: new driver

Simon Glass sjg at chromium.org
Wed May 27 03:16:13 CEST 2026


Hi Nora,

On 2026-05-26T12:40:39, Feilke, Alexander
<Alexander.Feilke at ew.tq-group.com> wrote:
> sysinfo: tq_eeprom: new driver
>
> Introduce a sysinfo driver that can be instantiated from the device,
> which will provide information from the EEPROM found on all TQ-Systems
> SoMs.
>
> Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
> Signed-off-by: Max Merchel <Max.Merchel at ew.tq-group.com>
> Signed-off-by: Alexander Feilke <alexander.feilke at ew.tq-group.com>
>
> MAINTAINERS                                        |   1 +
>  configs/tqma7_common.config                        |   1 +
>  .../sysinfo/tq,eeprom-sysinfo.txt                  |  36 ++++
>  drivers/sysinfo/Kconfig                            |   8 +
>  drivers/sysinfo/Makefile                           |   1 +
>  drivers/sysinfo/tq_eeprom.c                        | 203 +++++++++++++++++++++
>  include/sysinfo/tq_eeprom.h                        |  24 +++
>  7 files changed, 274 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>

> +static int sysinfo_tq_eeprom_detect(struct udevice *dev)
> +{
> +     ret = nvmem_cell_read(&priv->device_info_cell, (u8 *)&data, sizeof(data));
> +     if (ret < 0) {
> +             dev_err(dev, "EEPROM read failed: %d\n", ret);
> +             return -EIO;
> +     }

It would normally be better to return ret rather than masking failures
as -EIO, unless you have a particular reason.

Regards,
Simon


More information about the U-Boot mailing list