All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: "Wang, Kuiying" <kuiying.wang@intel.com>,
	Andrew Geissler <geissonator@gmail.com>,
	Joel Stanley <joel@jms.id.au>
Cc: Brad Bishop <bradleyb@fuzziesquirrel.com>,
	Andrew Geissler <geissonator@yahoo.com>,
	chunhui.jia@linux.intel.com, kunyi731@gmail.com, "Mihm,
	James" <james.mihm@intel.com>, "Tanous, Ed" <ed.tanous@intel.com>,
	"Feist, James" <james.feist@intel.com>,
	"Jia, Chunhui" <chunhui.jia@intel.com>,
	Patrick Venture <venture@google.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	"Li, Yong B" <yong.b.li@intel.com>,
	"Yang, Cheng C" <cheng.c.yang@intel.com>,
	"Xu, Qiang" <qiang.xu@intel.com>,
	"Nguyen, Hai V" <hai.v.nguyen@intel.com>
Subject: Re: [PATCH linux dev-4.18] ASPEED: dts: Define the gpio-line-names property for aspeed-g5
Date: Tue, 11 Sep 2018 10:58:47 +0930	[thread overview]
Message-ID: <1536629327.3454887.1503645880.7FE96DC2@webmail.messagingengine.com> (raw)
In-Reply-To: <959CAFA1E282D14FB901BE9A7BF4E77249E0F323@shsmsx102.ccr.corp.intel.com>

On Mon, 10 Sep 2018, at 17:26, Wang, Kuiying wrote:
> Hi Andrew J,
> This is just common definition for aspeed-g5.
> There will be different configuration for specified platform just like 
> following:
> https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-intel/+/12178/1/meta-intel/meta-s2600wf/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json 

Are you doing a string match on the pin name from the structures returned by ioctls on the gpiochip's chardev? This won't work if someone decides to specify the semantic name of the line in the devicetree like I linked to in my previous reply. Your best bet is to map the pin name from the JSON to the pin index on the gpiochip. Doing it any other way is fragile.

Andrew

      reply	other threads:[~2018-09-11  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10  7:27 [PATCH linux dev-4.18] ASPEED: dts: Define the gpio-line-names property for aspeed-g5 Wang, Kuiying
2018-09-10  7:36 ` Andrew Jeffery
2018-09-10  7:56   ` Wang, Kuiying
2018-09-11  1:28     ` Andrew Jeffery [this message]

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=1536629327.3454887.1503645880.7FE96DC2@webmail.messagingengine.com \
    --to=andrew@aj.id.au \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=cheng.c.yang@intel.com \
    --cc=chunhui.jia@intel.com \
    --cc=chunhui.jia@linux.intel.com \
    --cc=ed.tanous@intel.com \
    --cc=geissonator@gmail.com \
    --cc=geissonator@yahoo.com \
    --cc=hai.v.nguyen@intel.com \
    --cc=james.feist@intel.com \
    --cc=james.mihm@intel.com \
    --cc=joel@jms.id.au \
    --cc=kuiying.wang@intel.com \
    --cc=kunyi731@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=qiang.xu@intel.com \
    --cc=venture@google.com \
    --cc=yong.b.li@intel.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.