diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-06-22 22:36:01 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-06-22 23:19:21 -0700 |
| commit | 144337eeefbec6bbc7e9b51a6d58551baad03d40 (patch) | |
| tree | 57d75af3ad14cef608d0e53c975840a0ad177a32 /tools/perf/scripts/python | |
| parent | ce414fb127d9a0bf566502023a8030af564f66bb (diff) | |
Input: mms114 - replace udelay with usleep_range
The driver currently uses udelay(MMS114_I2C_DELAY) (50us) to ensure a
mandatory delay between I2C transfers in __mms114_read_reg() and
mms114_write_reg().
Both functions invoke underlying I2C core operations (i2c_transfer,
i2c_master_send) which acquire mutexes and sleep. Furthermore, the
interrupt handler mms114_interrupt() is registered as a threaded IRQ
handler. Since the entire execution path is fully sleepable,
busy-waiting with udelay() for 50us unnecessarily wastes CPU cycles.
Replace udelay() with usleep_range() to allow the CPU to enter low-power
states or execute other tasks during the delay.
Assisted-by: Antigravity:gemini-3.5-flash
Link: https://patch.msgid.link/20260616050912.1531241-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
