]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
sunxi: soft-i2c: Fix gpio handling to work with the driver-model
authorHans de Goede <hdegoede@redhat.com>
Thu, 23 Apr 2015 21:23:50 +0000 (23:23 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:35:19 +0000 (22:35 +0200)
commit5ee4098968a1096be20fb2645eaf1004fbe5f8f3
tree85e1e3a8d4b50b28c4d2cce7b4f474853f28deaf
parent77990dd4f381c8098046e2d278476648a205371e
sunxi: soft-i2c: Fix gpio handling to work with the driver-model

i2c_init_board() gets called before the driver-model (gpio) code is
initialized, so move the setup of the soft-i2c pins out of i2c_init_board()
and into board_init(), at which time the driver-model setup has been done.

Also add proper error checking and properly request the gpios as that is
mandatory with the driver-model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
board/sunxi/board.c