Re: [PATCH] Input: amimouse - Fix the buttons

From: Dmitry Torokhov

Date: Tue Nov 24 2026 - 13:19:45 EST


On Tue, Nov 24, 2026 at 07:06:04PM +0900, Daniel Palmer wrote:
> On the Amiga the left button is connected to CIAAPRA bit 6 (/FIR0)
> and the middle and right ones are POTINP (called potgor in the code)
> bits 8 (DATLX) and 10 (DATLY), all of these are active low according
> to the "Amiga Hardware Reference Manual (3rd edition)":
>
> In chapter 8, "Interface Hardware": under "Mouse Buttons" a 0 in CIAAPRA
> bit 6 means "switch closed", and under "Digital I/O on the Controller
> Port" reading POTINP "will produce a 0 if the button is pressed, a 1 if
> it is not".
>
> Invert the bits from the registers so the state of the buttons is
> correct.
>
> Tested with Quake on a real Amiga 4000.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Daniel Palmer <daniel@xxxxxxxx>

Applied, thank you.

--
Dmitry