Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754182AbeAHRbd (ORCPT + 1 other); Mon, 8 Jan 2018 12:31:33 -0500 Received: from terminus.zytor.com ([65.50.211.136]:44069 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754006AbeAHRba (ORCPT ); Mon, 8 Jan 2018 12:31:30 -0500 Date: Mon, 8 Jan 2018 09:28:09 -0800 From: tip-bot for Daniel Lezcano Message-ID: Cc: tglx@linutronix.de, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, peterz@infradead.org, hpa@zytor.com, torvalds@linux-foundation.org, mingo@kernel.org Reply-To: tglx@linutronix.de, daniel.lezcano@linaro.org, peterz@infradead.org, linux-kernel@vger.kernel.org, hpa@zytor.com, torvalds@linux-foundation.org, mingo@kernel.org In-Reply-To: <1515418139-23276-6-git-send-email-daniel.lezcano@linaro.org> References: <1515418139-23276-6-git-send-email-daniel.lezcano@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] clocksource/drivers/timer-of: Add kernel documentation Git-Commit-ID: cf7f46b9b12269d204b6acd0925704543adb6e05 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Commit-ID: cf7f46b9b12269d204b6acd0925704543adb6e05 Gitweb: https://git.kernel.org/tip/cf7f46b9b12269d204b6acd0925704543adb6e05 Author: Daniel Lezcano AuthorDate: Mon, 8 Jan 2018 14:28:45 +0100 Committer: Ingo Molnar CommitDate: Mon, 8 Jan 2018 17:57:23 +0100 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 Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- drivers/clocksource/timer-of.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index ad55654..c1045b9 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 gotten by falling back the following way: + * + * - 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,12 @@ 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 releases the refcount on the clk + */ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) { of_clk->rate = 0; @@ -79,6 +107,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, enable 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) {