public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Daniel Lezcano
	<daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] clocksource: tegra: Register watchdog device
Date: Tue, 14 Oct 2014 13:00:45 -0600	[thread overview]
Message-ID: <543D72DD.4000501@wwwdotorg.org> (raw)
In-Reply-To: <20141014104218.GG18993@ulmo>

On 10/14/2014 04:42 AM, Thierry Reding wrote:
> On Mon, Oct 13, 2014 at 09:42:10AM -0700, Guenter Roeck wrote:
>> On 10/13/2014 05:05 AM, Thierry Reding wrote:
>>> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>>
>>> The watchdog timer is part of the timer controller block on Tegra. In
>>> order to avoid access to the same registers from two drivers, register
>>> the watchdog device from the clocksource driver.
>>>
>>> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>
>> Does that really make sense ?
>>
>> A couple of callbacks into the clock driver to implement register accesses
>> might be a better approach.
>
> I guess that would be a valid approach as well. It has the downside of
> requiring the addition of at least two globally visible symbols to the
> kernel. It also means that we'd need to somehow pass around a struct
> device for diagnostic messages and so on. Dealing with all of that seems
> like much more of a burden than this.
>
> Also if you look at the diffstat this approach allows us to get rid of
> 80 lines of code. Adding a custom mechanism to share the register space
> would be more likely to result in a positive diffstat.

FWIW, (although I haven't read the patches), the general idea of 
registering a single driver for each HW block makes sense to me. While 
we've split up HW blocks into separate drivers in the past, I think 
that's just made things more complex without much benefit, so I think 
those decisions were a mistake in retrospect. If we do actually need to 
split things up into separate drivers, we should use MFD rather than 
multiple unrelated top-level drivers. That way, we will have a single 
top-level driver that gets instantiated from a single DT node (or 
platform device in a board file or ACPI thing or ...)

  reply	other threads:[~2014-10-14 19:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13 12:05 [PATCH 1/2] clocksource: tegra: Refactor and cleanup Thierry Reding
     [not found] ` <1413201922-4210-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-13 12:05   ` [PATCH 2/2] clocksource: tegra: Register watchdog device Thierry Reding
     [not found]     ` <1413201922-4210-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-13 16:42       ` Guenter Roeck
     [not found]         ` <543C00E2.2090806-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2014-10-14 10:42           ` Thierry Reding
2014-10-14 19:00             ` Stephen Warren [this message]
     [not found]               ` <543D72DD.4000501-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-10-15  8:04                 ` Thierry Reding
2014-10-15 13:25                   ` Guenter Roeck

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=543D72DD.4000501@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org \
    /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