Skip to content

Commit 3774740

Browse files
tq-steinaBartosz Golaszewski
authored andcommitted
eeprom: at24: add ST M24C64-D Additional Write lockable page support
The ST M24C64-D behaves as a regular M24C64, 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 M24C64 area separately as that is on separate I2C address from this page. Signed-off-by: Alexander Stein <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 0997ff1 commit 3774740

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
@@ -196,6 +196,8 @@ AT24_CHIP_DATA(at24_data_24c32d_wlp, 32, AT24_FLAG_ADDR16);
196196
AT24_CHIP_DATA(at24_data_24cs32, 16,
197197
AT24_FLAG_ADDR16 | AT24_FLAG_SERIAL | AT24_FLAG_READONLY);
198198
AT24_CHIP_DATA(at24_data_24c64, 65536 / 8, AT24_FLAG_ADDR16);
199+
/* M24C64-D Additional Write lockable page (M24C64-D order codes) */
200+
AT24_CHIP_DATA(at24_data_24c64d_wlp, 32, AT24_FLAG_ADDR16);
199201
AT24_CHIP_DATA(at24_data_24cs64, 16,
200202
AT24_FLAG_ADDR16 | AT24_FLAG_SERIAL | AT24_FLAG_READONLY);
201203
AT24_CHIP_DATA(at24_data_24c128, 131072 / 8, AT24_FLAG_ADDR16);
@@ -227,6 +229,7 @@ static const struct i2c_device_id at24_ids[] = {
227229
{ "24c32d-wl", (kernel_ulong_t)&at24_data_24c32d_wlp },
228230
{ "24cs32", (kernel_ulong_t)&at24_data_24cs32 },
229231
{ "24c64", (kernel_ulong_t)&at24_data_24c64 },
232+
{ "24c64-wl", (kernel_ulong_t)&at24_data_24c64d_wlp },
230233
{ "24cs64", (kernel_ulong_t)&at24_data_24cs64 },
231234
{ "24c128", (kernel_ulong_t)&at24_data_24c128 },
232235
{ "24c256", (kernel_ulong_t)&at24_data_24c256 },
@@ -258,6 +261,7 @@ static const struct of_device_id at24_of_match[] = {
258261
{ .compatible = "atmel,24c32d-wl", .data = &at24_data_24c32d_wlp },
259262
{ .compatible = "atmel,24cs32", .data = &at24_data_24cs32 },
260263
{ .compatible = "atmel,24c64", .data = &at24_data_24c64 },
264+
{ .compatible = "atmel,24c64d-wl", .data = &at24_data_24c64d_wlp },
261265
{ .compatible = "atmel,24cs64", .data = &at24_data_24cs64 },
262266
{ .compatible = "atmel,24c128", .data = &at24_data_24c128 },
263267
{ .compatible = "atmel,24c256", .data = &at24_data_24c256 },

0 commit comments

Comments
 (0)