diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2018-01-08 08:28:45 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-01-08 11:57:23 -0500 |
commit | cf7f46b9b12269d204b6acd0925704543adb6e05 (patch) | |
tree | befb382aa2123cb1cb10515226f19c68aa5d7b71 | |
parent | 5bbf4ad945a9bb353e77ef71c753ca9bb1e3d978 (diff) |
clocksource/drivers/timer-of: Add kernel documentation
The current code has no comments, neither any function descriptions. Fix this by
adding function descriptions in kernel doc format.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1515418139-23276-6-git-send-email-daniel.lezcano@linaro.org
[ Spelling and style fixes. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | drivers/clocksource/timer-of.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index ad5565404e25..c1045b9a787c 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c | |||
@@ -24,6 +24,12 @@ | |||
24 | 24 | ||
25 | #include "timer-of.h" | 25 | #include "timer-of.h" |
26 | 26 | ||
27 | /** | ||
28 | * timer_of_irq_exit - Release the interrupt | ||
29 | * @of_irq: an of_timer_irq structure pointer | ||
30 | * | ||
31 | * Free the irq resource | ||
32 | */ | ||
27 | static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) | 33 | static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) |
28 | { | 34 | { |
29 | struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); | 35 | struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); |
@@ -34,6 +40,22 @@ static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) | |||
34 | free_irq(of_irq->irq, clkevt); | 40 | free_irq(of_irq->irq, clkevt); |
35 | } | 41 | } |
36 | 42 | ||
43 | /** | ||
44 | * timer_of_irq_init - Request the interrupt | ||
45 | * @np: a device tree node pointer | ||
46 | * @of_irq: an of_timer_irq structure pointer | ||
47 | * | ||
48 | * Get the interrupt number from the DT from its definition and | ||
49 | * request it. The interrupt is gotten by falling back the following way: | ||
50 | * | ||
51 | * - Get interrupt number by name | ||
52 | * - Get interrupt number by index | ||
53 | * | ||
54 | * When the interrupt is per CPU, 'request_percpu_irq()' is called, | ||
55 | * otherwise 'request_irq()' is used. | ||
56 | * | ||
57 | * Returns 0 on success, < 0 otherwise | ||
58 | */ | ||
37 | static __init int timer_of_irq_init(struct device_node *np, | 59 | static __init int timer_of_irq_init(struct device_node *np, |
38 | struct of_timer_irq *of_irq) | 60 | struct of_timer_irq *of_irq) |
39 | { | 61 | { |
@@ -72,6 +94,12 @@ static __init int timer_of_irq_init(struct device_node *np, | |||
72 | return 0; | 94 | return 0; |
73 | } | 95 | } |
74 | 96 | ||
97 | /** | ||
98 | * timer_of_clk_exit - Release the clock resources | ||
99 | * @of_clk: a of_timer_clk structure pointer | ||
100 | * | ||
101 | * Disables and releases the refcount on the clk | ||
102 | */ | ||
75 | static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) | 103 | static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) |
76 | { | 104 | { |
77 | of_clk->rate = 0; | 105 | of_clk->rate = 0; |
@@ -79,6 +107,15 @@ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) | |||
79 | clk_put(of_clk->clk); | 107 | clk_put(of_clk->clk); |
80 | } | 108 | } |
81 | 109 | ||
110 | /** | ||
111 | * timer_of_clk_init - Initialize the clock resources | ||
112 | * @np: a device tree node pointer | ||
113 | * @of_clk: a of_timer_clk structure pointer | ||
114 | * | ||
115 | * Get the clock by name or by index, enable it and get the rate | ||
116 | * | ||
117 | * Returns 0 on success, < 0 otherwise | ||
118 | */ | ||
82 | static __init int timer_of_clk_init(struct device_node *np, | 119 | static __init int timer_of_clk_init(struct device_node *np, |
83 | struct of_timer_clk *of_clk) | 120 | struct of_timer_clk *of_clk) |
84 | { | 121 | { |