Message ID | 20240725-qx1050-feature-expansion-v2-1-5fac4bbd946f@riseup.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | F(x)tec Pro1X feature expansion | expand |
On 25.07.2024 3:42 AM, Dang Huynh wrote: > The Pro1X has a flip keyboard and a single-state camera button. > > Signed-off-by: Dang Huynh <danct12@riseup.net> > --- [...] > > &tlmm { > gpio-reserved-ranges = <0 4>, <14 4>; > + > + hall_sensor_n: hall-sensor-n { These must end in -state to pass binding checks (also in other patches) Also, https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-nodes suggests to sort these nodes by gpio number Konrad
On 25/07/2024 03:42, Dang Huynh wrote: > The Pro1X has a flip keyboard and a single-state camera button. > > Signed-off-by: Dang Huynh <danct12@riseup.net> > --- > arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 34 +++++++++++++++++++++++-- > 1 file changed, 32 insertions(+), 2 deletions(-) > It does not look like you tested the DTS against bindings. Please run `make dtbs_check W=1` (see Documentation/devicetree/bindings/writing-schema.rst or https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/ for instructions). Best regards, Krzysztof
diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts index 4a30024aa48f..3eecdc76bcac 100644 --- a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (c) 2023, Dang Huynh <danct12@riseup.net> + * Copyright (c) 2023 - 2024, Dang Huynh <danct12@riseup.net> */ /dts-v1/; @@ -35,9 +35,25 @@ framebuffer0: framebuffer@5c000000 { gpio-keys { compatible = "gpio-keys"; - pinctrl-0 = <&vol_up_n>; + pinctrl-0 = <&hall_sensor_n>, <&key_camera_n>, <&vol_up_n>; pinctrl-names = "default"; + hall-switch { + label = "Hall Switch"; + linux,input-type = <EV_SW>; + linux,code = <SW_KEYPAD_SLIDE>; + gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + debounce-interval = <90>; + wakeup-source; + }; + + key-camera { + label = "Camera Button"; + linux,code = <KEY_CAMERA>; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + debounce-interval = <15>; + }; + key-volume-up { label = "Volume Up"; linux,code = <KEY_VOLUMEUP>; @@ -212,6 +228,20 @@ &sleep_clk { &tlmm { gpio-reserved-ranges = <0 4>, <14 4>; + + hall_sensor_n: hall-sensor-n { + pins = "gpio96"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + key_camera_n: key-camera-n { + pins = "gpio18"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; }; &ufs_mem_hc {
The Pro1X has a flip keyboard and a single-state camera button. Signed-off-by: Dang Huynh <danct12@riseup.net> --- arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 34 +++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-)