From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E030E1DFF7; Thu, 25 Jul 2024 14:54:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721919247; cv=none; b=MTQtYKGV6LQqjIR8O6UAQR9O6K+Bjgzf7QXrZUZUkrEUnois3UnWmW5HpGoAKX1dJ+CWZtnjCfSEfliF4CgAzk4IJFBdX3ApHR7ylKyS4tXnXo6tKQDbUbcxoqWlXTbHxUTh9O25bx96S4m3F57A6lqqYsiMv/XnZAgJcOsNnZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721919247; c=relaxed/simple; bh=avZCrDm35zfY6HNhqCuArGYMRHsSe8GzN+1L/6dQZ4U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VW63bemKLq9Ju6pDjphFi8tSTa/5jaUWhW30O5TXijPtEXxXaDQ+D6+NA+Djj/DvYECd4QroZhW4xox/xMCRDJzsMHr9DwsCbed3VmZuGJUZjscJ7L8fwlnHWMe4xCBkG4Lgg1OsECzUK0siUvX2YR1rzoAifq98fyXi5tWuhIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AXz3J65B; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AXz3J65B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E896C116B1; Thu, 25 Jul 2024 14:54:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721919246; bh=avZCrDm35zfY6HNhqCuArGYMRHsSe8GzN+1L/6dQZ4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AXz3J65BDPl2KitbQ1Ed7X829mY8cO9xtG8El9JpS4E23BLb0HAgNzaRB2BrVN2B3 xTTWiJl5SOawHo1hpNK4fBORkYnynhYAvzF7GCgNzfUZ+YKPD19umzsgumM/G0Udr0 XmspyrrxVgTrjo8KXWFHqRVY5SUfxHjVjDfbL6wA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tobias Jakobi , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.15 37/87] Input: i8042 - add Ayaneo Kun to i8042 quirk table Date: Thu, 25 Jul 2024 16:37:10 +0200 Message-ID: <20240725142739.834140795@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240725142738.422724252@linuxfoundation.org> References: <20240725142738.422724252@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jakobi [ Upstream commit 955af6355ddfe35140f9706a635838212a32513b ] See the added comment for details. Also fix a typo in the quirk's define. Signed-off-by: Tobias Jakobi Link: https://lore.kernel.org/r/20240531190100.3874731-1-tjakobi@math.uni-bielefeld.de Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/serio/i8042-acpipnpio.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h index d4792950bcffd..49d87f56cb909 100644 --- a/drivers/input/serio/i8042-acpipnpio.h +++ b/drivers/input/serio/i8042-acpipnpio.h @@ -75,7 +75,7 @@ static inline void i8042_write_command(int val) #define SERIO_QUIRK_PROBE_DEFER BIT(5) #define SERIO_QUIRK_RESET_ALWAYS BIT(6) #define SERIO_QUIRK_RESET_NEVER BIT(7) -#define SERIO_QUIRK_DIECT BIT(8) +#define SERIO_QUIRK_DIRECT BIT(8) #define SERIO_QUIRK_DUMBKBD BIT(9) #define SERIO_QUIRK_NOLOOP BIT(10) #define SERIO_QUIRK_NOTIMEOUT BIT(11) @@ -1295,6 +1295,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + /* + * The Ayaneo Kun is a handheld device where some the buttons + * are handled by an AT keyboard. The keyboard is usually + * detected as raw, but sometimes, usually after a cold boot, + * it is detected as translated. Make sure that the keyboard + * is always in raw mode. + */ + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"), + DMI_MATCH(DMI_BOARD_NAME, "KUN"), + }, + .driver_data = (void *)(SERIO_QUIRK_DIRECT) + }, { } }; @@ -1613,7 +1627,7 @@ static void __init i8042_check_quirks(void) if (quirks & SERIO_QUIRK_RESET_NEVER) i8042_reset = I8042_RESET_NEVER; } - if (quirks & SERIO_QUIRK_DIECT) + if (quirks & SERIO_QUIRK_DIRECT) i8042_direct = true; if (quirks & SERIO_QUIRK_DUMBKBD) i8042_dumbkbd = true; -- 2.43.0