From patchwork Mon Jan 8 13:28:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 123724 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2731684qgn; Mon, 8 Jan 2018 05:33:40 -0800 (PST) X-Google-Smtp-Source: ACJfBots+6kzY+Fx6jxRFBeGA5c6Y/bxaBNFgSt/fbwPhvCUWlX07juyRD0Ytx/q54S36YAuD1WQ X-Received: by 10.99.97.9 with SMTP id v9mr3642562pgb.412.1515418419908; Mon, 08 Jan 2018 05:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515418419; cv=none; d=google.com; s=arc-20160816; b=iMI8IGX5Y6jC/JhedV3qH/tYhwCmZory3DnkmlaznPWzQ5n8iOnqnh6Qr0ZkDZXOom mGQdomtiz6wWKJGAXWfrdfSOPw31pGDMx2PaBTU0aHjjKzmTnpm3ayCQEaKsFnJCo1KN beKLP5HFvtWshu4SJneL26Jgjbh2aGRNlbvUDMBClNPllV6+/SSL9wGHBLGlsCK2su77 Pfg3GmjPbzV5IKyVvkwJQxWy0Xeyp5hqj9zkIXfdaNy4czyZRlBNXrKnDUk96xeTWZ06 65B5GxyfIKPh3ytlNOMTr2WNEvNFWVc6cazfW6Pg+D78sGSEL5LKAwHACE17pAIslR7n SaTQ== 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=Yf1xYWKoFcKj/XbT9l5x78CyNWaYfwpREhR70WY4zS/fnR8chdPRNEmG65ju9DWGOG ultJTbDkG5QErDaN9YHTidpakRwSl/+DqtlaBigDrkknS8HVYozshAlJpyEIiRJ9oIwV LGAP5ApcLk+IiIVorkbh2hkPfUh4yjmGlBy4cuGX73JM0INNmRVzNTIqqNGSQ6JDJs0b ENeBTfKrKY21fG9L51VE19dCmnxlOJ0+tToKAm/ZTZrYRV41oZ6p/W64uGW5CWEX2R0e PeY2o6qWgb7YjSyPfBq9aWzu2QuXKulaiLUuyb7mghNRxugZbICMDkdaHD68k1Adfxfm onfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RXY9Rgy9; 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 e2si1332360pls.652.2018.01.08.05.33.39; Mon, 08 Jan 2018 05:33:39 -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=RXY9Rgy9; 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 S933189AbeAHN3g (ORCPT + 28 others); Mon, 8 Jan 2018 08:29:36 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34300 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932670AbeAHN3b (ORCPT ); Mon, 8 Jan 2018 08:29:31 -0500 Received: by mail-wr0-f193.google.com with SMTP id 36so10742142wrh.1 for ; Mon, 08 Jan 2018 05:29:31 -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=RXY9Rgy9yonyysfJr3u5zdSQVQdVh7KGZghNKULfQ77Fb3kVagvifMzHwqVD3qJW34 bPoeNzmXe0RZKfpSBNKywDE8KPIQCK7PI3+dMkCzV4RZBpFxpdGgj4bu9t/lDrqCT3/H 32rxlLxAaByID9qwlqi1f8fvdoBO98p0IpWG0= 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=tXVnQJC5CNIptXB5kh53cj6fSVK+XpUA//CkKXBsFcFnuNTk999jtaWepfWN9wVEYI /B16t3OwUsC45zYCi0PhzLuXpmNGAfSRcv/QNEAyKMt8+hvrZ21pFXNfaf9YDZWpjx7e CcjoXprN5k2YBVBefseekXcH6Vl6+3hrhQrEA0utI6eaXBdgQvvyxm10FfFml0mW8Sd7 hm8xiMPgMwmHhfWlOz3bmjfhen23aNqKyppV+Wbi3846Jqw8CbanwpRmqXZZVY5U/PJy lVNb2ePStk1okHSrypzzX9FPgwrCVii5hKZDsCzsbO3rTFszjN9Vb2eAPssBD5pzKTfW Mdqw== X-Gm-Message-State: AKGB3mLIzGqi1Tl1WJLD51G79d/Yxad78Kh8g51ex+eEoAPIBx7ogaXw 3v/7bP5IlqeMCjNoQRq/CPRMmg== X-Received: by 10.223.164.86 with SMTP id e22mr10985618wra.30.1515418170325; Mon, 08 Jan 2018 05:29:30 -0800 (PST) Received: from mai.lan ([2001:41d0:fe90:b800:312a:53a5:1bef:6622]) by smtp.gmail.com with ESMTPSA id q196sm14354222wmb.22.2018.01.08.05.29.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 05:29:29 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org Subject: [PATCH 06/20] clocksource/drivers/timer-of: Add kernel documentation Date: Mon, 8 Jan 2018 14:28:45 +0100 Message-Id: <1515418139-23276-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> References: <1bbaef2e-4080-3f54-7db3-a8989acfd691@free.fr> <1515418139-23276-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) {