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 19AED18B052; Tue, 9 Jul 2024 16:25:23 +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=1720542323; cv=none; b=thC66URPYbO+NWnoiFemE8mBB653O1Ed07Kb+XqKXPaIRnSs5RQA2k59OL6uEg4Oah6z3x1ueiwpG693+rNbicUkk9SrALhT4vuDcE0QAH09ZqnnSN+GEuDKe/nuXSqeGpq/nm8gXPbNZO1OMxszJf1A89md5+hcKnbZ6bTsoj0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720542323; c=relaxed/simple; bh=Bw3fU2EIyjXxKQTEiMWemAgffZ6+bq1GxNPWU3Yy7po=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B0pgD7fQTBNRhSZG902RmqV0R0KpsfOJalAgIAPwp89LJ31/nMHWwk8UPsKuw9cAARyZa+TGxPU3d92rQH6f6563aL2kajK92FWEhhNJ94aVZVrHZRlYZiD0HqAUo/eIUkLlLUtVOKXkwOoLLFh0iJahIHqq2RAwRuX/gLFEgfQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OrXJLY3n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OrXJLY3n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1CD8C3277B; Tue, 9 Jul 2024 16:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720542323; bh=Bw3fU2EIyjXxKQTEiMWemAgffZ6+bq1GxNPWU3Yy7po=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OrXJLY3nAEpx86fmrprhywlWH1JQXQATdYgF1a/M9nJeE58VSY3GDpTf/sBzL20aV jc3fE9Hn3phWUxYLGNGax5XoK0T4Flw/vYhvabRjB03sSsenAkucYobDEbEPxhm6BH yDYZfdq5QAQ5TF5bf4T+ekoLLwxx0kYjVndW6p4eU2XSBP6C+Qa9dxcnHRG42snZNM 4rmxLa7YR/IRaL1VPpBPf0cvzfXO87YthBgY2K0jEhr+VgxZz9PgKusrU1Af+hPphy AoCi1C6WToON2aVfEk0GfuRdb4VBn2+YhBQyfsujHBHzgzufp4xlkJMFDJ1ljRVev3 sWw+hMvpMisCQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tobias Jakobi , Dmitry Torokhov , Sasha Levin , szfabian@bluemarch.art, wse@tuxedocomputers.com, eshimanovich@chromium.org, linux-input@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 02/17] Input: i8042 - add Ayaneo Kun to i8042 quirk table Date: Tue, 9 Jul 2024 12:24:46 -0400 Message-ID: <20240709162517.32584-2-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240709162517.32584-1-sashal@kernel.org> References: <20240709162517.32584-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.162 Content-Transfer-Encoding: 8bit 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