Re: [RFC PATCH] Input: tm2-touchkey - add hardware dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 24, 2017 at 10:09:53AM -0700, Dmitry Torokhov wrote:
> On Mon, Apr 24, 2017 at 01:56:06PM +0200, Krzysztof Kozlowski wrote:
> > Workaround might be using default = N, unless ARCH_EXYNOS. Something like:
> > default y if ARCH_EXYNOS
> 
> This would strongly imply that the device is available on all Exynos
> boards. I am fairly certain that our Chromebooks, for example, do not
> have it.

A new Kconfig keyword like "usable on" would imply that as well... I do
not know how you want to limit this to only few specific boards.

> 
> Besides, I do not see what is wrong with driver being offered on a
> platform that does not have it. This happens all the time. Consider I2C
> stuff:
> 
> config I2C_I801
> 	tristate "Intel 82801 (ICH/PCH)"
> 	depends on PCI
> 	select CHECK_SIGNATURE if X86 && DMI
> 	select I2C_SMBUS
> 
> This is an X86 device, but is offered everywhere where we have PCI.

But that I2C_I801 driver has a real dependency on PCI. It just needs the
PCI. This is why you have depends for.

Other drivers who exist only on Exynos boards do not have such
dependencies. They have only real hardware or software "depends", e.g.:
config MFD_MAX77686                                                                                                                                                                      
         tristate "Maxim Semiconductor MAX77686/802 PMIC Support"
         depends on I2C
         depends on OF || COMPILE_TEST
         select MFD_CORE
         select REGMAP_I2C
         select REGMAP_IRQ
         select IRQ_DOMAIN

This driver needs I2C and OF. It does not need Exynos for anything,
although it is used only for Exynos specific boards so far.

Modeling drivers that "exist only on two Exynos based boards" through
depending on ARCH_EXYNOS is different. Not mentioning that the TM2 touch
key is in fact Cypress touchkey and could be used on other boards.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux