All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henbin Chang <henbinchang@gmail.com>
To: Vijay Khemka <vijaykhemka@fb.com>
Cc: James Feist <james.feist@linux.intel.com>,
	 OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Some problems about FruDevice in the entity-manager
Date: Mon, 25 Mar 2019 09:39:15 +0800	[thread overview]
Message-ID: <CAG9c7cAHLdfqDMjWRnqbpw=VcA5zX96Sx2tqJ5TOMw9mKU7X=w@mail.gmail.com> (raw)
In-Reply-To: <740E00DF-F233-41A1-B894-9DB98A9AD62A@fb.com>

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

Thanks for your response.

I also encountered another problem.

That's,  I found the content of 16-bit EEPROM through the combination of
the SMBUS APIs was not incorrect.

    /* This is for 16 bit addressing EEPROM device. First an offset
     * needs to be written before read data from a offset
     */
    int ret = i2c_smbus_write_byte_data(file, 0, low_addr);
    if (ret < 0)
    {
        return ret;
    }

    return i2c_smbus_read_i2c_block_data(file, high_addr, len, buf);

So I referred to i2c-tools to modify them.
And then I could see my FRU under the tree of
'xyz/openbmc_project/FruDevice/'

    int ret = i2c_smbus_write_byte_data(file, high_addr, low_addr);
    //int ret = i2c_smbus_write_byte_data(file, 0, low_addr);
    if (ret < 0)
    {
        return ret;
    }
    while (index < len){
buf[index] = i2c_smbus_read_byte(file);
index++;
    }

    //return i2c_smbus_read_i2c_block_data(file, high_addr, len, buf);
    return len;

Let me know if you have any comments.

Thanks.

[-- Attachment #2: Type: text/html, Size: 1652 bytes --]

  reply	other threads:[~2019-03-25  1:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  5:41 Some problems about FruDevice in the entity-manager Henbin Chang
2019-03-22 15:54 ` James Feist
2019-03-22 18:10   ` Vijay Khemka
2019-03-25  1:39     ` Henbin Chang [this message]
2019-03-25 23:05       ` Vijay Khemka
2019-03-26  1:01         ` Henbin Chang
2019-03-26 18:44           ` Vijay Khemka
2019-03-27  6:33             ` Henbin Chang
2019-03-27 18:49               ` Vijay Khemka
2019-03-29 18:14                 ` Vijay Khemka

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='CAG9c7cAHLdfqDMjWRnqbpw=VcA5zX96Sx2tqJ5TOMw9mKU7X=w@mail.gmail.com' \
    --to=henbinchang@gmail.com \
    --cc=james.feist@linux.intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=vijaykhemka@fb.com \
    /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.