From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org (open list:CLOCKSOURCE,
CLOCKEVENT DRIVERS)
Subject: [PATCH 2/2] clocksource/drivers/timer-of: Add kernel documentation
Date: Thu, 21 Dec 2017 15:39:20 +0100 [thread overview]
Message-ID: <1513867161-19104-2-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1513867161-19104-1-git-send-email-daniel.lezcano@linaro.org>
The current code has no comment, neither function description. Fix this by
adding a kernel doc format for the function description.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/timer-of.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index ad55654..2af8b8a 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -24,6 +24,12 @@
#include "timer-of.h"
+/**
+ * timer_of_irq_exit - Release the interrupt
+ * @of_irq: an of_timer_irq structure pointer
+ *
+ * Free the irq resource
+ */
static __init void timer_of_irq_exit(struct of_timer_irq *of_irq)
{
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)
free_irq(of_irq->irq, clkevt);
}
+/**
+ * timer_of_irq_init - Request the interrupt
+ * @np: a device tree node pointer
+ * @of_irq: an of_timer_irq structure pointer
+ *
+ * Get the interrupt number from the DT from its definition and
+ * request it. The interrupt is get by fallbacking as follow:
+ *
+ * - Get interrupt number by name
+ * - Get interrupt number by index
+ *
+ * When the interrupt is per cpu, 'request_percpu_irq' is called
+ * otherwise, 'request_irq' is used.
+ *
+ * Returns 0 on success, < 0 otherwise
+ */
static __init int timer_of_irq_init(struct device_node *np,
struct of_timer_irq *of_irq)
{
@@ -72,6 +94,13 @@ static __init int timer_of_irq_init(struct device_node *np,
return 0;
}
+/**
+ * timer_of_clk_exit - Release the clock resources
+ * @of_clk: a of_timer_clk structure pointer
+ *
+ * Disables and release the refcount on the clk
+ *
+ */
static __init void timer_of_clk_exit(struct of_timer_clk *of_clk)
{
of_clk->rate = 0;
@@ -79,6 +108,15 @@ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk)
clk_put(of_clk->clk);
}
+/**
+ * timer_of_clk_init - Initialize the clock resources
+ * @np: a device tree node pointer
+ * @of_clk: a of_timer_clk structure pointer
+ *
+ * Get the clock by name or by index, enables it and get the rate
+ *
+ * Returns 0 on success, < 0 otherwise
+ */
static __init int timer_of_clk_init(struct device_node *np,
struct of_timer_clk *of_clk)
{
--
2.7.4
prev parent reply other threads:[~2017-12-21 14:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 14:39 [PATCH 1/2] clocksource/drivers/timer-of: Fix function names Daniel Lezcano
2017-12-21 14:39 ` Daniel Lezcano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513867161-19104-2-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®