Re: [PATCH] i2c: slave-eeprom: Make it possible to pre-load eeprom data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 06, 2019 at 04:55:06PM +0200, Björn Ardö wrote:
> If the slave eeprom has a "firmware-name" in devicetree, then
> pre-load the data in the eeprom with this file.
> 
> Signed-off-by: Björn Ardö <bjorn.ardo@xxxxxxxx>

Sorry that it got postponed so many times :(

> +static int i2c_slave_preload_eeprom_data(struct eeprom_data *eeprom, struct i2c_client *client, unsigned int size)

I totally agree with merging the patch "i2c: slave-eeprom: initialize
empty eeprom properly" [1] into this one, so we get proper memory init
at the end of this function. It should be renamed to
"i2c_slave_init_eeprom_data" then, probably...

> +{
> +	if (client->dev.of_node) {
> +		const struct firmware *fw;
> +		const char *eeprom_data;
> +		if (!of_property_read_string(client->dev.of_node, "firmware-name", &eeprom_data)) {

Can you switch to device_property_read_string() and friends? I think the
ACPI world may also be interested in this feature.

All the rest looks good, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux