OSDN Git Service

platform/x86: intel_scu_ipc: Sleeping is fine when polling
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 22 Jan 2020 16:28:08 +0000 (19:28 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 22 Jan 2020 16:52:16 +0000 (18:52 +0200)
commite7b7ab3847c9e727e14ba724024506beb156993c
tree020916ab2d66ceea8806c705a6de6b7c6c4cde63
parent74e9748b9b218e7863711b8c0dffb181154e4a23
platform/x86: intel_scu_ipc: Sleeping is fine when polling

There is no reason why the driver would need to block other threads from
running the CPU while it is waiting for the SCU IPC to complete its
work. For this reason switch the driver to use usleep_range() instead
with a bit more relaxed polling loop.

Also add constant for the timeout and use the same value for both
polling and interrupt modes.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_scu_ipc.c