i2c: pca-platform: correctly set algo_data.reset_chip
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Fri, 30 Jun 2017 00:54:04 +0000 (12:54 +1200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 4 Jul 2017 14:02:20 +0000 (16:02 +0200)
commit2ec4d8831b9644a080302ce10868afff8d135fc3
treecdde50fd34ae550c710e279e1efac88f55029ea8
parent3a4991a9864cb6b98bb9c7cf47854ffe2a79805a
i2c: pca-platform: correctly set algo_data.reset_chip

When device tree support was added the setting of algo_data.reset_chip
was moved. There were two problems with this. The first being that
i2c_pca_pf_resetchip was only used if platform data was provided. The
second that it was unconditionally overridden with
i2c_pca_pf_dummyreset. Ensure that however the reset gpio is defined the
correct reset_chip function is used.

Fixes: commit 4cc7229daa46 ("i2c: pca-platform: switch to struct gpio_desc")
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-pca-platform.c