]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: shmobile: fix regulator quirk for Gen2
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 30 Aug 2016 19:50:22 +0000 (21:50 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 2 Sep 2016 08:15:38 +0000 (10:15 +0200)
commit53434b634939a82e50f615c3392bd3006a4bb165
tree1f6d28ba15d1048c5123da49d9e93e2d53266a9d
parentb482605f7939bd4035b2d11a7952dc3da5821c6d
ARM: shmobile: fix regulator quirk for Gen2

The current implementation only works if the da9xxx devices are added
before their drivers are registered. Only then it can apply the fixes to
both devices. Otherwise, the driver for the first device gets probed
before the fix for the second device can be applied. This is what
fails when using the IP core switcher or when having the i2c master
driver as a module.

So, we need to disable both da9xxx once we detected one of them. We now
use i2c_transfer with hardcoded i2c_messages and device addresses, so we
don't need the da9xxx client devices to be instantiated. Because the
fixup is used on specific boards only, the addresses are not going to
change.

Fixes: 7ffcd6ddc6987a ("ARM: shmobile: R-Car Gen2: Add da9063/da9210 regulator quirk")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> (r8a7791/koelsch)
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c