NFC: digital: Add a delay between poll cycles

This replaces the polling work struct with a delayed work struct and add
a 10 ms delay between 2 poll cycles. This avoids to flood the device
with 'switch off'/'switch on' commands.

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Thierry Escande
2016-06-07 16:21:52 +02:00
committed by Samuel Ortiz
parent a81ba50a89
commit 7854a44526
2 changed files with 11 additions and 7 deletions

View File

@@ -220,7 +220,7 @@ struct nfc_digital_dev {
struct list_head cmd_queue;
struct mutex cmd_lock;
struct work_struct poll_work;
struct delayed_work poll_work;
u8 curr_protocol;
u8 curr_rf_tech;