ARM: ux500: select I2C for U8500
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CACRpkdbGAhwdxE6tYdib0Aiw=9qScmV507npzDU1hkH1xXgxRQ@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 6/6 ARM: ux500: select I2C for U8500
Quoted 33 lines · Arnd Bergmann
Quoted 25 lines · Linus Walleij
Quoted 16 lines · On Sat, Feb 25, 2012 at 8:48 PM, ?<[email protected]> wrote:
From: Arnd Bergmann <[email protected]>
The U8500 platform selects the TPS6105X, so also select the I2C layer that this driver depends on.
Signed-off-by Arnd Bergmann <[email protected]>Signed-off-by Mathieu Poirier <[email protected]>---
?arch/arm/mach-ux500/Kconfig | ? ?1 +
?1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/mach-ux500/Kconfig +0
-0@@ -29,6 +29,7 @@ config MACH_U8500Quoted 4 lines
? ? ? ?select
UX500_SOC_DB8500
? ? ? ?select TPS6105X
? ? ? ?selectSOC_BUS
+ ? ? ? select I2CAcked-by Linus Walleij <[email protected]>Quoted 2 lines
But should it not also select
I2C_NOMADIK, which is surely required too.That's a different question: I2C is needed to build the kernel successfully, while
I2C_NOMADIKis (probably) needed to actually run on a given hardware.
Quoted 6 lines
We normally don't prevent people from selecting silly combinations of config options, but we do try to make sure that any random configuration actually builds.
Maybe the answer is instead to remove the 'select TPS6105X' and make sure the platform actually builds without I2C
Oh yeah wait that's the proper solution. Instead I get to update the defconfig to include necessary drivers.
I'll post a patch for this instead.
Thanks,
Linus Walleij
PATCH 6/6 ARM: ux500: select I2C for U8500
Quoted 8 lines · Linus Walleij
Quoted 8 lines
That's a different question: I2C is needed to build the kernel successfully, while
I2C_NOMADIKis (probably) needed to actually run on a given hardware.We normally don't prevent people from selecting silly combinations of config options, but we do try to make sure that any random configuration actually builds.
Quoted 7 lines
Quoted 2 lines
Maybe the answer is instead to remove the 'select TPS6105X' and make sure the platform actually builds without I2C
Oh yeah wait that's the proper solution. Instead I get to update the defconfig to include necessary drivers.
I'll post a patch for this instead.
Ok, great!
I got one more build error when actually disabling CONFIG_I2C on ux500:
arnd at klappe2:~/linux-arm$ make O=obj-arm/ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -s -j3 -k /git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c: In function 'mop500_uib_i2c_add':
/git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c:74:2: error: implicit declaration of function 'i2c_get_adapter' [-Werror=implicit-function-declaration] /git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c:81:3: error: implicit declaration of function 'i2c_new_device' [-Werror=implicit-function-declaration] /git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c:121:2: error: implicit declaration of function 'i2c_smbus_xfer' [-Werror=implicit-function-declaration]
I guess those need to be fixed, too. Ideally the API could just get stubbed out for !CONFIG_I2C, but it might be easier to conditionally build the code using it.
Arnd
PATCH 6/6 ARM: ux500: select I2C for U8500
Quoted 11 lines · Arnd Bergmann
I got one more build error when actually disabling
CONFIG_I2Con ux500:arnd at klappe2:~/linux-arm$ make O=obj-arm/ ?ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -s ?-j3 -k /git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c: In function '
mop500_uib_i2c_add':
/git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c:74:2: error: implicit declaration of function 'i2c_get_adapter' [-Werror=implicit-function-declaration] /git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c:81:3: error: implicit declaration of function 'i2c_new_device' [-Werror=implicit-function-declaration] /git/arnd/linux-arm/arch/arm/mach-ux500/board-mop500-uib.c:121:2: error: implicit declaration of function 'i2c_smbus_xfer' [-Werror=implicit-function-declaration]I guess those need to be fixed, too. Ideally the API could just get stubbed out for !CONFIG_I2C, but it might be easier to conditionally build the code using it.
Hm in this case it's the code probing the board using I2C to figure out if it's this or that variant.
So selecting this board needs to select I2C and I2C_NOMADIK to work properly, I'll see if I can reproduce and think of something.
Yours,
Linus Walleij