Re: [PATCH] Input: apm-power - remove driver

From: Arnd Bergmann

Date: Mon Nov 09 2026 - 05:06:22 EST


On Mon, Nov 9, 2026, at 09:09, Dmitry Torokhov wrote:
> 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.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>

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