
Hello Philip,
On 31.10.23 08:38, Philip Richard Oberfichtner wrote:
This adds a generic I2C bootcounter adhering to driver model to replace the previously removed legacy implementation.
There is no change in functionality, it can be used on any I2C device. The device tree configuration may look like this for example:
bootcount { compatible = "u-boot,bootcount-i2c"; i2cbcdev = <&i2c_rtc>; offset = <0x11>; };
Signed-off-by: Philip Richard Oberfichtner pro@denx.de
Notes: Changes in v3: - Remove common.h #include
Changes in v2: - Adaption of Kconfig help message - Rename chip to bcdev - Adapt probe to use i2c_get_chip_by_phandle()
drivers/bootcount/Kconfig | 10 +++ drivers/bootcount/Makefile | 1 + drivers/bootcount/bootcount_dm_i2c.c | 102 +++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 drivers/bootcount/bootcount_dm_i2c.c
Reviewed-by: Heiko Schocher hs@denx.de
bye, Heiko