All of lore.kernel.org
 help / color / mirror / Atom feed
* How to handle GPIO differences between P8 and P9
@ 2016-11-04 16:45 Mine
  2016-11-07  4:06 ` Patrick Williams
  0 siblings, 1 reply; 10+ messages in thread
From: Mine @ 2016-11-04 16:45 UTC (permalink / raw)
  To: OpenBMC Maillist

Hi All,

This mail is to discuss how to handle GPIO differences (e.g.
functionality, IN/OUT) between different HWs.

I went into a case the P8 uses two GPIOs, but P9 does not use them: in
skeleton/op-hostctl/control_host_obj.c:

GPIO Throttle = (GPIO){ "BMC_THROTTLE" };
GPIO idbtn = (GPIO){ "IDBTN" };
...
rc |= gpio_write(&Throttle,1);
rc |= gpio_write(&idbtn,0);

In P9, BMC_THROTTLE is renamed to N_MODE_N, and changed to an IN GPIO;
IDBTN is changed to IN GPIO as well.
If we keep the above code and overriding the GPIOs, writing
BMC_THROTTLE takes no effect, but writing to IDBTN may break the
function of its related front panel button.

So I think we need to distinguish such cases to avoid issues.

The question is, how to change the code to support different HWs that
have unique GPIOs?

Thanks!

—
BRs,
Lei YU

^ permalink raw reply	[flat|nested] 10+ messages in thread
* How to handle GPIO differences between P8 and P9
@ 2016-11-04 16:38 Lei KM Yu
  0 siblings, 0 replies; 10+ messages in thread
From: Lei KM Yu @ 2016-11-04 16:38 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/html, Size: 7885 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-09  1:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 16:45 How to handle GPIO differences between P8 and P9 Mine
2016-11-07  4:06 ` Patrick Williams
2016-11-07  9:10   ` Yi TZ Li
2016-11-07 16:19     ` Patrick Williams
2016-11-07 17:01       ` Mine
2016-11-07 21:53         ` Xo Wang
2016-11-08 21:13           ` Mine
2016-11-08 23:38             ` Xo Wang
2016-11-09  1:34               ` Andrew Jeffery
  -- strict thread matches above, loose matches on Subject: below --
2016-11-04 16:38 Lei KM Yu

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.