* Re: [PATCH] i2c: slave-eeprom: Make it possible to pre-load eeprom data
[not found] <1567781706-2191-1-git-send-email-bjorn.ardo@axis.com>
@ 2020-04-20 16:43 ` Wolfram Sang
0 siblings, 0 replies; only message in thread
From: Wolfram Sang @ 2020-04-20 16:43 UTC (permalink / raw)
To: Björn Ardö; +Cc: linux-i2c, Björn Ardö
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
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@axis.com>
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-20 16:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1567781706-2191-1-git-send-email-bjorn.ardo@axis.com>
2020-04-20 16:43 ` [PATCH] i2c: slave-eeprom: Make it possible to pre-load eeprom data Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).