Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: light: veml6070: add support for a regulator

Add support for a device-managed regulator with the reference name
provided in the datasheet (vdd).

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240929-veml6070-cleanup-v1-4-a9350341a646@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Javier Carrasco and committed by
Jonathan Cameron
4ad62021 d92fcd7e

+4
+4
drivers/iio/light/veml6070.c
··· 163 163 indio_dev->name = VEML6070_DRV_NAME; 164 164 indio_dev->modes = INDIO_DIRECT_MODE; 165 165 166 + ret = devm_regulator_get_enable(&client->dev, "vdd"); 167 + if (ret < 0) 168 + return ret; 169 + 166 170 data->client2 = i2c_new_dummy_device(client->adapter, VEML6070_ADDR_DATA_LSB); 167 171 if (IS_ERR(data->client2)) { 168 172 dev_err(&client->dev, "i2c device for second chip address failed\n");