diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c
index deed4afadb29..30b40f805f88 100644
--- a/drivers/counter/104-quad-8.c
+++ b/drivers/counter/104-quad-8.c
@@ -135,7 +135,7 @@ struct quad8 {
 
 static int quad8_signal_read(struct counter_device *counter,
 			     struct counter_signal *signal,
-			     enum counter_signal_level *level)
+			     u32 *level)
 {
 	const struct quad8 *const priv = counter_priv(counter);
 	unsigned int state;
@@ -258,7 +258,7 @@ static int quad8_function_get(const struct quad8 *const priv, const size_t id,
 
 static int quad8_function_read(struct counter_device *counter,
 			       struct counter_count *count,
-			       enum counter_function *function)
+			       u32 *function)
 {
 	struct quad8 *const priv = counter_priv(counter);
 	unsigned long irqflags;
@@ -275,7 +275,7 @@ static int quad8_function_read(struct counter_device *counter,
 
 static int quad8_function_write(struct counter_device *counter,
 				struct counter_count *count,
-				enum counter_function function)
+				u32 function)
 {
 	struct quad8 *const priv = counter_priv(counter);
 	const int id = count->id;
diff --git a/drivers/counter/ftm-quaddec.c b/drivers/counter/ftm-quaddec.c
index aea6622a9b13..03f03614fc22 100644
--- a/drivers/counter/ftm-quaddec.c
+++ b/drivers/counter/ftm-quaddec.c
@@ -189,7 +189,7 @@ static int ftm_quaddec_count_write(struct counter_device *counter,
 
 static int ftm_quaddec_count_function_read(struct counter_device *counter,
 					   struct counter_count *count,
-					   enum counter_function *function)
+					   u32 *function)
 {
 	*function = COUNTER_FUNCTION_QUADRATURE_X4;
 
diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
index af5942e66f7d..0eedd9e1a94e 100644
--- a/drivers/counter/intel-qep.c
+++ b/drivers/counter/intel-qep.c
@@ -123,7 +123,7 @@ static const enum counter_function intel_qep_count_functions[] = {
 
 static int intel_qep_function_read(struct counter_device *counter,
 				   struct counter_count *count,
-				   enum counter_function *function)
+				   u32 *function)
 {
 	*function = COUNTER_FUNCTION_QUADRATURE_X4;
 
diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-cnt.c
index 229473855c5b..f068248967d6 100644
--- a/drivers/counter/interrupt-cnt.c
+++ b/drivers/counter/interrupt-cnt.c
@@ -113,7 +113,7 @@ static const enum counter_function interrupt_cnt_functions[] = {
 
 static int interrupt_cnt_function_read(struct counter_device *counter,
 				       struct counter_count *count,
-				       enum counter_function *function)
+				       u32 *function)
 {
 	*function = COUNTER_FUNCTION_INCREASE;
 
@@ -122,7 +122,7 @@ static int interrupt_cnt_function_read(struct counter_device *counter,
 
 static int interrupt_cnt_signal_read(struct counter_device *counter,
 				     struct counter_signal *signal,
-				     enum counter_signal_level *level)
+				     u32 *level)
 {
 	struct interrupt_cnt_priv *priv = counter_priv(counter);
 	int ret;
diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c
index e2d1dc6ca668..76bec91fde6c 100644
--- a/drivers/counter/microchip-tcb-capture.c
+++ b/drivers/counter/microchip-tcb-capture.c
@@ -68,7 +68,7 @@ static struct counter_synapse mchp_tc_count_synapses[] = {
 
 static int mchp_tc_count_function_read(struct counter_device *counter,
 				       struct counter_count *count,
-				       enum counter_function *function)
+				       u32 *function)
 {
 	struct mchp_tc_data *const priv = counter_priv(counter);
 
@@ -82,7 +82,7 @@ static int mchp_tc_count_function_read(struct counter_device *counter,
 
 static int mchp_tc_count_function_write(struct counter_device *counter,
 					struct counter_count *count,
-					enum counter_function function)
+					u32 function)
 {
 	struct mchp_tc_data *const priv = counter_priv(counter);
 	u32 bmr, cmr;
@@ -144,7 +144,7 @@ static int mchp_tc_count_function_write(struct counter_device *counter,
 
 static int mchp_tc_count_signal_read(struct counter_device *counter,
 				     struct counter_signal *signal,
-				     enum counter_signal_level *lvl)
+				     u32 *lvl)
 {
 	struct mchp_tc_data *const priv = counter_priv(counter);
 	bool sigstatus;
diff --git a/drivers/counter/stm32-lptimer-cnt.c b/drivers/counter/stm32-lptimer-cnt.c
index d6b80b6dfc28..2dec0c6421d1 100644
--- a/drivers/counter/stm32-lptimer-cnt.c
+++ b/drivers/counter/stm32-lptimer-cnt.c
@@ -155,7 +155,7 @@ static int stm32_lptim_cnt_read(struct counter_device *counter,
 
 static int stm32_lptim_cnt_function_read(struct counter_device *counter,
 					 struct counter_count *count,
-					 enum counter_function *function)
+					 u32 *function)
 {
 	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 
@@ -174,7 +174,7 @@ static int stm32_lptim_cnt_function_read(struct counter_device *counter,
 
 static int stm32_lptim_cnt_function_write(struct counter_device *counter,
 					  struct counter_count *count,
-					  enum counter_function function)
+					  u32 function)
 {
 	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 
diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
index 9bf20a5d6bda..ece55113ba85 100644
--- a/drivers/counter/stm32-timer-cnt.c
+++ b/drivers/counter/stm32-timer-cnt.c
@@ -70,7 +70,7 @@ static int stm32_count_write(struct counter_device *counter,
 
 static int stm32_count_function_read(struct counter_device *counter,
 				     struct counter_count *count,
-				     enum counter_function *function)
+				     u32 *function)
 {
 	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 smcr;
@@ -97,7 +97,7 @@ static int stm32_count_function_read(struct counter_device *counter,
 
 static int stm32_count_function_write(struct counter_device *counter,
 				      struct counter_count *count,
-				      enum counter_function function)
+				      u32 function)
 {
 	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 cr1, sms;
diff --git a/drivers/counter/ti-ecap-capture.c b/drivers/counter/ti-ecap-capture.c
index fb1cb1774674..96e5d1f271b8 100644
--- a/drivers/counter/ti-ecap-capture.c
+++ b/drivers/counter/ti-ecap-capture.c
@@ -188,7 +188,7 @@ static int ecap_cnt_count_write(struct counter_device *counter,
 
 static int ecap_cnt_function_read(struct counter_device *counter,
 				  struct counter_count *count,
-				  enum counter_function *function)
+				  u32 *function)
 {
 	*function = COUNTER_FUNCTION_INCREASE;
 
diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c
index b0f24cf3e891..d73a8baa49e8 100644
--- a/drivers/counter/ti-eqep.c
+++ b/drivers/counter/ti-eqep.c
@@ -119,7 +119,7 @@ static int ti_eqep_count_write(struct counter_device *counter,
 
 static int ti_eqep_function_read(struct counter_device *counter,
 				 struct counter_count *count,
-				 enum counter_function *function)
+				 u32 *function)
 {
 	struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
 	u32 qdecctl;
@@ -146,7 +146,7 @@ static int ti_eqep_function_read(struct counter_device *counter,
 
 static int ti_eqep_function_write(struct counter_device *counter,
 				  struct counter_count *count,
-				  enum counter_function function)
+				  u32 function)
 {
 	struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
 	enum ti_eqep_count_func qsrc;
diff --git a/include/linux/counter.h b/include/linux/counter.h
index b63746637de2..976dcbfd6266 100644
--- a/include/linux/counter.h
+++ b/include/linux/counter.h
@@ -324,17 +324,17 @@ struct counter_event_node {
 struct counter_ops {
 	int (*signal_read)(struct counter_device *counter,
 			   struct counter_signal *signal,
-			   enum counter_signal_level *level);
+			   u32 *level);
 	int (*count_read)(struct counter_device *counter,
 			  struct counter_count *count, u64 *value);
 	int (*count_write)(struct counter_device *counter,
 			   struct counter_count *count, u64 value);
 	int (*function_read)(struct counter_device *counter,
 			     struct counter_count *count,
-			     enum counter_function *function);
+			     u32 *function);
 	int (*function_write)(struct counter_device *counter,
 			      struct counter_count *count,
-			      enum counter_function function);
+			      u32 function);
 	int (*action_read)(struct counter_device *counter,
 			   struct counter_count *count,
 			   struct counter_synapse *synapse,
