eeprom: at24: add support for 24c2048
authorAdrian Bunk <bunk@kernel.org>
Sun, 17 Feb 2019 11:14:52 +0000 (13:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:18:25 +0000 (10:18 +0100)
commit 37cf28d3b5bca1b532a0b6aac722e7f2788a9294 upstream.

Works with ST M24M02.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/eeprom/Kconfig
drivers/misc/eeprom/at24.c

index c4e41c2..fac10c0 100644 (file)
@@ -12,7 +12,7 @@ config EEPROM_AT24
          ones like at24c64, 24lc02 or fm24c04:
 
             24c00, 24c01, 24c02, spd (readonly 24c02), 24c04, 24c08,
-            24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024
+            24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024, 24c2048
 
          Unless you like data loss puzzles, always be sure that any chip
          you configure as a 24c32 (32 kbit) or larger is NOT really a
index d8a485f..a37b9b6 100644 (file)
@@ -170,6 +170,7 @@ static const struct i2c_device_id at24_ids[] = {
        { "24c256",     AT24_DEVICE_MAGIC(262144 / 8,   AT24_FLAG_ADDR16) },
        { "24c512",     AT24_DEVICE_MAGIC(524288 / 8,   AT24_FLAG_ADDR16) },
        { "24c1024",    AT24_DEVICE_MAGIC(1048576 / 8,  AT24_FLAG_ADDR16) },
+       { "24c2048",    AT24_DEVICE_MAGIC(2097152 / 8,  AT24_FLAG_ADDR16) },
        { "at24", 0 },
        { /* END OF LIST */ }
 };