diff --git a/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-retroidpocket-rp6.dts b/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-retroidpocket-rp6.dts index f6a69da959..0de356ca87 100644 --- a/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-retroidpocket-rp6.dts +++ b/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-retroidpocket-rp6.dts @@ -127,6 +127,10 @@ }; }; +&gamepad { + axis-range = <1024>; +}; + &mdss_dsi0 { vdda-supply = <&vreg_l3e_1p2>; status = "okay"; diff --git a/projects/ROCKNIX/devices/SM8550/patches/linux/0031_input--Add-driver-for-RSInput-Gamepad.patch b/projects/ROCKNIX/devices/SM8550/patches/linux/0031_input--Add-driver-for-RSInput-Gamepad.patch index 0b95ab63d6..788a971993 100644 --- a/projects/ROCKNIX/devices/SM8550/patches/linux/0031_input--Add-driver-for-RSInput-Gamepad.patch +++ b/projects/ROCKNIX/devices/SM8550/patches/linux/0031_input--Add-driver-for-RSInput-Gamepad.patch @@ -42,7 +42,7 @@ new file mode 100644 index 000000000000..913c499ad30a --- /dev/null +++ b/drivers/input/joystick/rsinput.c -@@ -0,0 +1,563 @@ +@@ -0,0 +1,578 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * RSInput Gamepad Driver @@ -464,6 +464,22 @@ index 000000000000..913c499ad30a + drv->invert_rx = device_property_present(&serdev->dev, "invert-rx"); + drv->invert_ry = device_property_present(&serdev->dev, "invert-ry"); + ++ { ++ u32 range; ++ if (!device_property_read_u32(&serdev->dev, "axis-range", &range)) { ++ axis_leftx_min = -range; ++ axis_leftx_max = range; ++ axis_lefty_min = -range; ++ axis_lefty_max = range; ++ axis_rightx_min = -range; ++ axis_rightx_max = range; ++ axis_righty_min = -range; ++ axis_righty_max = range; ++ ++ dev_info(&serdev->dev, "DT axis-range override applied: ±%u\n", range); ++ } ++ } ++ + drv->vdd = devm_regulator_get(&serdev->dev, "vdd"); + if (IS_ERR(drv->vdd)) { + error = PTR_ERR(drv->vdd);