diff options
author | Even Xu | 2017-02-03 07:24:53 +0100 |
---|---|---|
committer | Jiri Kosina | 2017-02-08 04:11:57 +0100 |
commit | 291e9e3f6931eda50be839500c15b1135146aaf6 (patch) | |
tree | d214c5c7632d3d35a8d9fdbd7f124255e82f797d /drivers/hid/intel-ish-hid/ipc/hw-ish.h | |
parent | HID: intel-ish-hid: format 32-bit integers with %X (diff) | |
download | kernel-qcow2-linux-291e9e3f6931eda50be839500c15b1135146aaf6.tar.gz kernel-qcow2-linux-291e9e3f6931eda50be839500c15b1135146aaf6.tar.xz kernel-qcow2-linux-291e9e3f6931eda50be839500c15b1135146aaf6.zip |
HID: intel-ish-hid: ipc: check FW status to distinguish ISH resume paths
For ISH resume, there are two paths, they need different way to handle: one
where ISH is not powered off, in that case a simple resume message is enough,
in other case we need a reset sequence.
We can use ISH FW status to distinguish those two cases and handle them
properly.
Signed-off-by: Even Xu <even.xu@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid/ipc/hw-ish.h')
-rw-r--r-- | drivers/hid/intel-ish-hid/ipc/hw-ish.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hid/intel-ish-hid/ipc/hw-ish.h b/drivers/hid/intel-ish-hid/ipc/hw-ish.h index 46615a03e78f..fd34307a7a70 100644 --- a/drivers/hid/intel-ish-hid/ipc/hw-ish.h +++ b/drivers/hid/intel-ish-hid/ipc/hw-ish.h @@ -61,6 +61,18 @@ struct ish_hw { void __iomem *mem_addr; }; +/* + * ISH FW status type + */ +enum { + FWSTS_AFTER_RESET = 0, + FWSTS_WAIT_FOR_HOST = 4, + FWSTS_START_KERNEL_DMA = 5, + FWSTS_FW_IS_RUNNING = 7, + FWSTS_SENSOR_APP_LOADED = 8, + FWSTS_SENSOR_APP_RUNNING = 15 +}; + #define to_ish_hw(dev) (struct ish_hw *)((dev)->hw) irqreturn_t ish_irq_handler(int irq, void *dev_id); |