]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
dm: gpio: Add a function to read an ID from a list of GPIOs
authorSimon Glass <sjg@chromium.org>
Tue, 11 Nov 2014 01:00:21 +0000 (18:00 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 21 Nov 2014 06:24:11 +0000 (07:24 +0100)
commite5901c94e32b3533c35511d1acfb7f1587e324ee
tree6dc5d86c7f55b0ac45e60bb3b019ceec02db59ec
parent469a579df2907a421afec06e37d50e61b7d80227
dm: gpio: Add a function to read an ID from a list of GPIOs

For board IDs a common approach is to set aside several GPIOs for use in
determining the board ID. This can provide information about board features
and the revision.

Add a function that turns a list of GPIOs into an integer by assigning
each GPIO to a single bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/gpio/gpio-uclass.c
include/asm-generic/gpio.h