From: Luca Weiss <luca@z3ntu.xyz>
To: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Sebastian Reichel <sre@kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Brian Masney <masneyb@onstation.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 4/4] ARM: dts: qcom: msm8974-hammerhead: Add vibrator
Date: Tue, 02 May 2023 17:28:53 +0200 [thread overview]
Message-ID: <112204300.nniJfEyVGO@z3ntu.xyz> (raw)
In-Reply-To: <fc22fd34-6cce-c175-d845-cf4435b4b0be@linaro.org>
On Dienstag, 2. Mai 2023 12:40:40 CEST Konrad Dybcio wrote:
> On 27.04.2023 22:34, Luca Weiss wrote:
> > The Nexus 5 has a vibrator connected to the clock output of GP1_CLK
> > which we can use with the clk-pwm driver, then we can use that pwm with
> > pwm-vibrator to get haptics functionality.
> >
> > This patch is based on Brian Masney's previous patch with clk-vibrator.
> >
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> >
> > .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 35
> > ++++++++++++++++++++++ 1 file changed, 35 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
> > b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts index
> > ab35f2d644c0..fea8a6be9021 100644
> > --- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
> > +++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
> > @@ -41,6 +41,25 @@ key-volume-down {
> >
> > };
> >
> > };
> >
> > + clk_pwm: pwm {
> > + compatible = "clk-pwm";
> > + clocks = <&mmcc CAMSS_GP1_CLK>;
>
> Are you sure it's <&mmcc CAMSS_GP1_CLK> and not <&gcc GCC_GP1_CLK>?
Quite sure.
The driver uses:
cam_gp1_clk = clk_get(&pdev->dev, "cam_gp1_clk");
and this comes from the clock-8974.c driver
CLK_LOOKUP("cam_gp1_clk", camss_gp1_clk.c, "vibrator"),
Regards
Luca
>
> Konrad
>
> > +
> > + pinctrl-0 = <&vibrator_pin>;
> > + pinctrl-names = "default";
> > +
> > + #pwm-cells = <2>;
> > + };
> > +
> > + vibrator {
> > + compatible = "pwm-vibrator";
> > + pwms = <&clk_pwm 0 100000>;
> > + pwm-names = "enable";
> > +
> > + vcc-supply = <&pm8941_l19>;
> > + enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
> > + };
> > +
> >
> > vreg_wlan: wlan-regulator {
> >
> > compatible = "regulator-fixed";
> >
> > @@ -637,6 +656,22 @@ shutdown-pins {
> >
> > function = "gpio";
> >
> > };
> >
> > };
> >
> > +
> > + vibrator_pin: vibrator-state {
> > + core-pins {
> > + pins = "gpio27";
> > + function = "gp1_clk";
> > + drive-strength = <6>;
> > + bias-disable;
> > + };
> > +
> > + enable-pins {
> > + pins = "gpio60";
> > + function = "gpio";
> > + drive-strength = <2>;
> > + bias-disable;
> > + };
> > + };
> >
> > };
> >
> > &usb {
next prev parent reply other threads:[~2023-05-02 15:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 20:34 [PATCH 0/4] Add haptics support to Nexus 5 using pwm-vibra driver Luca Weiss
2023-04-27 20:34 ` [PATCH 1/4] dt-bindings: input: pwm-vibrator: Add enable-gpio Luca Weiss
2023-04-27 23:29 ` Brian Masney
2023-04-28 10:10 ` Caleb Connolly
2023-04-29 19:44 ` Sebastian Reichel
2023-05-01 6:48 ` Krzysztof Kozlowski
2023-04-27 20:34 ` [PATCH 2/4] Input: pwm-vibra - add newline to dev_err prints Luca Weiss
2023-04-27 23:30 ` Brian Masney
2023-04-28 10:10 ` Caleb Connolly
2023-04-29 19:45 ` Sebastian Reichel
2023-04-27 20:34 ` [PATCH 3/4] Input: pwm-vibra - add support for enable GPIO Luca Weiss
2023-04-27 23:29 ` Brian Masney
2023-04-28 16:06 ` Luca Weiss
2023-04-28 16:11 ` Brian Masney
2023-05-02 10:39 ` Konrad Dybcio
2023-05-02 15:24 ` Luca Weiss
2023-04-28 10:11 ` Caleb Connolly
2023-04-29 19:47 ` Sebastian Reichel
2023-05-02 0:47 ` Dmitry Torokhov
2023-05-02 15:35 ` Luca Weiss
2023-04-27 20:34 ` [PATCH 4/4] ARM: dts: qcom: msm8974-hammerhead: Add vibrator Luca Weiss
2023-04-27 23:34 ` Brian Masney
2023-04-28 10:11 ` Caleb Connolly
2023-05-02 10:40 ` Konrad Dybcio
2023-05-02 15:28 ` Luca Weiss [this message]
2023-05-02 15:31 ` Konrad Dybcio
2023-05-08 16:44 ` [PATCH 0/4] Add haptics support to Nexus 5 using pwm-vibra driver Dmitry Torokhov
2023-05-25 4:54 ` (subset) " Bjorn Andersson
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=112204300.nniJfEyVGO@z3ntu.xyz \
--to=luca@z3ntu.xyz \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masneyb@onstation.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).