Skip to contentSkip to conversation

ARM: OMAP: OMAP_GPIO_SWITCH doesn't need OMAP_BOOT_TAG

PATCH In review Jonathan McDowell 4 participants 5 messages May 17, 2006 – May 26, 2006

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

PATCH 1/1 ARM: OMAP: OMAP_GPIO_SWITCH doesn't need OMAP_BOOT_TAG

I can't see any reason why OMAP_GPIO_SWITCH depends on OMAP_BOOT_TAG; it compiles fine without it. This patch removes the Kconfig dependency.

Also the description is wrong; it doesn't hook into the input layer at all from what I can tell. Are there patches around that add this? The Amstrad Delta has a phone hook on a GPIO that I plan to support with this driver and being able to produce a keypress would be nice.

-----

arch/arm/plat-omap/Kconfig +1 -2
index 28ca5ad..762d417 100644
@@ -57,13 +57,12 @@ config OMAP_COMPONENT_VERSION
 
 config OMAP_GPIO_SWITCH
 	bool "GPIO switch support"
-        depends on OMAP_BOOT_TAG
         default n
         help
           Say Y, if you want to have support for input layer reporting
           of GPIO switches (e.g. cover switches). Your bootloader has to
           provide information about the switches to the kernel via the
-          ATAG_BOARD mechanism.
+          ATAG_BOARD mechanism if they're not defined by the board config.
 
 config OMAP_MUX
 	bool "OMAP multiplexing support"

-----

J.

Signature · 3 lines
Web [    I'd love to but... I'm having all my plants neutered.     ]
site: http:// [                                          ]       Made by
www.earth.li/~noodles/  [                      ]         HuggieTag 0.0.23
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jonathan McDowell

I can't see any reason why OMAP_GPIO_SWITCH depends on OMAP_BOOT_TAG; it compiles fine without it. This patch removes the Kconfig dependency.

It doesn't depend on it specifically itself, no, so I suppose dropping the dependency is fine.

Quoted 5 lines

Also the description is wrong; it doesn't hook into the input layer at all from what I can tell. Are there patches around that add this? The Amstrad Delta has a phone hook on a GPIO that I plan to support with this driver and being able to produce a keypress would be nice.

May as well just remove 'input layer' from the description, it was a legacy thing..

Quoted 2 lines
#2 lore raw
In reply to Jonathan McDowell
Quoted 2 lines · Jonathan McDowell

I can't see any reason why OMAP_GPIO_SWITCH depends on OMAP_BOOT_TAG; it compiles fine without it. This patch removes the Kconfig dependency.

Yeah, that's a legacy restriction.

Quoted 4 lines

Also the description is wrong; it doesn't hook into the input layer at all from what I can tell. Are there patches around that add this? The Amstrad Delta has a phone hook on a GPIO that I plan to support with this driver and being able to produce a keypress would be nice.

It doesn't anymore. We replaced that with uevents. Nowadays the right way to go is to use the sysfs_notify() API.

The patches for the input stuff are probably long gone (but you might find something in the BitKeeper repository). I won't object to someone re-adding the input layer functionality again, though.

Cheers,
Juha

#3 lore raw

PATCH 1/1 ARM: OMAP: OMAP_GPIO_SWITCH doesn't need OMAP_BOOT_TAG

In reply to Jonathan McDowell
Quoted 2 lines · Jonathan McDowell

I can't see any reason why OMAP_GPIO_SWITCH depends on OMAP_BOOT_TAG; it compiles fine without it. This patch removes the Kconfig dependency.

Here's an updated patch that not only removes the dependency but cleans up the Kconfig description to talk about sysfs rather than the input layer.

-----

arch/arm/plat-omap/Kconfig +4 -5
index 28ca5ad..cc8c793 100644
@@ -57,13 +57,12 @@ config OMAP_COMPONENT_VERSION
 
 config OMAP_GPIO_SWITCH
 	bool "GPIO switch support"
-        depends on OMAP_BOOT_TAG
         default n
         help
-          Say Y, if you want to have support for input layer reporting
-          of GPIO switches (e.g. cover switches). Your bootloader has to
-          provide information about the switches to the kernel via the
-          ATAG_BOARD mechanism.
+          Say Y, if you want to have support for reporting of GPIO
+          switches (e.g. cover switches) via sysfs. Your bootloader has
+          to provide information about the switches to the kernel via the
+          ATAG_BOARD mechanism if they're not defined by the board config.
 
 config OMAP_MUX
 	bool "OMAP multiplexing support"

-----

J.

Signature · 2 lines
                                            jid: [email protected]
Three can keep a secret, if two are dead.
#4 lore raw
Quoted 23 lines · Jonathan McDowell
Quoted 2 lines · Jonathan McDowell

I can't see any reason why OMAP_GPIO_SWITCH depends on OMAP_BOOT_TAG; it compiles fine without it. This patch removes the Kconfig dependency.

Here's an updated patch that not only removes the dependency but cleans up the Kconfig description to talk about sysfs rather than the input layer.

-----

arch/arm/plat-omap/Kconfig +0 -2
index 28ca5ad..cc8c793 100644
@@ -57,13 +57,12 @@ config OMAP_COMPONENT_VERSION
 
 config OMAP_GPIO_SWITCH
 	bool "GPIO switch support"
-        depends on OMAP_BOOT_TAG
         default n
         help
-          Say Y, if you want to have support for input layer reporting

arch/arm/plat-omap/Kconfig config OMAP_COMPONENT_VERSION · line 68

Quoted 10 lines
arch/arm/plat-omap/Kconfig +4 -3
-          of GPIO switches (e.g. cover switches). Your bootloader has to
-          provide information about the switches to the kernel via the
-          ATAG_BOARD mechanism.
+          Say Y, if you want to have support for reporting of GPIO
+          switches (e.g. cover switches) via sysfs. Your bootloader has
+          to provide information about the switches to the kernel via the
+          ATAG_BOARD mechanism if they're not defined by the board config.
 
 config OMAP_MUX
 	bool "OMAP multiplexing support"

Pushing today. This allows us also to integrate the gpio switch into the mainline kernel.

Tony