Linux Input Archive mirror
 help / color / mirror / Atom feed
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:58:18 +0800	[thread overview]
Message-ID: <229fb5b2-34c9-402b-9812-f91e6cc31c57@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:
> 
> 
>> +    if (regs->drv2_mask) {
>> +        if (on)
>> +            val = (vib->level << regs->drv2_shift) & regs->drv2_mask;
>> +        else
>> +            val = 0;
>> +        rc = regmap_write(vib->regmap, vib->drv2_addr, val);
> 
> Are you purposefuly zeroing out the other bits?
> 
> If yes, consider regmap_write_bits here
> If not, consider regmap_update_bits here
> 
>> +        if (rc < 0)
>> +            return rc;
> 
> Ignore regmap_r/w errors, these mean a complete failure of the API and
> we don't generally assume MMIO accesses can fail
> 
> Unless SPMI is known to have issues here
> 
Sorry, forgot to reply on this comment. Yes, SPMI transaction would fail 
(even with very low odds) on some boards if the layout of SPMI lines is 
not good enough. I'd like to keep the consistence since the whole driver 
also checks the regmap_r/w errors.



      parent reply	other threads:[~2024-04-11  6:58 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
2024-04-11  6:58     ` Fenglin Wu [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=229fb5b2-34c9-402b-9812-f91e6cc31c57@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).