projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b1e002
)
close rtc out clock when system powerdown
author
蔡伟立
<cwl@rock-chips.com>
Mon, 5 Sep 2011 10:31:29 +0000
(18:31 +0800)
committer
蔡伟立
<cwl@rock-chips.com>
Mon, 5 Sep 2011 10:31:29 +0000
(18:31 +0800)
drivers/rtc/rtc-HYM8563.c
[changed mode: 0644->0755]
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-HYM8563.c
b/drivers/rtc/rtc-HYM8563.c
old mode 100644
(file)
new mode 100755
(executable)
index
341f20d
..
c949925
--- a/
drivers/rtc/rtc-HYM8563.c
+++ b/
drivers/rtc/rtc-HYM8563.c
@@
-478,6
+478,19
@@
static int __devexit hym8563_remove(struct i2c_client *client)
return 0;
}
+
+void hym8563_shutdown(struct i2c_client * client)
+{ u8 regs[2];
+ int ret;
+ //disable clkout
+ regs[0] = 0x00;
+ ret=hym8563_i2c_set_regs(client, RTC_CLKOUT, regs, 1);
+ if(ret<0)
+ printk("rtc shutdown is error\n");
+}
+
+
+
static const struct i2c_device_id hym8563_id[] = {
{ "rtc_hym8563", 0 },
{ }
@@
-491,6
+504,7
@@
static struct i2c_driver hym8563_driver = {
},
.probe = hym8563_probe,
.remove = __devexit_p(hym8563_remove),
+ .shutdown=hym8563_shutdown,
.id_table = hym8563_id,
};