Skip to content

Commit a7e1690

Browse files
Benjamin CabéChromeos LUCI
authored andcommitted
drivers: adc: ti_am335x: fix timeout condition
Corrected the timeout condition in the ti_adc_sequencer_start function to ensure proper timeout handling during ADC sequencer operations. (cherry picked from commit a7405dc) Original-Signed-off-by: Benjamin Cabé <[email protected]> GitOrigin-RevId: a7405dc Cr-Build-Id: 8711682253588645601 Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8711682253588645601 Copybot-Job-Name: zephyr-main-copybot-downstream Change-Id: I4e71a619b50112ef784d24be54762753cc6c7c62 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6655866 Commit-Queue: Keith Short <[email protected]> Reviewed-by: Keith Short <[email protected]> Reviewed-by: Yuval Peress <[email protected]> Tested-by: Keith Short <[email protected]> Tested-by: Yuval Peress <[email protected]> Tested-by: ChromeOS Copybot <[email protected]>
1 parent e41eade commit a7e1690

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/adc/adc_ti_am335x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static int ti_adc_sequencer_start(const struct device *dev)
160160
while (FIELD_GET(TI_ADC_SEQ_STATUS_FSM, seq_status) != TI_ADC_SEQ_STATUS_FSM_IDLE &&
161161
FIELD_GET(TI_ADC_SEQ_STATUS_STEP, seq_status) != TI_ADC_SEQ_STATUS_STEP_IDLE) {
162162
/* Timeout */
163-
if (k_uptime_get() - timeout < (TI_ADC_IDLE_TIMEOUT_MS * data->chan_count)) {
163+
if (k_uptime_get() - timeout > (TI_ADC_IDLE_TIMEOUT_MS * data->chan_count)) {
164164
return -ETIMEDOUT;
165165
}
166166

0 commit comments

Comments
 (0)