aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2018-02-15 01:01:47 -0500
committerTony Lindgren <tony@atomide.com>2018-02-22 13:53:59 -0500
commita7f249e33a44432de30d50f3c57868bc00a8f362 (patch)
tree0e099e51460d7d22341a4389b5bfbe726458e525 /include/linux/platform_data
parentaf04aa856e932876e11e0c6d21d82281824e1b11 (diff)
clocksource: timer-ti-dm: Add timer ops to the platform data structure
Add timer ops to the platform data structure Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/dmtimer-omap.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
index a19b78d826e9..757a0f9e26f9 100644
--- a/include/linux/platform_data/dmtimer-omap.h
+++ b/include/linux/platform_data/dmtimer-omap.h
@@ -20,12 +20,50 @@
20#ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__ 20#ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__
21#define __PLATFORM_DATA_DMTIMER_OMAP_H__ 21#define __PLATFORM_DATA_DMTIMER_OMAP_H__
22 22
23struct omap_dm_timer_ops {
24 struct omap_dm_timer *(*request_by_node)(struct device_node *np);
25 struct omap_dm_timer *(*request_specific)(int timer_id);
26 struct omap_dm_timer *(*request)(void);
27
28 int (*free)(struct omap_dm_timer *timer);
29
30 void (*enable)(struct omap_dm_timer *timer);
31 void (*disable)(struct omap_dm_timer *timer);
32
33 int (*get_irq)(struct omap_dm_timer *timer);
34 int (*set_int_enable)(struct omap_dm_timer *timer,
35 unsigned int value);
36 int (*set_int_disable)(struct omap_dm_timer *timer, u32 mask);
37
38 struct clk *(*get_fclk)(struct omap_dm_timer *timer);
39
40 int (*start)(struct omap_dm_timer *timer);
41 int (*stop)(struct omap_dm_timer *timer);
42 int (*set_source)(struct omap_dm_timer *timer, int source);
43
44 int (*set_load)(struct omap_dm_timer *timer, int autoreload,
45 unsigned int value);
46 int (*set_match)(struct omap_dm_timer *timer, int enable,
47 unsigned int match);
48 int (*set_pwm)(struct omap_dm_timer *timer, int def_on,
49 int toggle, int trigger);
50 int (*set_prescaler)(struct omap_dm_timer *timer, int prescaler);
51
52 unsigned int (*read_counter)(struct omap_dm_timer *timer);
53 int (*write_counter)(struct omap_dm_timer *timer,
54 unsigned int value);
55 unsigned int (*read_status)(struct omap_dm_timer *timer);
56 int (*write_status)(struct omap_dm_timer *timer,
57 unsigned int value);
58};
59
23struct dmtimer_platform_data { 60struct dmtimer_platform_data {
24 /* set_timer_src - Only used for OMAP1 devices */ 61 /* set_timer_src - Only used for OMAP1 devices */
25 int (*set_timer_src)(struct platform_device *pdev, int source); 62 int (*set_timer_src)(struct platform_device *pdev, int source);
26 u32 timer_capability; 63 u32 timer_capability;
27 u32 timer_errata; 64 u32 timer_errata;
28 int (*get_context_loss_count)(struct device *); 65 int (*get_context_loss_count)(struct device *);
66 const struct omap_dm_timer_ops *timer_ops;
29}; 67};
30 68
31#endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */ 69#endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */