Input: TPS6507X - define MFD dependencies for touch and regulator unit
Subsystems (3)
PATCH 1/1 Input: TPS6507X - define MFD dependencies for touch and regulator unit
both touchscreen and regulator units are only working if mfd device is activated. So if mfd support is enabled, select TPS6507X mfd support automatically.
--- drivers/input/touchscreen/Kconfig | 3 ++- drivers/regulator/Kconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/input/touchscreen/Kconfig +2 -1
@@ -716,7 +716,8 @@ config TOUCHSCREEN_TPS6507X tristate "TPS6507x based touchscreens" - depends on I2C + depends on I2C && MFD_SUPPORT + select TPS6507X help Say Y here if you have a TPS6507x based touchscreen controller.
drivers/regulator/Kconfig +2 -1
@@ -242,7 +242,8 @@ config REGULATOR_TPS6507X tristate "TI TPS6507X Power regulators" - depends on I2C + depends on I2C && MFD_SUPPORT + select TPS6507X help This driver supports TPS6507X voltage regulator chips. TPS6507X provides three step-down converters and two general-purpose LDO voltage regulators.
Quoted 5 lines · Yegor Yefremov
both touchscreen and regulator units are only working if mfd device is activated. So if mfd support is enabled, select TPS6507X mfd support automatically.
Signed-off-by Yegor Yefremov <[email protected]>
This should be split into separate patches and sent to *all* the relevant maintainers.
drivers/input/touchscreen/Kconfig line 720
Quoted 5 lines
config
TOUCHSCREEN_TPS6507Xdrivers/input/touchscreen/Kconfig +2
-1tristate "TPS6507x based touchscreens" - depends on I2C + depends on I2C && MFD_SUPPORT + select TPS6507X
This isn't a good fix, the driver should depend on the MFD core not select it.
Am 11.07.2011 14:20, schrieb Mark Brown:
Quoted 9 lines · Yegor Yefremov
Quoted 5 lines
both touchscreen and regulator units are only working if mfd device is activated. So if mfd support is enabled, select TPS6507X mfd support automatically.
Signed-off-by Yegor Yefremov <[email protected]>This should be split into separate patches and sent to *all* the relevant maintainers.
Quoted 7 lines
Review
Quoted 5 lines
config
TOUCHSCREEN_TPS6507X(quoted diff) +2
-1tristate "TPS6507x based touchscreens" - depends on I2C + depends on I2C && MFD_SUPPORT + select TPS6507XThis isn't a good fix, the driver should depend on the MFD core not select it.
Thanks for reviewing. Should I change the patch like this:
touchscreen unit is only working if mfd device is activated. So if mfd support is enabled, select TPS6507X mfd support automatically.
--- drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/Kconfig +1 -1
@@ -716,7 +716,7 @@ config TOUCHSCREEN_TPS6507X tristate "TPS6507x based touchscreens" - depends on I2C + depends on I2C && TPS6507X help Say Y here if you have a TPS6507x based touchscreen controller.
drivers/input/touchscreen/Kconfig line 719
Quoted 5 lines · Yegor Yefremov
Am 11.07.2011 14:20, schrieb Mark Brown:
tristate "TPS6507x based touchscreens"
drivers/input/touchscreen/Kconfig +1
-1- depends on I2C + depends on I2C && TPS6507X
You can just remove the I2C dependency, the core won't be enabled if teh control bus isn't there.
Dmitry Torokhov
maintainerQuoted 10 lines · Mark Brown
Quoted 5 lines · Yegor Yefremov
both touchscreen and regulator units are only working if mfd device is activated. So if mfd support is enabled, select TPS6507X mfd support automatically.
Signed-off-by Yegor Yefremov <[email protected]>This should be split into separate patches and sent to *all* the relevant maintainers.
Quoted 8 lines
drivers/input/touchscreen/Kconfig line 720
Quoted 5 lines
config
TOUCHSCREEN_TPS6507Xdrivers/input/touchscreen/Kconfig +2
-1tristate "TPS6507x based touchscreens" - depends on I2C + depends on I2C && MFD_SUPPORT + select TPS6507XThis isn't a good fix, the driver should depend on the MFD core not select it.
The problem with such dependencies is that user has to first enable MFD core and then hunt through all other menus in search of the function drivers for that chip...
Depending on what other things TPS6507X depends on it might be good idea to go ahead and select it.
Signature · 1 line
Dmitry
Quoted 11 lines · Dmitry Torokhov
Quoted 2 lines · Mark Brown
This isn't a good fix, the driver should depend on the MFD core not select it.
The problem with such dependencies is that user has to first enable MFD core and then hunt through all other menus in search of the function drivers for that chip...
Depending on what other things TPS6507X depends on it might be good idea to go ahead and select it.
If this is an issue it's going to be much more useful to have the boards select their MFD cores than have random function drivers do that, in most situations it's not actually going to be useful to select the core driver as the core driver itself needs something to select either the I2C or SPI bus interface for the device in order to actually communicate with it.
Remember that this is for embedded systems where the user will normally have a pretty good idea what's on their system, someone will have had to explicitly plumb the device into the board anyway.
Am 12.07.2011 00:33, schrieb Mark Brown:
Quoted 16 lines · Dmitry Torokhov
Quoted 8 lines · Mark Brown
Quoted 2 lines
This isn't a good fix, the driver should depend on the MFD core not select it.
The problem with such dependencies is that user has to first enable MFD core and then hunt through all other menus in search of the function drivers for that chip...
Depending on what other things TPS6507X depends on it might be good idea to go ahead and select it.If this is an issue it's going to be much more useful to have the boards select their MFD cores than have random function drivers do that, in most situations it's not actually going to be useful to select the core driver as the core driver itself needs something to select either the I2C or SPI bus interface for the device in order to actually communicate with it.
Quoted 3 lines
Remember that this is for embedded systems where the user will normally have a pretty good idea what's on their system, someone will have had to explicitly plumb the device into the board anyway.
The reason for the patch was following. I have a custom board, that is very close to some other board except of this PMIC (TPS650732). So I copied the platform code from the second board, but not the configuration. Then I activated the touchscreen driver and wondered, why on earth i2c driver doesn't see this device? At last I found out, that this driver depends on MFD driver and so I made this patch to avoid this situation in the future.
Yegor