All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Bishop <bradleyb@fuzziesquirrel.com>
To: Patrick Venture <venture@google.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: GPIO Centralized Control Daemon
Date: Sun, 17 Sep 2017 13:33:54 -0400	[thread overview]
Message-ID: <1505669634.29751.4.camel@fuzziesquirrel.com> (raw)
In-Reply-To: <CAO=notzg_QhapqfOx2w75A9Z7K4S3etp7i4a1LSS-qkWb5BMHw@mail.gmail.com>


> > 
> > What do you think of this?
> > 
> > 1 - You simply wiggle the gpio from a script or small application
> > at
> >       the appropriate time.
> 
> My thought here is -- the appropriate time is, right before phosphor-
> hwmon wants to read it.

phosphor-hwmon shouldn't be providing an interface for something
that isn't accessible.  And it shouldn't concern itself with
making something accessible because there could be any number of
ways to do that, based on the wiring of the board.

What I meant was why is the sensor gated by a gpio?  For example, is it
because the sensor is only available when some power domain is actually
powered on?  In that example, the appropriate time would be when
the power domain is turned on and off.

Is it just stuck behind a gpio for no reason?  If that is the case, I
would think you just wiggle the gpio when the bmc boots.

>  
> > 2 - An application other than phosphor-hwmon monitors this gpio and
> >       binds the driver to it (or unbinds).
> 
> In this case, won't the device be removed/added to the hwmon sysfs on
> demand?  I don't believe phosphor-hwmon picks up new devices
> automatically.

Yes, on demand, but he phosphor-layer has a udev rule that launches
(and terminates) a phosphor-hwmon instance along with it.

>  
> > 3 - phosphor-hwmon works without modification.
> > 
> > In fact, #2 is already done - Matt Spinler recently added code to
> > phosphor-gpio-monitor to do exactly this.
> 
> I haven't looked at gpio-monitor.
>  
> > I prefer something like this for two reasons:
> > 
> > 1 - Consistency in how we handle things.  It becomes easier to
> > write
> > howtos or cookbooks to provide guidance in the future. 
> 
>  
> > 2 - We avoid one-offs in phosphor-hwmon.
> 
> I wouldn't necessarily consider it a one-off, as I can immediately
> think of at least one other motherboard that would benefit from such
> an opportunity.  Also, in this case it would all fit into one nice
> package -- one thing to configure by adding the corresponding line to
> a configuration file.

I'm not arguing that there aren't several board setups where this is
the case.  Rather, board designers are free to do whatever they want,
and if we start putting the board specific logic in phosphor-hwmon you
won't have "one nice package" for very long....

  reply	other threads:[~2017-09-17 17:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 22:02 GPIO Centralized Control Daemon Patrick Venture
2017-09-14 22:29 ` Rick Altherr
2017-09-14 22:55   ` Patrick Venture
2017-09-16 22:12 ` Brad Bishop
2017-09-17  4:22   ` Patrick Venture
2017-09-17 16:26     ` Brad Bishop
2017-09-17 16:39       ` Patrick Venture
2017-09-17 17:33         ` Brad Bishop [this message]
2017-09-17 21:04           ` Patrick Venture
2017-09-17 21:38             ` Brad Bishop
2017-09-17 21:49               ` Patrick Venture
2017-09-17 22:10                 ` Brad Bishop
2017-09-18  7:32                 ` Andrew Jeffery
2017-09-18 14:52                   ` Patrick Venture
2017-09-18  7:07     ` Andrew Jeffery

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=1505669634.29751.4.camel@fuzziesquirrel.com \
    --to=bradleyb@fuzziesquirrel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=venture@google.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.