public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, sensors@Stimpy.netroedge.com
Cc: rvinson@mvista.com
Subject: [PATCH] I2C: Add support for Maxim/Dallas DS1374 Real-Time Clock Chip (2/2)
Date: Tue, 21 Jun 2005 22:17:48 -0700	[thread overview]
Message-ID: <1119417468250@kroah.com> (raw)
In-Reply-To: <1119417468520@kroah.com>

[PATCH] I2C: Add support for Maxim/Dallas DS1374 Real-Time Clock Chip (2/2)

This change provides support for the DS1374 Real-Time Clock chip present
on the MPC8349ADS board. It depends on a previous patch which adds I2C
support for the DS1374.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit bdca3f0aedde85552099aa95ab1449bf81e4f6f5
tree 1016146e6b110707163777101436eb5b339d39bc
parent c124a78d8c7475ecc43f385f34112b638c4228d9
author Randy Vinson <rvinson@mvista.com> Fri, 03 Jun 2005 14:43:56 -0700
committer Greg Kroah-Hartman <gregkh@suse.de> Tue, 21 Jun 2005 21:52:06 -0700

 arch/ppc/platforms/83xx/mpc834x_sys.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -185,6 +185,26 @@ mpc834x_sys_init_IRQ(void)
 	ipic_set_default_priority();
 }
 
+#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
+extern ulong	ds1374_get_rtc_time(void);
+extern int	ds1374_set_rtc_time(ulong);
+
+static int __init
+mpc834x_rtc_hookup(void)
+{
+	struct timespec	tv;
+
+	ppc_md.get_rtc_time = ds1374_get_rtc_time;
+	ppc_md.set_rtc_time = ds1374_set_rtc_time;
+
+	tv.tv_nsec = 0;
+	tv.tv_sec = (ppc_md.get_rtc_time)();
+	do_settimeofday(&tv);
+
+	return 0;
+}
+late_initcall(mpc834x_rtc_hookup);
+#endif
 static __inline__ void
 mpc834x_sys_set_bat(void)
 {


  reply	other threads:[~2005-06-22  6:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1119417466661@kroah.com>
2005-06-22  5:17 ` [PATCH] I2C: documentation update 3/3 Greg KH
2005-06-22  5:17   ` [PATCH] I2C: lm90 uses new sysfs callbacks Greg KH
2005-06-22  5:17     ` [PATCH] I2C: add adm9240 driver documentation Greg KH
2005-06-22  5:17       ` [PATCH] I2C: pcf8574 driver cleanup Greg KH
2005-06-22  5:17         ` [PATCH] I2C: lm83 uses new sysfs callbacks Greg KH
2005-06-22  5:17           ` [PATCH] I2C: drivers/i2c/chips/it87.c: use dynamic " Greg KH
2005-06-22  5:17             ` [PATCH] I2C: lm63 uses new " Greg KH
2005-06-22  5:17               ` [PATCH] I2C: rename i2c-sysfs.h to hwmon-sysfs.h Greg KH
2005-06-22  5:17                 ` [PATCH] I2C: add new pca9539 driver Greg KH
2005-06-22  5:17                   ` [PATCH] max6875: new i2c device driver Greg KH
2005-06-22  5:17                     ` [PATCH] I2C: fix up ds1374.c driver so it will build Greg KH
2005-06-22  5:17                       ` Greg KH [this message]
2005-06-22  5:17                         ` [PATCH] I2C: Add support for Maxim/Dallas DS1374 Real-Time Clock Chip (1/2) Greg KH
2005-06-22  5:17                           ` [PATCH] I2C: w83781d: remove non-i2c sensor chips Greg KH
2005-06-22  5:17                             ` [PATCH] I2C: fix ds1374 build Greg KH

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=1119417468250@kroah.com \
    --to=gregkh@suse.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rvinson@mvista.com \
    --cc=sensors@Stimpy.netroedge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox