Add support for the DS1339 RTC, like found on the PiJuice.
authormglocker <mglocker@openbsd.org>
Tue, 18 Oct 2022 16:07:59 +0000 (16:07 +0000)
committermglocker <mglocker@openbsd.org>
Tue, 18 Oct 2022 16:07:59 +0000 (16:07 +0000)
From Michal Mynar -- Thanks!

ok deraadt@

sys/dev/i2c/ds1307.c

index 0e4cec7..912548a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ds1307.c,v 1.6 2022/10/15 18:22:53 kettenis Exp $ */
+/*     $OpenBSD: ds1307.c,v 1.7 2022/10/18 16:07:59 mglocker Exp $ */
 
 /*
  * Copyright (c) 2016 Marcus Glocker <mglocker@openbsd.org>
@@ -93,7 +93,9 @@ maxrtc_match(struct device *parent, void *v, void *arg)
        struct i2c_attach_args *ia = arg;
 
        if (strcmp(ia->ia_name, "dallas,ds1307") == 0 ||
-           strcmp(ia->ia_name, "ds1307") == 0)
+           strcmp(ia->ia_name, "ds1307") == 0 ||
+           strcmp(ia->ia_name, "dallas,ds1339") == 0 ||
+           strcmp(ia->ia_name, "ds1339") == 0)
                return (1);
 
        return (0);