All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: "Björn Ardö" <bjorn.ardo@axis.com>
Cc: linux-i2c@vger.kernel.org, "Björn Ardö" <bjornar@axis.com>
Subject: Re: [PATCH] i2c: slave-eeprom: Make it possible to pre-load eeprom data
Date: Mon, 20 Apr 2020 18:43:32 +0200	[thread overview]
Message-ID: <20200420164332.GC3721@ninjato> (raw)
In-Reply-To: <1567781706-2191-1-git-send-email-bjorn.ardo@axis.com>

[-- 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 --]

           reply	other threads:[~2020-04-20 16:43 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1567781706-2191-1-git-send-email-bjorn.ardo@axis.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420164332.GC3721@ninjato \
    --to=wsa@the-dreams.de \
    --cc=bjorn.ardo@axis.com \
    --cc=bjornar@axis.com \
    --cc=linux-i2c@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.