Re: [PATCH v2 3/4] iio: light: opt4001: refactor driver to prepare to support more devices
From: Jesper X Nilsson
Date: Mon Oct 26 2026 - 10:34:08 EST
On 10/23/26 15:51, Andy Shevchenko wrote:
On Fri, Oct 23, 2026 at 02:30:30PM +0200, Jesper X Nilsson wrote:Yes it can be a bulk read, but not part of this series.
Prepare opt4001 driver to be able to support OPT4041. Extend struct
opt4001_chip_info with fields channels and device_id because OPT4041 has
two channels and another device id.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
...
- ret = regmap_read(chip->regmap, OPT4001_LIGHT1_MSB, &light1);
+ ret = regmap_read(chip->regmap, reg, &light1);
if (ret < 0) {
dev_err(dev, "Failed to read data bytes");
return ret;
}
- ret = regmap_read(chip->regmap, OPT4001_LIGHT1_LSB, &light2);
+ ret = regmap_read(chip->regmap, reg + 1, &light2);
if (ret < 0) {
dev_err(dev, "Failed to read data bytes");
return ret;
Can it be actually a bulk read? (Not part of this series, I assume.)
If no one else adds a patch, I think I can send a patch later this week.
Best regards,
Jesper