From nobody Sun Oct 5 16:20:37 2025 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 C133621A433; Thu, 31 Jul 2025 21:17:03 +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=1753996623; cv=none; b=DzYx5JSEVg0i/xsvDog2Kjt47QOJnX7rfPpPLuGddLp2nZyR2/P3MOPYJzgJY4B75CNMEpyEkpzTyMJSk/6ls7ITfbmFZvDAeAvZQZeVG2KbYOg0WHJ3kf4Vd6nz1//KYzPdfmqbqAL9ikFtCnLDvlo1Zfwv546Y/c+/IAT27do= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753996623; c=relaxed/simple; bh=wk89EBN1Ds5i2122SjoVhN6tOFx4aYnZHN8Utb5yZ28=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=M3/AZfFRXSJDGMrnhp1LBSHpnVsF7TIsNB3zaB2WVkRgsvbjkE+rQcdjF/F45iRIocLr0stlMvkpMUdSSCziblCVjPMv0rJ3+CSeRSa0HZNeHKVNyDMyiWDSTHwcjB9Oz10U5lLNwJVzM1Oy5xUHwq9mXn9GodetyeI5myFGAyA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KsyezfGr; 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="KsyezfGr" Received: by smtp.kernel.org (Postfix) with ESMTPS id 49ADFC4CEF7; Thu, 31 Jul 2025 21:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753996623; bh=wk89EBN1Ds5i2122SjoVhN6tOFx4aYnZHN8Utb5yZ28=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=KsyezfGrlgN5yBCkdZ8WoXucU5T9nYl1sXYlXJdHXkKzXRomLqDzsVOGwIZFndC0/ W710G7bR4pKTc34jo84O+J6bkhwAvJVjn8eKCvfORuXhTs8Sse4pKFvbwORx9rLShq cpRGV0cWcXKdoKMoTsl83Y5+pfDTf05EAbJ1N/M5MAzfPcQYxFz7y2NNZWxj2mtXjY GOCZhdmw455QBu0UfbXdFumiqLu7gKannjiQ8tVsZVaG9N54hKbWDRX8Eoa7LOqfZZ CxuhFamO+HrYDq7FD4l4SUo3f48Jn0YY8ISQDt5G7CGTGz109wAiwEF4hpswkHmRl5 25XnsfJAMVHTg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D67AC87FD3; Thu, 31 Jul 2025 21:17:03 +0000 (UTC) From: David Heidelberg via B4 Relay Date: Thu, 31 Jul 2025 23:17:01 +0200 Subject: [PATCH v6 1/2] Input: add ABS_SND_PROFILE Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250731-op6-tri-state-v6-1-569c25cbc8c2@ixit.cz> References: <20250731-op6-tri-state-v6-0-569c25cbc8c2@ixit.cz> In-Reply-To: <20250731-op6-tri-state-v6-0-569c25cbc8c2@ixit.cz> To: Dmitry Torokhov , Jonathan Corbet , Jiri Kosina , Benjamin Tissoires , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-input@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Gergo Koteles , David Heidelberg X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2583; i=david@ixit.cz; h=from:subject:message-id; bh=mqKhMCON4ESTbCRdEw8RVTqsYW4WqX/QCr9kEq/TUv0=; b=owEBbQKS/ZANAwAIAWACP8TTSSByAcsmYgBoi91NIext4b6VEbyCmO/FVK/H64FFc4sY50g8X KhNosoj9J+JAjMEAAEIAB0WIQTXegnP7twrvVOnBHRgAj/E00kgcgUCaIvdTQAKCRBgAj/E00kg cmf4D/4/6zEjojuc913sf+yQiwbWL6b0VoQkXD4cIaVlmkI9zPNq0D0FGQinLcMkoCDL5Bp0JzG LZTFP76WHuujYNOJG4/bm6hnTcYStdr+stWzrwjyGfVQJZ87Kpp7ym0KOwvLKseuDFmAAb6P26U UBPzvHCLwQbZi2qubakfQl41/GhYggaCdOg83cILXbkpC7o5JJXoV2mVr2QyLtILuGS1Nr1yM+w 6mxnSZF0jmArhbQ12aCbjoxbt55K46gRixVgIUSFB5ZftUAjbPqH7NB8BlWCTh+2h5SJPGpBM5o hYF3vP5Ftb+rI6XDlU5dXPHsN65/38W0G0SERHYhlt6JwWeo7P983JsWF6gGCQi0yG8oGlAz7yo G2GT7Fm3o60RSRTs27gLvcg/g2E4DnBnCkAoLN0wB7Il3p/p9neL/JHOI8PKD2gO1oY/7tKF6wd lzWnbAdRP2kkNwgxiMpSgV+hF5np1Zc51h2cJ4qSHHM5ASPWKc4ycb3OFUXrHsfIqo5cmdL/yv2 GJvsPvWSWeQtSNNEugsubE6fi1RqffRa1/7alTdYi6Cw6dNHjJZZVG6M6tWVbRRvBWHaAXpXM4w +3glrf6SleZoMa68+9TansJoH2nZ1CnxYf0TFbXC3KZZ/ua/XPMaO8TZk1cY1/yJxsU03J5ruH7 MVxWyF1mmHfLK6g== X-Developer-Key: i=david@ixit.cz; a=openpgp; fpr=D77A09CFEEDC2BBD53A7047460023FC4D3492072 X-Endpoint-Received: by B4 Relay for david@ixit.cz/default with auth_id=355 X-Original-From: David Heidelberg Reply-To: david@ixit.cz From: Gergo Koteles ABS_SND_PROFILE used to describe the state of a multi-value sound profile switch. This will be used for the alert-slider on OnePlus phones or other phones. Profile values added as SND_PROFLE_(SILENT|VIBRATE|RING) identifiers to input-event-codes.h so they can be used from DTS. Signed-off-by: Gergo Koteles Signed-off-by: David Heidelberg --- Documentation/input/event-codes.rst | 6 ++++++ drivers/hid/hid-debug.c | 1 + include/uapi/linux/input-event-codes.h | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/Documentation/input/event-codes.rst b/Documentation/input/even= t-codes.rst index b4557462edd7b3fef9e9cd6c2c3cb2d05bb531ab..d43336e64d6aa4fe8a41b7e9947= f4f214df6e1ab 100644 --- a/Documentation/input/event-codes.rst +++ b/Documentation/input/event-codes.rst @@ -241,6 +241,12 @@ A few EV_ABS codes have special meanings: emitted only when the selected profile changes, indicating the newly selected profile value. =20 +* ABS_SND_PROFILE: + + - Used to describe the state of a multi-value sound profile switch. + An event is emitted only when the selected profile changes, + indicating the newly selected profile value. + * ABS_MT_: =20 - Used to describe multitouch input events. Please see diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 7107071c7c516af48c0c5fc1206c1e01bae3889f..c58500d8b94b581e41ae098d6ce= 99db7783986b7 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -3513,6 +3513,7 @@ static const char *absolutes[ABS_CNT] =3D { [ABS_DISTANCE] =3D "Distance", [ABS_TILT_X] =3D "XTilt", [ABS_TILT_Y] =3D "YTilt", [ABS_TOOL_WIDTH] =3D "ToolWidth", [ABS_VOLUME] =3D "Volume", [ABS_PROFILE] =3D "Profile", + [ABS_SND_PROFILE] =3D "SoundProfile", [ABS_MISC] =3D "Misc", [ABS_MT_SLOT] =3D "MTSlot", [ABS_MT_TOUCH_MAJOR] =3D "MTMajor", diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/in= put-event-codes.h index 08cb157ab59364a41ac425fc9a4ea8eb2fae0e86..f443f61f9bb8e3c212da522d9b9= 9a386a13c4475 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -875,6 +875,7 @@ =20 #define ABS_VOLUME 0x20 #define ABS_PROFILE 0x21 +#define ABS_SND_PROFILE 0x22 =20 #define ABS_MISC 0x28 =20 @@ -984,4 +985,12 @@ #define SND_MAX 0x07 #define SND_CNT (SND_MAX+1) =20 +/* + * ABS_SND_PROFILE values + */ + +#define SND_PROFILE_SILENT 0x00 +#define SND_PROFILE_VIBRATE 0x01 +#define SND_PROFILE_RING 0x02 + #endif --=20 2.50.1 From nobody Sun Oct 5 16:20:37 2025 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 C12D7202962; Thu, 31 Jul 2025 21:17:03 +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=1753996623; cv=none; b=pK1MYzhU/Z1YWlsLp4BOWBK0Q8WWl5nl7n0pBfu3vuY1ybJF4htBtzsMMiMk8PTMl3VcorLDhohGzd6pytnQ/A6GCC/z8cGd88FiUBHBgJ621+S2+SsTGss2AChYumPg+8TGXW0pcIJx6Kv4dbP/GLUaAvyNbZ/2k0jNmwvE4ds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753996623; c=relaxed/simple; bh=1ixpZp7CIxilpaIq5f9PmB4aAh7XXulplpDrhLfLjfo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EglsyYj74wPTY3urgQW5t7pR1WYacx4p5kkFhasMnrliEYTt5iLwSE6U1PRlJFnXLosnMR2G5lxKuKArYs8uj2pnhPARQLmGNRe7BenaZMv2/63SSrWQK+Uf0pNWv92GSH67PVhjGc00HaQkH/5mO/dfJ9v6xLoBPQc0tyhdrmk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a2dccOxl; 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="a2dccOxl" Received: by smtp.kernel.org (Postfix) with ESMTPS id 58BBBC4CEF4; Thu, 31 Jul 2025 21:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753996623; bh=1ixpZp7CIxilpaIq5f9PmB4aAh7XXulplpDrhLfLjfo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=a2dccOxlVIGuvBGIyxKy2f29u3rwfovcnOikXMEQ2S/sNHcJmslsyYxKPZUSAZCYP o/t1LvpndYf1aSGzq3RAcJWWO+pUtf+LiushnMfBuW/qyQcdU/Xenl3xBbMv5z1dW/ R+tuK9xbjKiS7vBypm+vOPbcJMmYaxh+JA/4iZszSZi7M0aQWhXdHJ9BcESZF5WO/t LSZw690QGtSXb8LG7GTEuu3glyh8c+/pfGSBCO+RS/G2qjps3rWqKBD+MDPuIsqe+7 H3ceYN/bgLizvypMoKM53ToPJbvxtYWAnMd1Vshs3BjpoUVzDpm5TRAUgGWxTTijpl b1EtX7ZNtTZhQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD9FC87FD2; Thu, 31 Jul 2025 21:17:03 +0000 (UTC) From: David Heidelberg via B4 Relay Date: Thu, 31 Jul 2025 23:17:02 +0200 Subject: [PATCH v6 2/2] arm64: dts: qcom: sdm845-oneplus: Add alert-slider Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250731-op6-tri-state-v6-2-569c25cbc8c2@ixit.cz> References: <20250731-op6-tri-state-v6-0-569c25cbc8c2@ixit.cz> In-Reply-To: <20250731-op6-tri-state-v6-0-569c25cbc8c2@ixit.cz> To: Dmitry Torokhov , Jonathan Corbet , Jiri Kosina , Benjamin Tissoires , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-input@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Gergo Koteles , Casey Connolly , David Heidelberg , Konrad Dybcio X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2333; i=david@ixit.cz; h=from:subject:message-id; bh=DXHdtGfW2ujmBmU5jNstKdQ/ztd3ylHZnqWhAQYlHgI=; b=owEBbQKS/ZANAwAIAWACP8TTSSByAcsmYgBoi91NRxOGFBofJhr/R5Qdt2mdrdvgOYd4CdEY/ uWPxnDvh4OJAjMEAAEIAB0WIQTXegnP7twrvVOnBHRgAj/E00kgcgUCaIvdTQAKCRBgAj/E00kg cszzEADJPC237t0NxPire+2qZzcPXxWYcO+wmI15gTOVT6+wrSM23ipHcqO5jaIr1QgFY40i0Pw uPSgd3MFV3+u9K+FcYFzyuOkQZkXv5XD+YKZE/D3kXDUtAvEWZzj5Nt0nJGVWAKApTTqP9JdIa2 Jdwz54VuKl4567SLe7fJsddZ68UH7cpsp5Q0yUMQtjvJ//I4a8dOaiNG1KnB+vI2iElRkRBFL5E bt5I6b5fnQKG1b+fg8ZeN7gUg70vRTl4oEk8dxwJnfogSJ4b9kNuHnfR39ku26Dssls3CIbsaq1 u0cwdNRwfINl5xs93JiwrWE6jJNy4Vz5hLvOwc29SXBrKHAj+g8T4SAX3PUZM9mAq9klUss6yED uLa0mT7ni6OZ2jiKAMVNJ5X5goM0T+7ZxwE4GaLwO7bdEEPDkmksB5l+7vUHonRAJpebdisiOCj sZ54XzIFMtXCq4aYoy0MM2NVSpPITVlZNqYrq9p4Jko65xRp57tAUYfOD1AYLHpM7dP1oLlpwVP UF/66IcCB60tKcLLshWhHayu5d1XP9V9TK5ckGFahSmhEZKHa52G58HHceZEWsbXYQI1ZlF+0f+ 5ogFenEmvZzgy4KIhaqafM/gZQytYAD1WYct4b00z7hWrtjZNGg0yLTIIgE/zRkp1ILarCDBepu V/UDPYponoAfzZA== X-Developer-Key: i=david@ixit.cz; a=openpgp; fpr=D77A09CFEEDC2BBD53A7047460023FC4D3492072 X-Endpoint-Received: by B4 Relay for david@ixit.cz/default with auth_id=355 X-Original-From: David Heidelberg Reply-To: david@ixit.cz From: Gergo Koteles The alert-slider is a tri-state sound profile switch found on the OnePlus 6, Android maps the states to "silent", "vibrate" and "ring". Expose them as ABS_SND_PROFILE events. The previous GPIO numbers were wrong. Update them to the correct ones. Co-developed-by: Casey Connolly Signed-off-by: Casey Connolly Signed-off-by: Gergo Koteles Reviewed-by: Konrad Dybcio Signed-off-by: David Heidelberg --- .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 39 ++++++++++++++++++= ++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm= 64/boot/dts/qcom/sdm845-oneplus-common.dtsi index b118d666e535a433f44b66c71b36e55df2ce5c80..242c78828992f9fbb384b690352= 660a496b22411 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -21,6 +21,41 @@ /delete-node/ &rmtfs_mem; =20 / { + alert-slider { + compatible =3D "gpio-keys"; + label =3D "Alert slider"; + + pinctrl-0 =3D <&alert_slider_default>; + pinctrl-names =3D "default"; + + switch-top { + label =3D "Silent"; + linux,input-type =3D ; + linux,code =3D ; + linux,input-value =3D ; + gpios =3D <&tlmm 126 GPIO_ACTIVE_LOW>; + linux,can-disable; + }; + + switch-middle { + label =3D "Vibrate"; + linux,input-type =3D ; + linux,code =3D ; + linux,input-value =3D ; + gpios =3D <&tlmm 52 GPIO_ACTIVE_LOW>; + linux,can-disable; + }; + + switch-bottom { + label =3D "Ring"; + linux,input-type =3D ; + linux,code =3D ; + linux,input-value =3D ; + gpios =3D <&tlmm 24 GPIO_ACTIVE_LOW>; + linux,can-disable; + }; + }; + aliases { serial0 =3D &uart9; serial1 =3D &uart6; @@ -799,8 +834,8 @@ hall_sensor_default: hall-sensor-default-state { bias-disable; }; =20 - tri_state_key_default: tri-state-key-default-state { - pins =3D "gpio40", "gpio42", "gpio26"; + alert_slider_default: alert-slider-default-state { + pins =3D "gpio126", "gpio52", "gpio24"; function =3D "gpio"; drive-strength =3D <2>; bias-disable; --=20 2.50.1