[PATCH V2] eeprom: at24: support second page of M24M01

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The M24M01-D* eeproms are in effect 2 eeproms under 2 I2C addresses:

1. a standard 1Mbit eeprom (driver model 24c1024 is working)

2. a 256 Byte "ID page" that is a write lockable page.
   As the ID page demands 2 byte addresses, the 24c02 driver model
   can not be used.

I was thinking about not to pollute the name space of chip names
with a made up name that is not the name of a real chip.

I would propose to name it "24cb02", thus making clear
that we have a kind of 24c02 but with 2 byte address.
(The "b" ist meant to say this)

Signed-off-by: Johannes Poehlmann <Johannes.Poehlmann@xxxxxxxxxxx>
---
 drivers/misc/eeprom/at24.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 4d63ac8..debc8e3 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -139,6 +139,7 @@ static const struct i2c_device_id at24_ids[] = {
 	{ "24cs01",	AT24_DEVICE_MAGIC(16,
 				AT24_FLAG_SERIAL | AT24_FLAG_READONLY) },
 	{ "24c02",	AT24_DEVICE_MAGIC(2048 / 8,	0) },
+	{ "24cb02",	AT24_DEVICE_MAGIC(2048 / 8,	AT24_FLAG_ADDR16) },
 	{ "24cs02",	AT24_DEVICE_MAGIC(16,
 				AT24_FLAG_SERIAL | AT24_FLAG_READONLY) },
 	{ "24mac402",	AT24_DEVICE_MAGIC(48 / 8,
-- 
2.1.4




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux