Home
last modified time | relevance | path

Searched refs:als_count (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/iio/light/
H A Dtsl2583.c368 int als_count, als_time, ret; in tsl2583_set_als_time() local
372 als_count = DIV_ROUND_CLOSEST(chip->als_settings.als_time * 100, 270); in tsl2583_set_als_time()
373 if (!als_count) in tsl2583_set_als_time()
374 als_count = 1; /* ensure at least one cycle */ in tsl2583_set_als_time()
377 als_time = DIV_ROUND_CLOSEST(als_count * 27, 10); in tsl2583_set_als_time()
379 val = 256 - als_count; in tsl2583_set_als_time()
390 chip->als_saturation = als_count * 922; /* 90% of full scale */ in tsl2583_set_als_time()
H A Dtsl2772.c707 int ret, i, als_count, als_time_us; in tsl2772_chip_on() local
755 als_count = 256 - chip->settings.als_time; in tsl2772_chip_on()
756 als_time_us = als_count * tsl2772_int_time_avail[chip->id][3]; in tsl2772_chip_on()
757 chip->als_saturation = als_count * 768; /* 75% of full scale */ in tsl2772_chip_on()