From: Fenglin Wu <quic_fenglinw@quicinc.com>
To: Konrad Dybcio <konrad.dybcio@linaro.org>, <kernel@quicinc.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-input@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH v8 3/3] input: pm8xxx-vibrator: add new SPMI vibrator support
Date: Thu, 11 Apr 2024 14:41:13 +0800 [thread overview]
Message-ID: <89bc03c9-9545-4886-aec7-91c9926257b3@quicinc.com> (raw)
In-Reply-To: <3f8c970c-6a0d-4fc3-a2d3-e0797e7055cf@linaro.org>
Hi Konrad,
On 4/11/2024 2:10 AM, Konrad Dybcio wrote:
>
>
>> -#define VIB_MAX_LEVEL_mV (3100)
>> -#define VIB_MIN_LEVEL_mV (1200)
>> -#define VIB_MAX_LEVELS (VIB_MAX_LEVEL_mV - VIB_MIN_LEVEL_mV)
>> +#define VIB_MAX_LEVEL_mV(vib) (vib->drv2_addr ? (3544) : (3100))
>
> You shouldn't need the additional inside parentheses
>
> Also, is this really a good discriminator for the voltage ranges? Do *all*
> PMIC vibrators with a drv2_addr operate within this range? If not, consider
> a struct field here
>
Currently, yes, all PMIC vibrators with a drv2_addr (PMI632, PM7250B,
PM7325B, PM7550BA) operate within the same range because they are the
same type.
>
>> +#define VIB_MIN_LEVEL_mV(vib) (vib->drv2_addr ? (1504) : (1200))
>> +#define VIB_MAX_LEVELS(vib) (VIB_MAX_LEVEL_mV(vib) -
>> VIB_MIN_LEVEL_mV(vib))
>
> If the ranges are supposed to be inclusive, this is off-by-one. But looking
> at the driver, it seems like MIN_LEVEL may be "off"? I'm not sure though.
>
> Either way, this would be a separate fix.
> [...]
The voltage range [1504, 3544] for the new SPMI vibrator is inclusive. I
checked the voltage range [1200 3100] for PM8916 SPMI vibrator is also
inclusive. I couldn't find any document to confirm if the SSBI vibrator
but I assume it is the same as PM8916. I will make change before the
series to address it.
Thanks for reviewing the changes!
Fenglin
next prev parent reply other threads:[~2024-04-11 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 8:38 [PATCH v8 0/3] Add support for vibrator in multiple PMICs Fenglin Wu via B4 Relay
2024-04-01 8:38 ` [PATCH v8 1/3] input: pm8xxx-vibrator: refactor to support new SPMI vibrator Fenglin Wu via B4 Relay
2024-04-02 15:21 ` Konrad Dybcio
2024-04-03 5:29 ` Fenglin Wu
2024-04-01 8:38 ` [PATCH v8 2/3] dt-bindings: input: qcom,pm8xxx-vib: add new SPMI vibrator module Fenglin Wu via B4 Relay
2024-04-01 8:38 ` [PATCH v8 3/3] input: pm8xxx-vibrator: add new SPMI vibrator support Fenglin Wu via B4 Relay
2024-04-10 18:10 ` Konrad Dybcio
2024-04-11 6:41 ` Fenglin Wu [this message]
2024-04-11 6:58 ` Fenglin Wu
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=89bc03c9-9545-4886-aec7-91c9926257b3@quicinc.com \
--to=quic_fenglinw@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel@quicinc.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox