[PATCH linux dev-4.18] ASPEED: dts: Define the gpio-line-names property for aspeed-g5

Andrew Jeffery andrew at aj.id.au
Tue Sep 11 11:28:47 AEST 2018

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.


More information about the openbmc mailing list