lv0104cs 160 drivers/iio/light/lv0104cs.c static int lv0104cs_get_lux(struct lv0104cs_private *lv0104cs, lv0104cs 167 drivers/iio/light/lv0104cs.c regval |= lv0104cs_scales[lv0104cs->scale].regval; lv0104cs 168 drivers/iio/light/lv0104cs.c regval |= lv0104cs_int_times[lv0104cs->int_time].regval; lv0104cs 169 drivers/iio/light/lv0104cs.c ret = lv0104cs_write_reg(lv0104cs->client, regval); lv0104cs 174 drivers/iio/light/lv0104cs.c switch (lv0104cs->int_time) { lv0104cs 191 drivers/iio/light/lv0104cs.c ret = lv0104cs_read_adc(lv0104cs->client, &adc_output); lv0104cs 195 drivers/iio/light/lv0104cs.c ret = lv0104cs_write_reg(lv0104cs->client, LV0104CS_REGVAL_SLEEP); lv0104cs 200 drivers/iio/light/lv0104cs.c switch (lv0104cs->scale) { lv0104cs 230 drivers/iio/light/lv0104cs.c struct lv0104cs_private *lv0104cs = iio_priv(indio_dev); lv0104cs 236 drivers/iio/light/lv0104cs.c mutex_lock(&lv0104cs->lock); lv0104cs 240 drivers/iio/light/lv0104cs.c ret = lv0104cs_get_lux(lv0104cs, val, val2); lv0104cs 247 drivers/iio/light/lv0104cs.c *val = lv0104cs_calibscales[lv0104cs->calibscale].val; lv0104cs 248 drivers/iio/light/lv0104cs.c *val2 = lv0104cs_calibscales[lv0104cs->calibscale].val2; lv0104cs 253 drivers/iio/light/lv0104cs.c *val = lv0104cs_scales[lv0104cs->scale].val; lv0104cs 254 drivers/iio/light/lv0104cs.c *val2 = lv0104cs_scales[lv0104cs->scale].val2; lv0104cs 259 drivers/iio/light/lv0104cs.c *val = lv0104cs_int_times[lv0104cs->int_time].val; lv0104cs 260 drivers/iio/light/lv0104cs.c *val2 = lv0104cs_int_times[lv0104cs->int_time].val2; lv0104cs 269 drivers/iio/light/lv0104cs.c mutex_unlock(&lv0104cs->lock); lv0104cs 274 drivers/iio/light/lv0104cs.c static int lv0104cs_set_calibscale(struct lv0104cs_private *lv0104cs, lv0104cs 305 drivers/iio/light/lv0104cs.c mutex_lock(&lv0104cs->lock); lv0104cs 308 drivers/iio/light/lv0104cs.c ret = lv0104cs_write_reg(lv0104cs->client, lv0104cs 313 drivers/iio/light/lv0104cs.c lv0104cs->calibscale = index; lv0104cs 316 drivers/iio/light/lv0104cs.c mutex_unlock(&lv0104cs->lock); lv0104cs 321 drivers/iio/light/lv0104cs.c static int lv0104cs_set_scale(struct lv0104cs_private *lv0104cs, lv0104cs 338 drivers/iio/light/lv0104cs.c mutex_lock(&lv0104cs->lock); lv0104cs 339 drivers/iio/light/lv0104cs.c lv0104cs->scale = i; lv0104cs 340 drivers/iio/light/lv0104cs.c mutex_unlock(&lv0104cs->lock); lv0104cs 345 drivers/iio/light/lv0104cs.c static int lv0104cs_set_int_time(struct lv0104cs_private *lv0104cs, lv0104cs 362 drivers/iio/light/lv0104cs.c mutex_lock(&lv0104cs->lock); lv0104cs 363 drivers/iio/light/lv0104cs.c lv0104cs->int_time = i; lv0104cs 364 drivers/iio/light/lv0104cs.c mutex_unlock(&lv0104cs->lock); lv0104cs 373 drivers/iio/light/lv0104cs.c struct lv0104cs_private *lv0104cs = iio_priv(indio_dev); lv0104cs 380 drivers/iio/light/lv0104cs.c return lv0104cs_set_calibscale(lv0104cs, val, val2); lv0104cs 383 drivers/iio/light/lv0104cs.c return lv0104cs_set_scale(lv0104cs, val, val2); lv0104cs 386 drivers/iio/light/lv0104cs.c return lv0104cs_set_int_time(lv0104cs, val, val2); lv0104cs 481 drivers/iio/light/lv0104cs.c struct lv0104cs_private *lv0104cs; lv0104cs 484 drivers/iio/light/lv0104cs.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*lv0104cs)); lv0104cs 488 drivers/iio/light/lv0104cs.c lv0104cs = iio_priv(indio_dev); lv0104cs 490 drivers/iio/light/lv0104cs.c i2c_set_clientdata(client, lv0104cs); lv0104cs 491 drivers/iio/light/lv0104cs.c lv0104cs->client = client; lv0104cs 493 drivers/iio/light/lv0104cs.c mutex_init(&lv0104cs->lock); lv0104cs 495 drivers/iio/light/lv0104cs.c lv0104cs->calibscale = LV0104CS_CALIBSCALE_UNITY; lv0104cs 496 drivers/iio/light/lv0104cs.c lv0104cs->scale = LV0104CS_SCALE_1X; lv0104cs 497 drivers/iio/light/lv0104cs.c lv0104cs->int_time = LV0104CS_INTEG_200MS; lv0104cs 499 drivers/iio/light/lv0104cs.c ret = lv0104cs_write_reg(lv0104cs->client,