Răsfoiți Sursa

drivers:timer-ti-dm: make several functions global

Make the following functions global to be invoked by cpts
- omap_dm_timer_request_by_node
- omap_dm_timer_free
- omap_dm_timer_enable
- omap_dm_timer_disable

Signed-off-by: Eric Ruei <e-ruei1@ti.com>
Eric Ruei 6 ani în urmă
părinte
comite
738eb47644
2 a modificat fișierele cu 12 adăugiri și 6 ștergeri
  1. 6 6
      drivers/clocksource/timer-ti-dm.c
  2. 6 0
      include/clocksource/timer-ti-dm.h

+ 6 - 6
drivers/clocksource/timer-ti-dm.c

@@ -194,7 +194,7 @@ static int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
 	return ret;
 }
 
-static void omap_dm_timer_enable(struct omap_dm_timer *timer)
+void omap_dm_timer_enable(struct omap_dm_timer *timer)
 {
 	int c;
 
@@ -213,7 +213,7 @@ static void omap_dm_timer_enable(struct omap_dm_timer *timer)
 	}
 }
 
-static void omap_dm_timer_disable(struct omap_dm_timer *timer)
+void omap_dm_timer_disable(struct omap_dm_timer *timer)
 {
 	pm_runtime_put_sync(&timer->pdev->dev);
 }
@@ -351,12 +351,12 @@ found:
 	return timer;
 }
 
-static struct omap_dm_timer *omap_dm_timer_request(void)
+struct omap_dm_timer *omap_dm_timer_request(void)
 {
 	return _omap_dm_timer_request(REQUEST_ANY, NULL);
 }
 
-static struct omap_dm_timer *omap_dm_timer_request_specific(int id)
+struct omap_dm_timer *omap_dm_timer_request_specific(int id)
 {
 	/* Requesting timer by ID is not supported when device tree is used */
 	if (of_have_populated_dt()) {
@@ -389,7 +389,7 @@ struct omap_dm_timer *omap_dm_timer_request_by_cap(u32 cap)
  * Request a timer based upon a device node pointer. Returns pointer to
  * timer handle on success and a NULL pointer on failure.
  */
-static struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np)
+struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np)
 {
 	if (!np)
 		return NULL;
@@ -397,7 +397,7 @@ static struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *n
 	return _omap_dm_timer_request(REQUEST_BY_NODE, np);
 }
 
-static int omap_dm_timer_free(struct omap_dm_timer *timer)
+int omap_dm_timer_free(struct omap_dm_timer *timer)
 {
 	if (unlikely(!timer))
 		return -EINVAL;

+ 6 - 0
include/clocksource/timer-ti-dm.h

@@ -119,7 +119,13 @@ struct omap_dm_timer {
 };
 
 int omap_dm_timer_reserve_systimer(int id);
+struct omap_dm_timer *omap_dm_timer_request(void);
+struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
 struct omap_dm_timer *omap_dm_timer_request_by_cap(u32 cap);
+struct omap_dm_timer *omap_dm_timer_request_by_node(struct device_node *np);
+int omap_dm_timer_free(struct omap_dm_timer *timer);
+void omap_dm_timer_enable(struct omap_dm_timer *timer);
+void omap_dm_timer_disable(struct omap_dm_timer *timer);
 
 int omap_dm_timer_get_irq(struct omap_dm_timer *timer);