Clock request disabled when PMU enabled

Currently clock request is enabled, which means NPU will
only request clock when working. When NPU is going into idle it will no
longer request clock and thus PMU won't be clocked either, and thus
affect the cycle counter.

Added: enum for request clients (PMU or INFERENCE).

Added: clock_request added to driver struct (bit 0: PMU, bit 1:
INFERENCE) which keeps track of which client requests clock.

Added: power_request added to driver struct (bit 0: PMU, bit 1:
INFERENCE) which keeps track of which client requests power.

Added set_clock_and_power_request(...) updates clock_request and
power_request depending on which client calls it. Sets clock and power
if both PMU and INFERENCE requests it.

Added: Call set_clock_and_power_request(...) from PMU.

Changed: replace ethosu_set_clock_and_power(...) with
set_clock_and_power_request(...) in ethosu_init and ethosu_invoke

Change-Id: Ie7d8aee639d4abbf879b05e9a82035d7c0d40d40
diff --git a/include/ethosu_driver.h b/include/ethosu_driver.h
index 16f0a25..4089932 100644
--- a/include/ethosu_driver.h
+++ b/include/ethosu_driver.h
@@ -49,6 +49,8 @@
     bool reserved;
     volatile bool irq_triggered;
     void *semaphore;
+    uint8_t clock_request;
+    uint8_t power_request;
 };
 
 struct ethosu_version_id
@@ -81,6 +83,12 @@
     struct ethosu_version_config cfg;
 };
 
+enum ethosu_request_clients
+{
+    ETHOSU_PMU_REQUEST       = 0,
+    ETHOSU_INFERENCE_REQUEST = 1,
+};
+
 /******************************************************************************
  * Variables
  ******************************************************************************/
@@ -169,6 +177,14 @@
 void ethosu_release_driver(struct ethosu_driver *drv);
 
 /**
+ * Set clock and power request bits
+ */
+enum ethosu_error_codes set_clock_and_power_request(struct ethosu_driver *drv,
+                                                    enum ethosu_request_clients client,
+                                                    enum ethosu_clock_q_request clock_request,
+                                                    enum ethosu_power_q_request power_request);
+
+/**
  * Static inline for backwards-compatibility
  */
 static inline int ethosu_invoke_v2(const void *custom_data_ptr,