mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 13:22:02 +02:00
leds: qti-flash: Limit off_time of switch to a maximum of 1280 ms
Currently, Flash LED peripheral supports a maximum safety timer expiry of 1280 ms for flash mode where the target current can go as high as 1500 mA. If off_time is allowed more than that time period, then flash LED can stay ON more than that safety timer period. Hence, clamp off_time to not exceed 1280 ms. Change-Id: Idbd8b41c5041c50e3f714be9efb0ad04b1ee9181 Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
This commit is contained in:
parent
b2ea9ae600
commit
e9a3973e99
|
|
@ -1032,6 +1032,8 @@ static ssize_t qti_flash_off_time_store(struct device *dev,
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
val = min_t(u64, val, SAFETY_TIMER_MAX_TIMEOUT_MS);
|
||||
|
||||
snode = container_of(led_cdev, struct flash_switch_data, cdev);
|
||||
snode->off_time_ms = val;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user