All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>,
	rtc-linux@googlegroups.com,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2.6.20-rc3 1/3] rtc-cmos driver
Date: Mon, 28 May 2007 19:35:14 +0100	[thread overview]
Message-ID: <20070528183513.GA2815@srcf.ucam.org> (raw)
In-Reply-To: <200701051001.58472.david-b@pacbell.net>

On Fri, Jan 05, 2007 at 10:01:57AM -0800, David Brownell wrote:
> This is an "RTC framework" driver for the "CMOS" RTCs which are standard
> on PCs and some other platforms.  That's MC146818 compatible silicon.
> Advantages of this vs. drivers/char/rtc.c (use one _or_ the other, only
> one will be able to claim the RTC irq) include:

Sorry for getting to this so late - I've only just started playing with 
this driver.

> +static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t)

This is awkward. At the very least, year will be set to -1. This then 
gets passed through to rtc_tm_to_time, which results in reading 
wakealarm providing very odd feedback. I guess the "right" fix is for 
rtc_tm_to_time to use the current values for anything that's -1?

> +	rtc_control = CMOS_READ(RTC_CONTROL);
> +	rtc_control &= ~(RTC_PIE | RTC_AIE | RTC_UIE);

Do you really want to clobber RTC_AIE on probe? If an alarm has been set 
by the BIOS, it seems a little unfair to disable it on boot.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  parent reply	other threads:[~2007-05-28 18:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05 18:01 [patch 2.6.20-rc3 1/3] rtc-cmos driver David Brownell
2007-01-05 20:45 ` Alessandro Zummo
2007-01-06  3:10   ` David Brownell
2007-01-06  3:33     ` David Brownell
2007-01-06 17:17       ` Woody Suwalski
2007-01-06 21:17         ` David Brownell
2007-01-07  9:02           ` Russell King
2007-01-09 16:37             ` Woody Suwalski
2007-01-10  0:01               ` David Brownell
2007-01-10  5:27                 ` David Brownell
2007-05-28 18:35 ` Matthew Garrett [this message]
2007-05-28 21:07   ` 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=20070528183513.GA2815@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=alessandro.zummo@towertech.it \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.