]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: max732x: Add missing dev reference to gpiochip
authorMarek Vasut <marex@denx.de>
Tue, 30 Jun 2015 18:04:18 +0000 (20:04 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Jul 2015 11:42:46 +0000 (13:42 +0200)
commit038c2e98746d0831e89f8a580454fd176bd6be2f
treedcbd398e4baea67b365a06628cf3e62d02c78946
parente212e01bd13a4d0253a1ebf26557cc44da5e61f9
gpio: max732x: Add missing dev reference to gpiochip

In case the gpiochip doesn't have the .dev field set, as is the case
in here, it is not possible to reference this device in DT as a GPIO
controller. A good example of this problem is that gpio-leds can not
be used when connected to this chip, the gpio-leds driver bails out
with -EPROBE_DEFER.

Fix this problem by setting the .dev field of the gpio_chip to the
parent i2c device.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mans Rullgard <mans@mansr.com>
Cc: Olaf Mandel <o.mandel@menlosystems.com>
Cc: Semen Protsenko <semen.protsenko@globallogic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max732x.c