gpio: pca953x: Get platform_data from OpenFirmware
gpio: pca953x: Get platform_data from OpenFirmware

On OpenFirmware platforms, it makes the most sense to get platform_data
from the device tree.  Make an attempt to translate OF node properties
into platform_data struct before bailing out.

Note that the implementation approach taken differs from other device
drivers that make use of device tree information.  This is because I2C
chips are already registered automatically by of_i2c, so we can get by
with a small translator function in the driver.

[5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org: coding-style fixes]
[5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org: kfree(NULL) is legal]
Signed-off-by: Nate Case <0b11fd8446c043cbe4f060d4af4c26ce1807eeaf@xes-inc.com>
Cc: David Brownell <e543181633fc0fc2787945ef377537d9112d0c96@pacbell.net>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas