Skip to content

Commit 4791146

Browse files
Marek VasutBartosz Golaszewski
authored andcommitted
eeprom: at24: add ST M24C32-D Additional Write lockable page support
The ST M24C32-D behaves as a regular M24C32, except for the -D variant which uses up another I2C address for Additional Write lockable page. This page is 32 Bytes long and can contain additional data. Add entry for it, so users can describe that page in DT. Note that users still have to describe the main M24C32 area separately as that is on separate I2C address from this page. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent c761068 commit 4791146

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/misc/eeprom/at24.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ AT24_CHIP_DATA(at24_data_24c16, 16384 / 8, 0);
191191
AT24_CHIP_DATA(at24_data_24cs16, 16,
192192
AT24_FLAG_SERIAL | AT24_FLAG_READONLY);
193193
AT24_CHIP_DATA(at24_data_24c32, 32768 / 8, AT24_FLAG_ADDR16);
194+
/* M24C32-D Additional Write lockable page (M24C32-D order codes) */
195+
AT24_CHIP_DATA(at24_data_24c32d_wlp, 32, AT24_FLAG_ADDR16);
194196
AT24_CHIP_DATA(at24_data_24cs32, 16,
195197
AT24_FLAG_ADDR16 | AT24_FLAG_SERIAL | AT24_FLAG_READONLY);
196198
AT24_CHIP_DATA(at24_data_24c64, 65536 / 8, AT24_FLAG_ADDR16);
@@ -222,6 +224,7 @@ static const struct i2c_device_id at24_ids[] = {
222224
{ "24c16", (kernel_ulong_t)&at24_data_24c16 },
223225
{ "24cs16", (kernel_ulong_t)&at24_data_24cs16 },
224226
{ "24c32", (kernel_ulong_t)&at24_data_24c32 },
227+
{ "24c32d-wl", (kernel_ulong_t)&at24_data_24c32d_wlp },
225228
{ "24cs32", (kernel_ulong_t)&at24_data_24cs32 },
226229
{ "24c64", (kernel_ulong_t)&at24_data_24c64 },
227230
{ "24cs64", (kernel_ulong_t)&at24_data_24cs64 },
@@ -252,6 +255,7 @@ static const struct of_device_id at24_of_match[] = {
252255
{ .compatible = "atmel,24c16", .data = &at24_data_24c16 },
253256
{ .compatible = "atmel,24cs16", .data = &at24_data_24cs16 },
254257
{ .compatible = "atmel,24c32", .data = &at24_data_24c32 },
258+
{ .compatible = "atmel,24c32d-wl", .data = &at24_data_24c32d_wlp },
255259
{ .compatible = "atmel,24cs32", .data = &at24_data_24cs32 },
256260
{ .compatible = "atmel,24c64", .data = &at24_data_24c64 },
257261
{ .compatible = "atmel,24cs64", .data = &at24_data_24cs64 },

0 commit comments

Comments
 (0)