From: Arnd Bergmann <arnd@arndb.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Helge Deller <deller@gmx.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Rich Felker <dalias@libc.org>,
David Howells <dhowells@redhat.com>,
alpha <linux-alpha@vger.kernel.org>,
Alessandro Zummo <a.zummo@towertech.it>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Parisc List <linux-parisc@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
linux-m68k <linux-m68k@lists.linux-m68k.org>,
RTCLINUX <rtc-linux@googlegroups.com>,
Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH v2 1/6] rtc: m68k: provide rtc_class_ops directly
Date: Wed, 27 Apr 2016 12:34:19 +0200 [thread overview]
Message-ID: <4888267.R0sXv0tuDQ@wuerfel> (raw)
In-Reply-To: <CAMuHMdXS0JL_weLvjV4+i0ZPj=N+G6Vs1WDE9jffGUWehq5Xzg@mail.gmail.com>
On Wednesday 27 April 2016 09:47:56 Geert Uytterhoeven wrote:
> > --- a/arch/m68k/kernel/time.c
> > +++ b/arch/m68k/kernel/time.c
> > @@ -86,7 +86,24 @@ void read_persistent_clock(struct timespec *ts)
> > }
> > }
> >
> > -#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
> > +#if defined(CONFIG_ARCH_USES_GETTIMEOFFSET) && defined(CONFIG_RTC_DRV_GENERIC)
>
> s/defined/IS_ENABLED/ for the modular case.
Thanks, fixed in all three architectures/
> > @@ -95,7 +112,10 @@ static int __init rtc_init(void)
> > if (!mach_hwclk)
> > return -ENODEV;
> >
> > - pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
> > + /* or just call devm_rtc_device_register instead? */
>
> I guess this comment is a bogus leftover? There's no "dev" parameter to
> pass to devm_rtc_device_register() here.
Sort of. When I wrote it, I thought that a NULL argument would work,
and I later found out myself that it doesn't.
I'll drop the comment there, but there are still a few ways we (probably
not me, but whoever is interested) could take this further:
- register both the device and the driver here, and call
devm_rtc_device_register from the probe function so we can move away
from drivers/rtc/rtc-generic.c
- do this separately for mac, mvme147, mvme16x, sun3, q40 and sun3x
- move the six implementations into drivers/rtc as standalone drivers.
One (AFAIK) unsolved problem here is the question of how to handle
read_boot_clock/read_persistent_clock/update_persistent_clock in this
case. This is a really odd API that is implemented in various ways
on a few major architectures, and not at all on others, so it's all
highly inconsistent.
Arnd
next prev parent reply other threads:[~2016-04-27 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 21:52 [PATCH v2 0/6] simplify rtc-generic driver Arnd Bergmann
2016-04-26 21:52 ` [PATCH v2 1/6] rtc: m68k: provide rtc_class_ops directly Arnd Bergmann
2016-04-27 7:47 ` Geert Uytterhoeven
2016-04-27 10:34 ` Arnd Bergmann [this message]
2016-04-26 21:52 ` [PATCH v2 2/6] rtc: m68k: provide ioctl for q40 Arnd Bergmann
2016-04-26 21:52 ` [PATCH v2 3/6] rtc: powerpc: provide rtc_class_ops directly Arnd Bergmann
2016-04-26 21:52 ` [PATCH v2 4/6] rtc: parisc: " Arnd Bergmann
2016-04-27 0:22 ` kbuild test robot
2016-04-27 10:10 ` Arnd Bergmann
2016-04-26 21:52 ` [PATCH v2 5/6] rtc: sh: " Arnd Bergmann
2016-04-26 21:52 ` [PATCH v2 6/6] rtc: generic: remove get_rtc_time/set_rtc_time wrappers Arnd Bergmann
2016-04-27 7:50 ` [PATCH v2 0/6] simplify rtc-generic driver Geert Uytterhoeven
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=4888267.R0sXv0tuDQ@wuerfel \
--to=arnd@arndb.de \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=benh@kernel.crashing.org \
--cc=dalias@libc.org \
--cc=deller@gmx.de \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=rtc-linux@googlegroups.com \
/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;
as well as URLs for NNTP newsgroup(s).