OSDN Git Service

arm64: dts: qcom: msm8998-xperia: Add support for gpio vibrator
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Thu, 9 Sep 2021 12:37:30 +0000 (14:37 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 24 Sep 2021 23:25:23 +0000 (18:25 -0500)
All smartphones in the Sony Yoshino platforms have got a simple
vibrator hooked to a GPIO: add support for that and add its own
pin configuration.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210909123733.367248-4-angelogioacchino.delregno@somainline.org
arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi

index cfd61c3..798f2d8 100644 (file)
                        ecc-size = <16>;
                };
        };
+
+       vibrator {
+               compatible = "gpio-vibrator";
+               enable-gpios = <&pmi8998_gpio 5 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vib_default>;
+       };
 };
 
 &blsp1_i2c5 {
        };
 };
 
+&pmi8998_gpio {
+       vib_default: vib-en {
+               pins = "gpio5";
+               function = PMIC_GPIO_FUNC_NORMAL;
+               bias-disable;
+               drive-push-pull;
+               output-low;
+               qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+               power-source = <0>;
+       };
+};
+
 &pm8998_pon {
        resin {
                compatible = "qcom,pm8941-resin";