[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aIMy_BHJYNA20k-x@mail.your-server.de>
Date: Fri, 25 Jul 2025 09:32:12 +0200
From: Andreas Klinger <ak@...klinger.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: jic23@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, lars@...afoo.de,
javier.carrasco.cruz@...il.com, mazziesaccount@...il.com,
arthur.becker@...tec.com, perdaniel.olsson@...s.com,
mgonellabolduc@...onoff.com, muditsharma.info@...il.com,
clamor95@...il.com, emil.gedenryd@...s.com,
devicetree@...r.kernel.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/3] iio: light: add support for veml6046x00 RGBIR
color sensor
Hi Andy,
thanks for the detailed review again. Some comments below.
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> schrieb am Mi, 16. Jul 10:34:
> > +#define VEML6046X00_GAIN_1 0x0
> > +#define VEML6046X00_GAIN_2 0x1
> > +#define VEML6046X00_GAIN_0_66 0x2
> > +#define VEML6046X00_GAIN_0_5 0x3
>
> Is it defined as hexadecimal in the datasheet? Otherwise use plain decimal
> numbers.
It's in the datasheet defined exactly the way i did.
> > +static int veml6046x00_validate_part_id(struct veml6046x00_data *data)
> > +{
> > + struct device *dev = regmap_get_device(data->regmap);
> > + unsigned int part_id;
> > + int ret;
> > + __le16 reg;
> > +
> > + ret = regmap_bulk_read(data->regmap, VEML6046X00_REG_ID,
> > + ®, sizeof(reg));
> > + if (ret)
> > + return dev_err_probe(dev, ret, "Failed to read ID\n");
> > +
> > + part_id = le16_to_cpu(reg);
> > + if (part_id != 0x0001)
> > + dev_info(dev, "Unknown ID %#04x\n", part_id);
>
> For 0 it will print 0 and not 0x0000. Is it okay?
I just tried and it prints 0x00 if the part_id is 0.
Best regards,
Andreas
Download attachment "signature.asc" of type "application/pgp-signature" (660 bytes)
Powered by blists - more mailing lists