diff options
author | Mario Six <mario.six@gdsys.cc> | 2018-03-01 16:45:04 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-03-05 18:06:05 +0300 |
commit | 1e5f89881af7054c1a30991a922a8ed609a4c050 (patch) | |
tree | 2db522ad229299c0bbe0467c59a7953121849c0d /tools | |
parent | b432b1ebdf3422caa3b714ef5a417a4e8864fad6 (diff) | |
download | u-boot-1e5f89881af7054c1a30991a922a8ed609a4c050.tar.xz |
gpio: pca953x_gpio: Support label setting from DT
The PCA953x driver uses "gpio@%x_" as the GPIO bank name, where "%x" is
instantiated with the I2C address of the chip. While this works, it
becomes very confusing if a board has multiple PCAs with the same
address on different I2C busses, and it also becomes an issue when a
GPIO's value is to be set via the 'gpio' command, because this command
only ever sets the value of the first device it encounters, leaving the
other devices inaccessible to the command.
As to not break boards that rely on this naming scheme, we introduce a
new device tree string property "label" for the driver. If it exists, it
is used to build a bank name of the form "%s@%x_" (where %x is still
instantiated with the I2C address). If it does not exist, the legacy
labeling scheme is used.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions