LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: rtc-linux@googlegroups.com, lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>
Subject: [patch 2.6.24-git] rtc: avoid legacy drivers with generic framework
Date: Sun, 10 Feb 2008 12:08:19 -0800 [thread overview]
Message-ID: <200802101208.20593.david-b@pacbell.net> (raw)
Kconfig tweaks to help reduce RTC configuration bugs, by avoiding
legacy RTC drivers when the generic RTC framework is enabled:
- If rtc-cmos is selected, disable the legacy rtc driver;
- When using generic RTC on x86, enable rtc-cmos by default;
- In the old "chardev RTC" section of Kconfig, add a comment
warning people off these (seven) legacy RTC drivers when
the generic framework is in use.
People can still use the legacy drivers if they want (or need) to.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
This doesn't fix the broken dependencies for the legacy "CMOS" RTC
driver. Ideally it would be a full list of platforms where it works,
not a partial list of ones where it won't. Or better yet, it would
depend on a "HAVE_CMOS_RTC" flag defined by various platforms ...
surely there's a Kconfig style guideline lurking there.
drivers/char/Kconfig | 6 +++++-
drivers/rtc/Kconfig | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
--- g26.orig/drivers/char/Kconfig 2008-02-10 11:16:04.000000000 -0800
+++ g26/drivers/char/Kconfig 2008-02-10 11:30:21.000000000 -0800
@@ -704,9 +704,14 @@ config NVRAM
To compile this driver as a module, choose M here: the
module will be called nvram.
+comment "Avoid any legacy RTC drivers you may see here"
+ depends on RTC_LIB
+
config RTC
tristate "Enhanced Real Time Clock Support"
- depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV && !ARM && !SUPERH && !S390
+ depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \
+ && !ARM && !SUPERH && !S390 \
+ && RTC_DRV_CMOS=n
---help---
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
--- g26.orig/drivers/rtc/Kconfig 2008-02-10 11:16:04.000000000 -0800
+++ g26/drivers/rtc/Kconfig 2008-02-10 11:19:00.000000000 -0800
@@ -294,6 +294,7 @@ comment "Platform RTC drivers"
config RTC_DRV_CMOS
tristate "PC-style 'CMOS'"
depends on X86 || ALPHA || ARM || M32R || ATARI || PPC || MIPS
+ default y if X86
help
Say "yes" here to get direct support for the real time clock
found in every PC or ACPI-based system, and some other boards.
next reply other threads:[~2008-02-10 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 20:08 David Brownell [this message]
2008-02-11 9:54 ` [rtc-linux] " Alessandro Zummo
2008-03-08 19:19 ` David Brownell
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=200802101208.20593.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rtc-linux@googlegroups.com \
--subject='Re: [patch 2.6.24-git] rtc: avoid legacy drivers with generic framework' \
/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
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).