i2c: target: eeprom_target: add address_width parameter

Add a parameter to allow the configuration of the number of address
bytes used by the I2C master. This allows the driver to expose larger
buffer sizes.

Tested with standard linux at24 driver.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
This commit is contained in:
Bram Vlerick 2024-04-11 11:30:13 +02:00 committed by Carles Cufí
commit 935e8c4b13
2 changed files with 23 additions and 7 deletions

View file

@ -5,3 +5,11 @@ description: Zephyr I2C target EEPROM
compatible: "zephyr,i2c-target-eeprom"
include: ["eeprom-base.yaml", i2c-device.yaml]
properties:
address-width:
type: int
enum: [8, 16]
description: |
Number of address bits used to address the EEPROM. If not specified
the EEPROM is assumed to have a 8-bit address.