From: Shawn McCarney <shawnmm@linux.ibm.com>
To: Mike Jones <proclivis@gmail.com>
Cc: openbmc@lists.ozlabs.org
Subject: Re: No dbus objects for phosphor-regulators
Date: Fri, 11 Feb 2022 10:06:18 -0600 [thread overview]
Message-ID: <5d8e7a32-667e-be32-3c01-160e5bd6b4a1@linux.ibm.com> (raw)
In-Reply-To: <DCAD9B4C-D047-40A0-B4AD-1D21C0CF6197@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2914 bytes --]
On 2/11/2022 9:42 AM, Mike Jones wrote:
> Shawn, I was mainly surprised because a conversation I had with
> Guenter, if I remember correctly, suggested that /dev/i2c calls from
> user space work with hwmon, because hwmon does not lock the i2c except
> when using it. So I assumed that in this
> I was mainly surprised because a conversation I had with Guenter, if I
> remember correctly, suggested that /dev/i2c calls from user space work
> with hwmon, because hwmon does not lock the i2c except when using it.
>
> So I assumed that in this case, it was the polling of hwmon that was
> just keeping it locked enough to conflict with phosphor-regulators and
> then it gives up.
With i2c-dev, you can specify I2C_SLAVE or I2C_SLAVE_FORCE when creating
the connection. I believe I2C_SLAVE will cause communication attempts
to fail if a driver is bound. I2C_SLAVE_FORCE will still try to communicate.
I wanted to take the more conservative approach, because there are
scenarios where interleaving communication can cause serious problems.
For example, if one PMBus regulator supports multiple rails, you have to
set the PMBus PAGE register to the rail you are interested in.
Subsequent PMBus commands will affect that rail. If phosphor-regulators
and a driver are both communicating with the regulator, they may both be
setting PAGE and thus their subsequent commands are going to the wrong rail.
>
> I could just not use hwmon at all use phosphor-regulators for all
> telemetry, but this seemed like more work.
>
Sorry about that. I think if you have already done the work of defining
the regulator and a read sensors rule in your JSON file, adding a few
more sensors is not much additional work though. Let me know if you
have questions.
> Also, I will need to figure out how to connect phosphor-regulators
> telemetry to Redfish and the WebUI. Are there examples of how to do that?
It should just work with no additional effort as long as you define the
following correctly in your JSON file:
* The "inventory_path" property of your "chassis" object needs to match
a real chassis inventory item on D-Bus.
* The "fru" property of your regulator "device" object needs to match a
real inventory item on D-Bus. As I mentioned earlier, normally if the
regulator is pluggable then this is the regulator itself. Otherwise it
is the larger hardware item that contains it, such as a motherboard.
FRU is the acronym for Field Replaceable Unit, referring to a pluggable
hardware item.
phosphor-regulators will publish your sensors on D-Bus with the standard
object paths and properties. The two JSON properties above are used to
define a "chassis" association and an "inventory_item" association on
D-Bus that is used by bmcweb. This will cause your sensors to appear in
Redfish and the Web UI.
Thanks,
Shawn
[-- Attachment #2: Type: text/html, Size: 3760 bytes --]
next prev parent reply other threads:[~2022-02-11 16:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 22:25 No dbus objects for phosphor-regulators Mike
2022-02-01 17:37 ` Shawn McCarney
2022-02-09 22:30 ` Mike Jones
2022-02-11 15:32 ` Shawn McCarney
2022-02-11 15:42 ` Mike Jones
2022-02-11 16:06 ` Shawn McCarney [this message]
2022-02-11 20:20 ` Ed Tanous
2022-02-11 22:56 ` Mike Jones
2022-02-11 20:53 ` Patrick Williams
-- strict thread matches above, loose matches on Subject: below --
2022-01-25 22:15 Mike Jones
2022-01-26 22:43 ` Shawn McCarney
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=5d8e7a32-667e-be32-3c01-160e5bd6b4a1@linux.ibm.com \
--to=shawnmm@linux.ibm.com \
--cc=openbmc@lists.ozlabs.org \
--cc=proclivis@gmail.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.