]> git.sur5r.net Git - u-boot/commit
dm: gpio: add a default gpio xlate routine
authorEric Nelson <eric@nelint.com>
Sun, 24 Apr 2016 23:32:40 +0000 (16:32 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 17 May 2016 15:54:43 +0000 (09:54 -0600)
commit6c880b7719d73dc4bf4bf828b6341e086e6f5eb6
tree986f58750ecdee418484d05add68300556df3e1c
parentc0c62d923344d5a68f43259282e68a827318db01
dm: gpio: add a default gpio xlate routine

Many drivers use a common form of offset + flags for device
tree nodes. e.g.:
<&gpio1 2 GPIO_ACTIVE_LOW>

This patch adds a common implementation of this type of parsing
and calls it when a gpio driver doesn't supply its' own xlate
routine.

This will allow removal of the driver-specific versions in a
handful of drivers and simplify the addition of new drivers.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/gpio/gpio-uclass.c
include/asm-generic/gpio.h