Skip to contentSkip to conversation

Input: misc - atmel_captouch does not depend on OF

PATCH In review Jean Delvare 2 participants 3 messages Oct 3, 2022 – Oct 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: misc - atmel_captouch does not depend on OF

The atmel_captouch driver does not actually depend on OF, it includes a non-OF device ID which could be used to instantiate the device, and the driver code is already prepared to be built with or without OF. So drop the unneeded dependency.

Cc Daniel Hung-yu Wu <[email protected]>
Cc Dmitry Torokhov <[email protected]>

---
The problem I'm trying to solve here is that "depends on OF || COMPILE_TEST" does not make sense since OF can now be enabled on all architectures. One way to fix this is by removing the dependency altogether (this patch).

If the driver is known to be needed only on OF-enabled systems then we could leave the dependency on OF and only drop COMPILE_TEST (and simplify the driver code accordingly). I have an alternative patch doing that already. Tell me what you prefer, I'm fine either way.

 drivers/input/misc/Kconfig |    1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/Kconfig +0 -1
@@ -107,7 +107,6 @@ config INPUT_ATC260X_ONKEY
 
 config INPUT_ATMEL_CAPTOUCH
 	tristate "Atmel Capacitive Touch Button Driver"
-	depends on OF || COMPILE_TEST
 	depends on I2C
 	help
 	  Say Y here if an Atmel Capacitive Touch Button device which
Signature · 2 lines
Jean Delvare
SUSE L3 Support
maintainer
#1 lore raw

Hi Jean,

Quoted 14 lines · Jean Delvare

The atmel_captouch driver does not actually depend on OF, it includes a non-OF device ID which could be used to instantiate the device, and the driver code is already prepared to be built with or without OF. So drop the unneeded dependency.

Cc Daniel Hung-yu Wu <[email protected]>
Cc Dmitry Torokhov <[email protected]>

---
The problem I'm trying to solve here is that "depends on OF || COMPILE_TEST" does not make sense since OF can now be enabled on all architectures. One way to fix this is by removing the dependency altogether (this patch).

Quoted 4 lines

If the driver is known to be needed only on OF-enabled systems then we could leave the dependency on OF and only drop COMPILE_TEST (and simplify the driver code accordingly). I have an alternative patch doing that already. Tell me what you prefer, I'm fine either way.

The driver is not operable on systems without OF:

static int atmel_captouch_probe(...

	...

	node = dev->of_node;
	if (!node) {
		dev_err(dev, "failed to find matching node in device tree\n");
		return -EINVAL;
	}

	if (of_property_read_bool(node, "autorepeat"))

So the reason for "depends on OF || COMPILE_TEST" is to avoid prompting users who actually try to configure real systems for drivers that make no sense for them while still allowing people interested in compile coverage to select COMPILE_TEST and enable more drivers.

Thanks.

Signature · 1 line
Dmitry
#2 lore raw
Quoted 35 lines · Dmitry Torokhov

Hi Jean,

Quoted 14 lines · Jean Delvare

The atmel_captouch driver does not actually depend on OF, it includes a non-OF device ID which could be used to instantiate the device, and the driver code is already prepared to be built with or without OF. So drop the unneeded dependency.

Cc Daniel Hung-yu Wu <[email protected]>
Cc Dmitry Torokhov <[email protected]>

---
The problem I'm trying to solve here is that "depends on OF || COMPILE_TEST" does not make sense since OF can now be enabled on all architectures. One way to fix this is by removing the dependency altogether (this patch).

Quoted 4 lines

If the driver is known to be needed only on OF-enabled systems then we could leave the dependency on OF and only drop COMPILE_TEST (and simplify the driver code accordingly). I have an alternative patch doing that already. Tell me what you prefer, I'm fine either way.

The driver is not operable on systems without OF:

static int atmel_captouch_probe(...

	...

	node = dev->of_node;
	if (!node) {
		dev_err(dev, "failed to find matching node in device tree\n");
		return -EINVAL;
	}

	if (of_property_read_bool(node, "autorepeat"))
Quoted 4 lines

So the reason for "depends on OF || COMPILE_TEST" is to avoid prompting users who actually try to configure real systems for drivers that make no sense for them while still allowing people interested in compile coverage to select COMPILE_TEST and enable more drivers.

OK, thanks for the clarification. Please disregard this patch then, I'll send the other one.

Signature · 2 lines
Jean Delvare
SUSE L3 Support