OSDN Git Service

gpio: syscon: retrive syscon node and regs offsets from dt
authorGrygorii Strashko <grygorii.strashko@ti.com>
Wed, 3 Sep 2014 17:05:33 +0000 (20:05 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Sep 2014 21:40:05 +0000 (14:40 -0700)
commit5a3e3f88b0a10f8b5baf224ebda5916195fb8745
tree1295a7f780877edd44cdb468763f4126ba0705d8
parent2c341d62eb4b697793c29da51fda64328df5ff59
gpio: syscon: retrive syscon node and regs offsets from dt

This patch adds handling of new "gpio,syscon-dev" DT property,
which allows to specify syscon node and data/direction registers
offsets in DT.

"gpio,syscon-dev" has following format:
gpio,syscon-dev = <&syscon_dev data_reg_offset [direction_reg_offset]>;

where
 - syscon_dev - phandle on syscon node
 - data_reg_offset - offset of data register (in bytes)
 - direction_reg_offset - offset of dirrection register (optional, in bytes)

for example:
gpio,syscon-dev = <&devctrl 0x254>;

In such way, the support of multiple Syscon GPIO devices is added.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-syscon.c