bh1780 43 drivers/iio/light/bh1780.c static int bh1780_write(struct bh1780_data *bh1780, u8 reg, u8 val) bh1780 45 drivers/iio/light/bh1780.c int ret = i2c_smbus_write_byte_data(bh1780->client, bh1780 49 drivers/iio/light/bh1780.c dev_err(&bh1780->client->dev, bh1780 56 drivers/iio/light/bh1780.c static int bh1780_read(struct bh1780_data *bh1780, u8 reg) bh1780 58 drivers/iio/light/bh1780.c int ret = i2c_smbus_read_byte_data(bh1780->client, bh1780 61 drivers/iio/light/bh1780.c dev_err(&bh1780->client->dev, bh1780 68 drivers/iio/light/bh1780.c static int bh1780_read_word(struct bh1780_data *bh1780, u8 reg) bh1780 70 drivers/iio/light/bh1780.c int ret = i2c_smbus_read_word_data(bh1780->client, bh1780 73 drivers/iio/light/bh1780.c dev_err(&bh1780->client->dev, bh1780 84 drivers/iio/light/bh1780.c struct bh1780_data *bh1780 = iio_priv(indio_dev); bh1780 88 drivers/iio/light/bh1780.c return bh1780_write(bh1780, (u8)reg, (u8)writeval); bh1780 90 drivers/iio/light/bh1780.c ret = bh1780_read(bh1780, (u8)reg); bh1780 103 drivers/iio/light/bh1780.c struct bh1780_data *bh1780 = iio_priv(indio_dev); bh1780 110 drivers/iio/light/bh1780.c pm_runtime_get_sync(&bh1780->client->dev); bh1780 111 drivers/iio/light/bh1780.c value = bh1780_read_word(bh1780, BH1780_REG_DLOW); bh1780 114 drivers/iio/light/bh1780.c pm_runtime_mark_last_busy(&bh1780->client->dev); bh1780 115 drivers/iio/light/bh1780.c pm_runtime_put_autosuspend(&bh1780->client->dev); bh1780 148 drivers/iio/light/bh1780.c struct bh1780_data *bh1780; bh1780 155 drivers/iio/light/bh1780.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*bh1780)); bh1780 159 drivers/iio/light/bh1780.c bh1780 = iio_priv(indio_dev); bh1780 160 drivers/iio/light/bh1780.c bh1780->client = client; bh1780 164 drivers/iio/light/bh1780.c ret = bh1780_write(bh1780, BH1780_REG_CONTROL, BH1780_PON); bh1780 172 drivers/iio/light/bh1780.c ret = bh1780_read(bh1780, BH1780_REG_PARTID); bh1780 209 drivers/iio/light/bh1780.c struct bh1780_data *bh1780 = iio_priv(indio_dev); bh1780 216 drivers/iio/light/bh1780.c ret = bh1780_write(bh1780, BH1780_REG_CONTROL, BH1780_POFF); bh1780 230 drivers/iio/light/bh1780.c struct bh1780_data *bh1780 = iio_priv(indio_dev); bh1780 233 drivers/iio/light/bh1780.c ret = bh1780_write(bh1780, BH1780_REG_CONTROL, BH1780_POFF); bh1780 246 drivers/iio/light/bh1780.c struct bh1780_data *bh1780 = iio_priv(indio_dev); bh1780 249 drivers/iio/light/bh1780.c ret = bh1780_write(bh1780, BH1780_REG_CONTROL, BH1780_PON);