]> git.dujemihanovic.xyz Git - u-boot.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)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 May 2015 14:51:52 +0000 (16:51 +0200)
commit4f7e01c9615e6f0b21e00c2a0900b2db2b23b4fc
tree38b81953cf6e632651943dd3087b0be2f3aa918d
parent1572819c5fb4c7f8596c973555211b37847fdf5d
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