Module Name: src Committed By: jdc Date: Fri Oct 25 14:32:10 UTC 2013
Modified Files: src/sys/dev/i2c: at24cxx.c src/sys/dev/ofw: ofw_subr.c Log Message: Add "i2c-at34c02" AT34C02 EEPROM. This is compatible with the AT24C02 EEPROM, apart from software write protection (not supported in our driver). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/at24cxx.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ofw/ofw_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.15 src/sys/dev/i2c/at24cxx.c:1.16 --- src/sys/dev/i2c/at24cxx.c:1.15 Fri Oct 25 14:23:15 2013 +++ src/sys/dev/i2c/at24cxx.c Fri Oct 25 14:32:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.15 2013/10/25 14:23:15 jdc Exp $ */ +/* $NetBSD: at24cxx.c,v 1.16 2013/10/25 14:32:10 jdc Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.15 2013/10/25 14:23:15 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.16 2013/10/25 14:32:10 jdc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -102,6 +102,7 @@ static int seeprom_wait_idle(struct seep static const char * seeprom_compats[] = { "i2c-at24c64", + "i2c-at34c02", NULL }; Index: src/sys/dev/ofw/ofw_subr.c diff -u src/sys/dev/ofw/ofw_subr.c:1.22 src/sys/dev/ofw/ofw_subr.c:1.23 --- src/sys/dev/ofw/ofw_subr.c:1.22 Tue Sep 24 18:04:53 2013 +++ src/sys/dev/ofw/ofw_subr.c Fri Oct 25 14:32:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_subr.c,v 1.22 2013/09/24 18:04:53 jdc Exp $ */ +/* $NetBSD: ofw_subr.c,v 1.23 2013/10/25 14:32:10 jdc Exp $ */ /* * Copyright 1998 @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.22 2013/09/24 18:04:53 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.23 2013/10/25 14:32:10 jdc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -384,6 +384,8 @@ of_enter_i2c_devs(prop_dictionary_t prop /* Set size for EEPROM's that we know about */ if (strcmp(compatible, "i2c-at24c64") == 0) prop_dictionary_set_uint32(dev, "size", 8192); + if (strcmp(compatible, "i2c-at34c02") == 0) + prop_dictionary_set_uint32(dev, "size", 256); } prop_array_add(array, dev); prop_object_release(dev);