All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Fenglin Wu" <quic_fenglinw@quicinc.com>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <robh+dt@kernel.org>,
	<agross@kernel.org>, <andersson@kernel.org>,
	<dmitry.baryshkov@linaro.org>
Cc: <quic_collinsd@quicinc.com>, <quic_subbaram@quicinc.com>,
	<quic_kamalw@quicinc.com>, <jestar@qti.qualcomm.com>
Subject: Re: [PATCH v4 0/3] Add support for vibrator in multiple PMICs
Date: Mon, 14 Aug 2023 09:43:02 +0200	[thread overview]
Message-ID: <CUS3KXRIND5J.VSB0PVWXZ4DO@otso> (raw)
In-Reply-To: <20230731053712.2220898-1-quic_fenglinw@quicinc.com>

Hi Fenglin,

On Mon Jul 31, 2023 at 7:37 AM CEST, Fenglin Wu wrote:
> Add SW support for the vibrator module inside PMI632, PM7250B, PM7325B, PM7550BA.
> It is very similar to the vibrator module inside PM8916 which is supported in
> pm8xxx-vib driver but just the drive amplitude is controlled with 2 registers,
> and the register base offset in each PMIC is different.

Briefly tested on a SDM632+PMI632-based Fairphone 3.

I didn't really check for vibration strength or anything more detailed
but with the fftest tool the vibrator seems to work fine!

Diff is attached below. I can send the pmi632.dtsi change once this
series is merged (unless you send something first).

Many thanks for sending these patches!

Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3 (pmi632)

Regards
Luca


diff --git a/arch/arm64/boot/dts/qcom/pmi632.dtsi b/arch/arm64/boot/dts/qcom/pmi632.dtsi
index 4eb79e0ce40a..41ef7dad508e 100644
--- a/arch/arm64/boot/dts/qcom/pmi632.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi632.dtsi
@@ -161,5 +161,11 @@ pmi632_lpg: pwm {
 
 			status = "disabled";
 		};
+
+		pmi632_vib: vibrator@5700 {
+			compatible = "qcom,pmi632-vib", "qcom,spmi-vib-gen2";
+			reg = <0x5700>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
index 301eca9a4f31..0d89bc39f613 100644
--- a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
+++ b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts
@@ -112,6 +112,10 @@ led@3 {
 	};
 };
 
+&pmi632_vib {
+	status = "okay";
+};
+
 &sdhc_1 {
 	status = "okay";
 	vmmc-supply = <&pm8953_l8>;

> Changes in v4:
>   1. Update to use the combination of the HW type and register offset
>      as the constant match data, the register base address defined in
>      'reg' property will be added when accessing SPMI registers using
>      regmap APIs.
>   2. Remove 'qcom,spmi-vib-gen1' generic compatible string.
>
> Changes in v3:
>   1. Refactor the driver to support different type of the vibrators with
>     better flexibility by introducing the HW type with corresponding
>     register fields definitions.
>   2. Add 'qcom,spmi-vib-gen1' and 'qcom,spmi-vib-gen2' compatible
>     strings, and add PMI632, PM7250B, PM7325B, PM7550BA as compatbile as
>     spmi-vib-gen2.
>  
> Changes in v2:
>   Remove the "pm7550ba-vib" compatible string as it's compatible with pm7325b.
>
> Fenglin Wu (3):
>   input: pm8xxx-vib: refactor to easily support new SPMI vibrator
>   dt-bindings: input: qcom,pm8xxx-vib: add new SPMI vibrator module
>   input: pm8xxx-vibrator: add new SPMI vibrator support
>
>  .../bindings/input/qcom,pm8xxx-vib.yaml       |  16 +-
>  drivers/input/misc/pm8xxx-vibrator.c          | 171 ++++++++++++------
>  2 files changed, 132 insertions(+), 55 deletions(-)


      parent reply	other threads:[~2023-08-14  7:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31  5:37 [PATCH v4 0/3] Add support for vibrator in multiple PMICs Fenglin Wu
2023-07-31  5:37 ` [PATCH v4 1/3] input: pm8xxx-vib: refactor to easily support new SPMI vibrator Fenglin Wu
2023-07-31  5:37 ` [PATCH v4 2/3] dt-bindings: input: qcom,pm8xxx-vib: add new SPMI vibrator module Fenglin Wu
2023-08-11 17:41   ` Rob Herring
2023-08-14 10:06   ` Krzysztof Kozlowski
2023-08-15  2:20     ` Fenglin Wu
2023-08-15  5:10       ` Krzysztof Kozlowski
2023-07-31  5:37 ` [PATCH v4 3/3] input: pm8xxx-vibrator: add new SPMI vibrator support Fenglin Wu
2023-08-14 10:07   ` Krzysztof Kozlowski
2023-08-14  7:43 ` Luca Weiss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CUS3KXRIND5J.VSB0PVWXZ4DO@otso \
    --to=luca.weiss@fairphone.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=jestar@qti.qualcomm.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_collinsd@quicinc.com \
    --cc=quic_fenglinw@quicinc.com \
    --cc=quic_kamalw@quicinc.com \
    --cc=quic_subbaram@quicinc.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.