rtc-ds1302: add some abstraction for new platform support
authorMarc Zyngier <maz@misterjones.org>
Mon, 24 May 2010 21:33:47 +0000 (14:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 May 2010 15:07:08 +0000 (08:07 -0700)
commit72cc8e51cfdde9007adab7d841ac4113b05b2c56
treebe4b77d5861b92deaba1f99037075d89b8269748
parente17ab5cbed795d3823da830f5e8d3ffe25a38446
rtc-ds1302: add some abstraction for new platform support

The current ds1302 driver (or at least the one that lives in /drivers/rtc)
seems to be designed for memory mapped devices only.  This make it quite
hard to add support for GPIO-based implementations (as this is the case
for the upcoming Arcom Vulcan).

This patch moves the direct register access to inline functions with
explicit names.  Still not as good as a proper platform driver, but at
least neater.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-ds1302.c