mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, benjamin.gaignard@linaro.org
Subject: [PATCH 01/12] clocksource/drivers/timer-of: Store the device node pointer
Date: Thu,  4 Jan 2018 13:50:17 +0100	[thread overview]
Message-ID: <1515070228-10481-2-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1515070228-10481-1-git-send-email-daniel.lezcano@linaro.org>

Under certain circumstances, some specific operations must be done with the
device node pointer, that forces the timer code to propagate the pointer to
the functions which need it. In order to consolidate the function signatures
in the different drivers by using the timer-of structure, let's store it in
the timer-of structure as a handy pointer when it is needed.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/timer-of.c | 3 +++
 drivers/clocksource/timer-of.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 2af8b8a..2ae348b 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -201,6 +201,9 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
 
 	if (!to->clkevt.name)
 		to->clkevt.name = np->name;
+
+	to->np = np;
+
 	return ret;
 
 out_fail:
diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h
index f521477..2efa8ec 100644
--- a/drivers/clocksource/timer-of.h
+++ b/drivers/clocksource/timer-of.h
@@ -32,6 +32,7 @@ struct of_timer_clk {
 
 struct timer_of {
 	unsigned int flags;
+	struct device_node *np;
 	struct clock_event_device clkevt;
 	struct of_timer_base of_base;
 	struct of_timer_irq  of_irq;
-- 
2.7.4

  reply	other threads:[~2018-01-04 12:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 12:50 [PATCH 00/12] clocksource/drivers/stm32: Consolidate the timer Daniel Lezcano
2018-01-04 12:50 ` Daniel Lezcano [this message]
2018-01-04 12:50 ` [PATCH 02/12] clocksource/drivers/timer-of: Don't request the resource by name Daniel Lezcano
2018-01-04 12:50 ` [PATCH 03/12] clocksource/drivers/stm32: Fix kernel panic with multiple timers Daniel Lezcano
2018-01-04 12:50 ` [PATCH 04/12] clocksource/drivers/stm32: Convert the driver to timer-of Daniel Lezcano
2018-01-04 12:50 ` [PATCH 05/12] clocksource/drivers/stm32: Use the node name as timer name Daniel Lezcano
2018-01-04 12:50 ` [PATCH 06/12] clocksource/drivers/stm32: Encapsulate the timer width sorting out function Daniel Lezcano
2018-01-04 12:50 ` [PATCH 07/12] clocksource/drivers/stm32: Compute a prescaler value with a targeted rate Daniel Lezcano
2018-01-04 12:50 ` [PATCH 08/12] clocksource/drivers/stm32: Add the oneshot mode Daniel Lezcano
2018-01-04 12:50 ` [PATCH 09/12] clocksource/drivers/stm32: Encapsulate more the clockevent code Daniel Lezcano
2018-01-04 12:50 ` [PATCH 10/12] clocksource/drivers/stm32: Add the clocksource Daniel Lezcano
2018-01-04 12:50 ` [PATCH 11/12] clocksource/drivers/stm32: Add the timer delay Daniel Lezcano
2018-01-04 12:50 ` [PATCH 12/12] clocksource/drivers/stm32: Start the timer's counter sooner Daniel Lezcano

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=1515070228-10481-2-git-send-email-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=benjamin.gaignard@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

Powered by JetHome