Skip to contentSkip to conversation

Input: apm-power - remove driver

PATCH In review Dmitry Torokhov 5 participants 6 messages Nov 9 – Nov 10

Subsystems (4)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: apm-power - remove driver

The apm-power input handler solely listens for EV_PWR KEY_SUSPEND events to queue APM_USER_SUSPEND via legacy APM emulation. The only in-tree platforms generating those events are legacy Sharp Zaurus ARM machines (spitz/borzoi/akita and collie), none of which were converted to Device Tree. Both mach-pxa board files and mach-sa1100 were marked deprecated in v7.3 by commit cc7852314abd ("ARM: PXA: mark remaining board files as deprecated") and commit 7d92e50ceacd ("ARM: mark mach-sa1100 as deprecated"), and are queued for removal in v7.5. None of the remaining ARM platforms or other APM_EMULATION targets (MIPS_ALCHEMY, PMAC_APM_EMU, and SH_HP6XX) emit EV_PWR input events or enable CONFIG_INPUT_APMPOWER, and arch/arm/configs/pxa_defconfig already dropped CONFIG_PXA_SHARPSL at the same time, leaving its CONFIG_INPUT_APMPOWER=m entry inert.

Normalizing dashes and underscores in scripts/modules-check.sh for v7.5 exposes a module name collision (apm_power) between drivers/input/apm-power.ko and drivers/power/supply/apm_power.ko. Remove this obsolete input bridge to resolve the collision rather than renaming a module whose last target platforms are going away in the same cycle.

---
 arch/arm/configs/pxa_defconfig |   1 -
 drivers/input/Kconfig          |  12 ----
 drivers/input/Makefile         |   2 -
 drivers/input/apm-power.c      | 122 ---------------------------------
 4 files changed, 137 deletions(-)
 delete mode 100644 drivers/input/apm-power.c
arch/arm/configs/pxa_defconfig +0 -1
index e7a7ed2b7ef7..e70d2789d1f6 100644
@@ -224,7 +224,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
 CONFIG_INPUT_JOYDEV=m
 CONFIG_INPUT_EVDEV=m
-CONFIG_INPUT_APMPOWER=m
 CONFIG_KEYBOARD_ATKBD=m
 CONFIG_KEYBOARD_QT1070=m
 CONFIG_KEYBOARD_GPIO=m
drivers/input/Kconfig +0 -12
index 88ecdf5218ee..064beedf5558 100644
@@ -162,18 +162,6 @@ config INPUT_KUNIT_TEST
 
 	  If in doubt, say "N".
 
-config INPUT_APMPOWER
-	tristate "Input Power Event -> APM Bridge" if EXPERT
-	depends on INPUT && APM_EMULATION
-	help
-	  Say Y here if you want suspend key events to trigger a user
-	  requested suspend through APM. This is useful on embedded
-	  systems where such behaviour is desired without userspace
-	  interaction. If unsure, say N.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called apm-power.
-
 comment "Input Device Drivers"
 
 source "drivers/input/keyboard/Kconfig"
drivers/input/Makefile +0 -2
index 2cd6e1c9a778..7d2af8dfd17e 100644
@@ -27,6 +27,4 @@ obj-$(CONFIG_INPUT_TOUCHSCREEN)	+= touchscreen/
 obj-$(CONFIG_INPUT_MISC)	+= misc/
 obj-$(CONFIG_INPUT_KUNIT_TEST)	+= tests/
 
-obj-$(CONFIG_INPUT_APMPOWER)	+= apm-power.o
-
 obj-$(CONFIG_RMI4_CORE)		+= rmi4/
drivers/input/apm-power.c deleted +0 -122

122 lines not on this page · raw message

Signature · 1 line
2.56.0.506.g506a7eabc5-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Dmitry Torokhov

The apm-power input handler solely listens for EV_PWR KEY_SUSPEND events to queue APM_USER_SUSPEND via legacy APM emulation. The only in-tree platforms generating those events are legacy Sharp Zaurus ARM machines (spitz/borzoi/akita and collie), none of which were converted to Device Tree. Both mach-pxa board files and mach-sa1100 were marked deprecated in v7.3 by commit cc7852314abd ("ARM: PXA: mark remaining board files as deprecated") and commit 7d92e50ceacd ("ARM: mark mach-sa1100 as deprecated"), and are queued for removal in v7.5. None of the remaining ARM platforms or other APM_EMULATION targets (MIPS_ALCHEMY, PMAC_APM_EMU, and SH_HP6XX) emit EV_PWR input events or enable CONFIG_INPUT_APMPOWER, and arch/arm/configs/pxa_defconfig already dropped CONFIG_PXA_SHARPSL at the same time, leaving its CONFIG_INPUT_APMPOWER=m entry inert.

Quoted 6 lines

Normalizing dashes and underscores in scripts/modules-check.sh for v7.5 exposes a module name collision (apm_power) between drivers/input/apm-power.ko and drivers/power/supply/apm_power.ko. Remove this obsolete input bridge to resolve the collision rather than renaming a module whose last target platforms are going away in the same cycle.

I missed this one and thought it was still needed, but your explanation makes sense.

I think we can follow the same logic for drivers/power/supply/apm_power.c and remove that once my board removal lands: the only actual battery that is ever registered with battery_desc.use_for_apm=1 is for the OLPC XO1.5, and that one does not have CONFIG_APM_EMULATION, so that can probably all go away.

Maybe we can then fold drivers/char/apm-emulation.c back into arch/sh/boards/mach-hp6xx/hp6xx_apm.c and drivers/macintosh/apm_emu.c as separate copies. This started out in the mac driver to be compatible with x86 and was later unified across architectures, but is entirely obsolete now except for the few 20+ year old machines that were converted to it in the past.

Arnd

#2 lore raw

Hi,

Quoted 5 lines · Arnd Bergmann

I think we can follow the same logic for drivers/power/supply/apm_power.c and remove that once my board removal lands: the only actual battery that is ever registered with battery_desc.use_for_apm=1 is for the OLPC XO1.5, and that one does not have CONFIG_APM_EMULATION, so that can probably all go away.

Sound good to me.

Greetings,

-- Sebastian

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Dmitry Torokhov
Quoted 21 lines · Dmitry Torokhov

The apm-power input handler solely listens for EV_PWR KEY_SUSPEND events to queue APM_USER_SUSPEND via legacy APM emulation. The only in-tree platforms generating those events are legacy Sharp Zaurus ARM machines (spitz/borzoi/akita and collie), none of which were converted to Device Tree. Both mach-pxa board files and mach-sa1100 were marked deprecated in v7.3 by commit cc7852314abd ("ARM: PXA: mark remaining board files as deprecated") and commit 7d92e50ceacd ("ARM: mark mach-sa1100 as deprecated"), and are queued for removal in v7.5. None of the remaining ARM platforms or other APM_EMULATION targets (MIPS_ALCHEMY, PMAC_APM_EMU, and SH_HP6XX) emit EV_PWR input events or enable CONFIG_INPUT_APMPOWER, and arch/arm/configs/pxa_defconfig already dropped CONFIG_PXA_SHARPSL at the same time, leaving its CONFIG_INPUT_APMPOWER=m entry inert.

Normalizing dashes and underscores in scripts/modules-check.sh for v7.5 exposes a module name collision (apm_power) between drivers/input/apm-power.ko and drivers/power/supply/apm_power.ko. Remove this obsolete input bridge to resolve the collision rather than renaming a module whose last target platforms are going away in the same cycle.

Quoted 5 lines

Thanks a lot for helping with this.

Nicolas, do you prefer taking this via kbuild-next directly or having Dmitry take it via the input tree and giving us an immutable branch? I assume the chance of conflicts or follow-ups are low, so we can probably just take it directly but I don't want to assume your preference.

Signature · 2 lines
Cheers,
Nathan
maintainer
#4 lore raw
Quoted 28 lines · Nathan Chancellor
Quoted 21 lines · Dmitry Torokhov

The apm-power input handler solely listens for EV_PWR KEY_SUSPEND events to queue APM_USER_SUSPEND via legacy APM emulation. The only in-tree platforms generating those events are legacy Sharp Zaurus ARM machines (spitz/borzoi/akita and collie), none of which were converted to Device Tree. Both mach-pxa board files and mach-sa1100 were marked deprecated in v7.3 by commit cc7852314abd ("ARM: PXA: mark remaining board files as deprecated") and commit 7d92e50ceacd ("ARM: mark mach-sa1100 as deprecated"), and are queued for removal in v7.5. None of the remaining ARM platforms or other APM_EMULATION targets (MIPS_ALCHEMY, PMAC_APM_EMU, and SH_HP6XX) emit EV_PWR input events or enable CONFIG_INPUT_APMPOWER, and arch/arm/configs/pxa_defconfig already dropped CONFIG_PXA_SHARPSL at the same time, leaving its CONFIG_INPUT_APMPOWER=m entry inert.

Normalizing dashes and underscores in scripts/modules-check.sh for v7.5 exposes a module name collision (apm_power) between drivers/input/apm-power.ko and drivers/power/supply/apm_power.ko. Remove this obsolete input bridge to resolve the collision rather than renaming a module whose last target platforms are going away in the same cycle.

Quoted 5 lines
Quoted 8 lines

Thanks a lot for helping with this.

Nicolas, do you prefer taking this via kbuild-next directly or having Dmitry take it via the input tree and giving us an immutable branch? I assume the chance of conflicts or follow-ups are low, so we can probably just take it directly but I don't want to assume your preference.

Thanks! I'd like to take it via kbuild tree. Please complain, if I shall drop it again.

Signature · 1 line
Nicolas
maintainer
#5 lore raw
In reply to Dmitry Torokhov
Quoted 14 lines · Dmitry Torokhov

The apm-power input handler solely listens for EV_PWR KEY_SUSPEND events to queue APM_USER_SUSPEND via legacy APM emulation. The only in-tree platforms generating those events are legacy Sharp Zaurus ARM machines (spitz/borzoi/akita and collie), none of which were converted to Device Tree. Both mach-pxa board files and mach-sa1100 were marked deprecated in v7.3 by commit cc7852314abd ("ARM: PXA: mark remaining board files as deprecated") and commit 7d92e50ceacd ("ARM: mark mach-sa1100 as deprecated"), and are queued for removal in v7.5. None of the remaining ARM platforms or other APM_EMULATION targets (MIPS_ALCHEMY, PMAC_APM_EMU, and SH_HP6XX) emit EV_PWR input events or enable CONFIG_INPUT_APMPOWER, and arch/arm/configs/pxa_defconfig already dropped CONFIG_PXA_SHARPSL at the same time, leaving its CONFIG_INPUT_APMPOWER=m entry inert.

Quoted 1 line

[...]

Applied to kbuild/linux.git (kbuild-next-unstable), thanks!

[1/1] Input: apm-power - remove driver

      https://git.kernel.org/kbuild/c/7f705c0a

Please look out for regression or issue reports or other follow up comments, as they may result in the patch/series getting dropped, reverted or modified (e.g. trailers).

Patches applied to the kbuild-next-unstable branch are accepted pending wider testing in linux-next and any post-commit review; they will generally be moved to the kbuild-next branch in about a week if no issues are found.

Best regards,

Signature · 1 line
Nicolas