diff options
author | Even Xu <even.xu@intel.com> | 2017-02-03 14:24:53 +0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-02-08 12:11:57 +0900 |
commit | 291e9e3f6931eda50be839500c15b1135146aaf6 (patch) | |
tree | d214c5c7632d3d35a8d9fdbd7f124255e82f797d /drivers/hid/intel-ish-hid/ipc/hw-ish.h | |
parent | 5299a92a3b98b91b7230662b8b9b6c64bcf8cae6 (diff) | |
download | op-kernel-dev-291e9e3f6931eda50be839500c15b1135146aaf6.zip op-kernel-dev-291e9e3f6931eda50be839500c15b1135146aaf6.tar.gz |
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 46615a0..fd34307 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); |