[PATCH v2 3/3] bootcount: Add driver model I2C driver

Heiko Schocher hs at denx.de
Mon Oct 30 06:17:23 CET 2023


Hello Philip,

On 26.10.23 05:44, Heiko Schocher wrote:
> Hello Philip,
> 
> On 20.10.23 11:02, 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 at denx.de>
>> ---
>>
>> 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 | 103 +++++++++++++++++++++++++++
>>  3 files changed, 114 insertions(+)
>>  create mode 100644 drivers/bootcount/bootcount_dm_i2c.c
> 
> Reviewed-by: Heiko Schocher <hs at denx.de>

Your patch drops an checkpatch error:
"""
ERROR: Do not add common.h to files
#164: FILE: drivers/bootcount/bootcount_dm_i2c.c:10:
+#include <common.h>
"""

Could you please check and fix?

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list