summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-01-13 11:01:20 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-01-13 11:01:20 +0000
commit2423323053ebb43a8376c84e0e9ccf0f0be39b14 (patch)
tree33a79ac096c4bf7e46f311aa48efaf6d1d107e04 /sys/dev/i2c
parent41481b97dc0ec6e528702f44ed3cc06207086f00 (diff)
Add support for the HYM8563 RTC, which is a PCF8563 clone.
ok kurt@
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/pcf8563.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/i2c/pcf8563.c b/sys/dev/i2c/pcf8563.c
index c1776e1c51d..1b78492f055 100644
--- a/sys/dev/i2c/pcf8563.c
+++ b/sys/dev/i2c/pcf8563.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcf8563.c,v 1.2 2019/10/06 15:45:37 kettenis Exp $ */
+/* $OpenBSD: pcf8563.c,v 1.3 2021/01/13 11:01:19 kettenis Exp $ */
/*
* Copyright (c) 2005 Kimihiro Nonaka
@@ -44,8 +44,6 @@
* PCF8563 Real-Time Clock
*/
-#define PCF8563_ADDR 0x51 /* Fixed I2C Slave Address */
-
#define PCF8563_CONTROL1 0x00
#define PCF8563_CONTROL2 0x01
#define PCF8563_SECONDS 0x02
@@ -106,8 +104,8 @@ pcxrtc_match(struct device *parent, void *v, void *arg)
{
struct i2c_attach_args *ia = arg;
- if (strcmp(ia->ia_name, "nxp,pcf8563") == 0 &&
- ia->ia_addr == PCF8563_ADDR)
+ if (strcmp(ia->ia_name, "nxp,pcf8563") == 0 ||
+ strcmp(ia->ia_name, "haoyu,hym8563") == 0)
return (1);
return (0);