All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: Ben_Pai@wistron.com
Cc: openbmc@lists.ozlabs.org, Claire_Ku@wistron.com,
	wangat@tw.ibm.com, bradleyb@fuzziesquirrel.com
Subject: Re: phosphor-bittware repository
Date: Tue, 19 May 2020 10:44:55 -0500	[thread overview]
Message-ID: <20200519154455.GK1166713@heinlein> (raw)
In-Reply-To: <5c119dd93cff41c993e0a16a3717f5a4@wistron.com>

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

On Tue, May 19, 2020 at 06:47:48AM +0000, Ben_Pai@wistron.com wrote:
> Because the 250-soc card needs to adjust the io expander to get the relevant information (e.g. temperature, VPD ...).

Is this IO expander on the i2c bus itself, like a mux or hub, or is it
some specialized register set to switch between logic banks?  In either
case though, I don't know why you couldn't create a kernel driver for
controlling access to the various logic blocks.  If it is like an
i2c-mux, there is a number of implementations of that in the kernel
already.

> I think a dynamic detection function may be needed to handle the presence of the card and dynamically adjust the io expander.

I'm not sure what you mean by "dynamic detection function" here.  If you
just mean detecting the presence of the card by a GPIO or i2c probe
call, entity-manager can handle some of that for you, I believe.  You
don't need to put the card into the device tree directly, but you could
instead do some kind of probe call to ensure the device is present and
then manually 'bind' the i2c address to a kernel driver.  Entity-manager
already supports doing this.

> On the other hand, I just want to be able to integrate all the functions.

I think you're going to end up duplicating a lot of code that already exists
in the kernel this way and that is why I'm trying to steer you away from
it.  Just as a simple example on the sensors, we have two
implementations that can already consume Linux-hwmon data and give you
the dbus objects "for free".  If you go the direction of putting it all
in userspace, you're going to have to implement all the i2c activity,
hwmon-like polling, and dbus objects all yourself.  This isn't a trivial
amount of code.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-05-19 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19  6:47 phosphor-bittware repository Ben_Pai
2020-05-19 15:44 ` Patrick Williams [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-12  9:09 Ben_Pai
2020-05-12 12:20 ` Patrick Williams
2020-05-07  6:07 Ben_Pai
2020-05-11 13:05 ` Patrick Williams

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=20200519154455.GK1166713@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=Ben_Pai@wistron.com \
    --cc=Claire_Ku@wistron.com \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=wangat@tw.ibm.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.