Skip to content

: Add support for Dallas/Maxim DS1685/1687 RTC

Kumba linux-mips 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2: Add support for Dallas/Maxim DS1685/1687 RTCdrivers/rtc/Kconfig drivers/rtc/Makefile drivers/rtc/rtc-ds1685.c +1 more+1290 -09 replies
2/2: Add support for Dallas/Maxim DS1685/1687 RTCarch/mips/sgi-ip32/ip32-platform.c arch/mips/sgi-ip32/ip32-reset.c drivers/rtc/Kconfig +1 more+88 -650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2]: Add support for Dallas/Maxim DS1685/1687 RTC

Okay, it's been a while since I last did this, so bear with me if I make any mistakes.

Following this are two parts of a patch to add an RTC class driver for the Dallas/Maxim DS1685/1687 RTC chip. I'm routing it through this ML because A) I don't know any better and B) only the SGI O2 currently makes use of it. Plus people here have a really keen eye for things and can tell me if I need to do something better.

The first patch is derived from an older version of the DS1685 driver I found on Google. That patch apparently made it up to akpm's -mm branch, but never made it into a -mm release and as far as I can tell, died at some undetermined point. I haven't tried contacting the original author, either. I just used the DS1685 data sheet, O2's original CMOS RTC driver, and the old code for the IP30 (Octane) RTC driver (which is the same chip) to get this working.

The second patch adds in the IP32-specific bits. I can't think of a sane way to avoid mixing arch-specific code with generic code, but the register padding that IP32 needs is, as far as I can tell, unavoidable. The second patch also adds in minor differences for the DS17285/17287 RTC, which is extremely similar to the 1685.

IRIX suggests IP32 is supposed to have the 17287 chips by default, but I examined four separate O2 boards and all of them have DS1687-5 chips. Even two of my Octane system boards had DS1687-5 chips. But the differences were minor enough, that they can be enabled by flipping a menuconfig item. You can even run them w/ a 1687-5 chip with no ill effects.

Also, the second patch removes the old RTC access code from IP32, but it does NOT touch the power down code. That can be modified to include the ds1685.h file and allow for the deletion of 17287rtc.h down the road. The current RTC framework doesn't appear to support the extended registers used for power down anyways, so there's no way to build this into the driver itself. Though it wouldn't be very hard to add it once the base RTC class code picks up the support.

Thoughts?

Signature · 7 lines
Joshua Kinard
Gentoo/MIPS
[email protected]

"The past tempts us, the present confuses us, the future frightens us.  And our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic