From patchwork Thu Dec 21 14:39:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 122574 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp975710qgn; Thu, 21 Dec 2017 06:39:50 -0800 (PST) X-Google-Smtp-Source: ACJfBouqvNEbxN0um5PKHD9aQef0WDLNlik/avPE4TuVqDAOaQGd5ZoZ3FiFEGqfG5wOVV1BVrWc X-Received: by 10.98.28.210 with SMTP id c201mr10641348pfc.154.1513867190459; Thu, 21 Dec 2017 06:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513867190; cv=none; d=google.com; s=arc-20160816; b=CHU6kYBl8Al5O9kAbo/s4wBEsaVZofvwVpVl1BLcsCjQN+UVSBGKH6il9Vn/cXjx92 +6c6m/h3LAzb6hs9bO5nI+dRcn0bQmH3pHblw8HFRbyWnfjTRnnNrfg6kVZX+IqgUZ3p FDsrUeM/B4i8u4RRymhsDucAw6rlqBsq7YdBkadADbyx8ejlRNvBKj7r19ZlD1EN8Evb 1dDkMKbsfsi9j8GcFQk17bcQBLZIQhqZoZzWQXz/I8oWBaF/iPGwOsHluzElXUcI9Lr8 TX0zFaXNbwagaiS0GkMU4WUa56dwYtTcFfyGa1hjlSK5puHjKXusRWVMo/qwfxFoK+VZ 0RIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dSB+IkOqYpOGOVJihNnHQgBmEZMvmwiwduTzEz9K0SU=; b=B27DkxpZI4o9D7tjKqFj/8eA5KOZK9ENJGOZ+CIhm1sBbZvFuvSJMQz21qZnlNDeQW uD42YmmTmy/LCR8HMjLYGy2pGfxgsoekUEB1kTH1WOsECos16MPJklYdSYKsvf1aHCtM /DKfyft/CAS//fL3j3anW/F6X03eZs4fYVHBdYe67pcz4rV8zqqekCI9luK8AeczDV63 X/KKg55wx2sWMxz0R4wjN2SVooumjosr7YU9/3hTaNUCNJmxn8E0FGu8QdbS82jFlhJ8 mifnKHbfAr/5jccyB6rjAVAUSrbps/lG/YtpwxaqDleLNqcmUubtNb8boChiL4ypU1JO 51rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2Et2PLZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20si14873386plq.719.2017.12.21.06.39.50; Thu, 21 Dec 2017 06:39:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I2Et2PLZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752601AbdLUOjq (ORCPT + 28 others); Thu, 21 Dec 2017 09:39:46 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37146 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbdLUOji (ORCPT ); Thu, 21 Dec 2017 09:39:38 -0500 Received: by mail-wr0-f196.google.com with SMTP id f8so14577079wre.4 for ; Thu, 21 Dec 2017 06:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dSB+IkOqYpOGOVJihNnHQgBmEZMvmwiwduTzEz9K0SU=; b=I2Et2PLZi8siN1HxWc9dtTELIj5qr60SC90rOH9V+M4QpxL6cfg7lU6egAWhb4xzz2 PjfvlRy7BRto55guKggOAzBj2NCbWFpMBgI+eN/UBxvjU0bmp0ASafL5zCXrVA3LxDem yvcooS3M8qmAlqfu7qzwocdehoQzD2Ag8aJ4I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dSB+IkOqYpOGOVJihNnHQgBmEZMvmwiwduTzEz9K0SU=; b=gxewMtzGJRFGTjcn215cAsCMoKqWwmHlO8xltzylMwq593QC20H4WsqyjH2Pp95w7B Q44/0AB+4oWijU0yOzu66WzBOXO8CYf4qMzpOJBym4zL4HAU7fT71ie2ucImSZOo9ebV HvGIfeKcLTpPz6VBteJ34UXCweA/4N9kWuVII+nUmZdtlviIQ+YafTZQH8ZUzQiByk3p kZOCYWNNfCy9HEfc4rwWTq9uGsRhn/a4Mt/1bq7dvi4V6emPN/T8dfocQueqeO+6zSrl 8/JIimrnepBkoCKXd4p0YhixhfmmaZjm27XmRpMknQSJ0FKFPiZJ1xArpTA61vigTYiD yBoQ== X-Gm-Message-State: AKGB3mKawNjPn9ovca5wR26NkX7jgpVl8ZqNIXghmZyYF1y3mZi7U1pn nKRePpw4SXZbac8iNhRZVRFrBQ== X-Received: by 10.223.160.161 with SMTP id m30mr12726762wrm.91.1513867177633; Thu, 21 Dec 2017 06:39:37 -0800 (PST) Received: from mai.localdomain ([2a01:e35:879a:6cd0:3e97:eff:fe5b:1402]) by smtp.gmail.com with ESMTPSA id f90sm7311815wmh.12.2017.12.21.06.39.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Dec 2017 06:39:37 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: Thomas Gleixner , 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 Message-Id: <1513867161-19104-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513867161-19104-1-git-send-email-daniel.lezcano@linaro.org> References: <1513867161-19104-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- drivers/clocksource/timer-of.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) -- 2.7.4 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) {