mei: expose hardware power gating state to mei layer
[firefly-linux-kernel-4.4.55.git] / drivers / misc / mei / hw-me.c
index 7a7e66250dfd7f1ff3b359a482b0170a91132136..02f3b0c3a2a3330659e021cb3791ff33009219ed 100644 (file)
@@ -113,6 +113,19 @@ static void mei_me_hw_config(struct mei_device *dev)
        /* Doesn't change in runtime */
        dev->hbuf_depth = (hcsr & H_CBD) >> 24;
 }
+
+/**
+ * mei_me_pg_state  - translate internal pg state
+ *   to the mei power gating state
+ *
+ * @hw -  me hardware
+ * returns: MEI_PG_OFF if aliveness is on and MEI_PG_ON otherwise
+ */
+static inline enum mei_pg_state mei_me_pg_state(struct mei_device *dev)
+{
+       return MEI_PG_OFF;
+}
+
 /**
  * mei_clear_interrupts - clear and stop interrupts
  *
@@ -601,6 +614,8 @@ end:
 }
 static const struct mei_hw_ops mei_me_hw_ops = {
 
+       .pg_state  = mei_me_pg_state,
+
        .host_is_ready = mei_me_host_is_ready,
 
        .hw_is_ready = mei_me_hw_is_ready,