public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] RTC updates
@ 2008-10-20 19:33 Mark Brown
  2008-10-20 19:35 ` [PATCH 1/2] rtc: Fix handling of missing tm_year data when reading alarms Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2008-10-20 19:33 UTC (permalink / raw)
  To: Alessandro Zummo; +Cc: linux-kernel, rtc-linux

This patch series fixes a bug in the RTC core and adds support for the
WM8350 RTC.  The bug fix is required for the WM8350 driver since it does
not support configuration of the year for alarms, triggering the need to
handle year wraparound when reporting the alarm status.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 1/2] rtc: Fix handling of missing tm_year data when reading alarms
@ 2008-10-27 15:38 Mark Brown
  2008-10-27 15:38 ` [PATCH 2/2] rtc: rtc-wm8350: Add support for WM8350 RTC Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2008-10-27 15:38 UTC (permalink / raw)
  To: Alessandro Zummo, David Brownell
  Cc: Andrew Morton, linux-kernel, rtc-linux, Mark Brown

When fixing up invalid years rtc_read_alarm() is callign rtc_valid_tm()
as a boolean but rtc_valid_tm() returns zero on success or a negative
number if the time is not valid so the test is inverted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/rtc/interface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 7af60b9..a04c1b6 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -271,7 +271,7 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
 		dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year");
 		do {
 			alarm->time.tm_year++;
-		} while (!rtc_valid_tm(&alarm->time));
+		} while (rtc_valid_tm(&alarm->time) != 0);
 		break;
 
 	default:
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* Re: [rtc-linux] Re: [PATCH 2/2] rtc: rtc-wm8350: Add support for WM8350 RTC
@ 2008-10-27 17:26 Alessandro Zummo
  2008-10-27 17:40 ` Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Alessandro Zummo @ 2008-10-27 17:26 UTC (permalink / raw)
  To: rtc-linux; +Cc: broonie, David Brownell, Andrew Morton, linux-kernel

On Mon, 27 Oct 2008 17:24:01 +0000
Mark Brown <broonie@sirena.org.uk> wrote:

> 
> On Mon, Oct 27, 2008 at 06:04:32PM +0100, Alessandro Zummo wrote:
> 
> > > +	.resume = wm8350_rtc_resume,
> > > +	.driver = {
> > > +		.name = "wm8350-rtc",
> 
> >  I'd like rtc-wm8350 here, if it doesn't hurt anything else.
> 
> Due to needing to go through the MFD tree as well it'd make life easier
> if we could leave as-is and avoid creating any merging issues (it's also
> consistent with all the other WM8350 drivers).  Would that be OK?

 Ok, leave it that way: that's classified as "hurting" :)


-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-10-28 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-20 19:33 [PATCH 0/2] RTC updates Mark Brown
2008-10-20 19:35 ` [PATCH 1/2] rtc: Fix handling of missing tm_year data when reading alarms Mark Brown
2008-10-20 19:35   ` [PATCH 2/2] rtc: rtc-wm8350: Add support for WM8350 RTC Mark Brown
2008-10-27  5:14     ` Andrew Morton
2008-10-27 10:08       ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2008-10-27 15:38 [PATCH 1/2] rtc: Fix handling of missing tm_year data when reading alarms Mark Brown
2008-10-27 15:38 ` [PATCH 2/2] rtc: rtc-wm8350: Add support for WM8350 RTC Mark Brown
2008-10-28  6:22   ` Andrew Morton
2008-10-28 10:02     ` Mark Brown
2008-10-27 17:26 [rtc-linux] " Alessandro Zummo
2008-10-27 17:40 ` Mark Brown
2008-10-28  6:24   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox