Commit 4d4e5ce8 authored by Alessandro Zummo's avatar Alessandro Zummo Committed by Greg Kroah-Hartman

[PATCH] i2c: New Xicor X1205 RTC driver

New driver for the Xicor X1205 RTC chip.
Signed-off-by: default avatarAlessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ddec748f
Kernel driver x1205
===================
Supported chips:
* Xicor X1205 RTC
Prefix: 'x1205'
Addresses scanned: none
Datasheet: http://www.intersil.com/cda/deviceinfo/0,1477,X1205,00.html
Authors:
Karen Spearel <kas11@tampabay.rr.com>,
Alessandro Zummo <a.zummo@towertech.it>
Description
-----------
This module aims to provide complete access to the Xicor X1205 RTC.
Recently Xicor has merged with Intersil, but the chip is
still sold under the Xicor brand.
This chip is located at address 0x6f and uses a 2-byte register addressing.
Two bytes need to be written to read a single register, while most
other chips just require one and take the second one as the data
to be written. To prevent corrupting unknown chips, the user must
explicitely set the probe parameter.
example:
modprobe x1205 probe=0,0x6f
The module supports one more option, hctosys, which is used to set the
software clock from the x1205. On systems where the x1205 is the
only hardware rtc, this parameter could be used to achieve a correct
date/time earlier in the system boot sequence.
example:
modprobe x1205 probe=0,0x6f hctosys=1
......@@ -126,4 +126,13 @@ config SENSORS_MAX6875
This driver can also be built as a module. If so, the module
will be called max6875.
config RTC_X1205_I2C
tristate "Xicor X1205 RTC chip"
depends on I2C && EXPERIMENTAL
help
If you say yes here you get support for the Xicor X1205 RTC chip.
This driver can also be built as a module. If so, the module
will be called x1205.
endmenu
......@@ -13,6 +13,7 @@ obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o
obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
obj-$(CONFIG_TPS65010) += tps65010.o
obj-$(CONFIG_RTC_X1205_I2C) += x1205.o
ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
EXTRA_CFLAGS += -DDEBUG
......
This diff is collapsed.
/*
* x1205.h - defines for drivers/i2c/chips/x1205.c
* Copyright 2004 Karen Spearel
* Copyright 2005 Alessandro Zummo
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef __LINUX_X1205_H__
#define __LINUX_X1205_H__
/* commands */
#define X1205_CMD_GETDATETIME 0
#define X1205_CMD_SETTIME 1
#define X1205_CMD_SETDATETIME 2
#define X1205_CMD_GETALARM 3
#define X1205_CMD_SETALARM 4
#define X1205_CMD_GETDTRIM 5
#define X1205_CMD_SETDTRIM 6
#define X1205_CMD_GETATRIM 7
#define X1205_CMD_SETATRIM 8
extern int x1205_do_command(unsigned int cmd, void *arg);
extern int x1205_direct_attach(int adapter_id,
struct i2c_client_address_data *address_data);
#endif /* __LINUX_X1205_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment