[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <229fb5b2-34c9-402b-9812-f91e6cc31c57@quicinc.com>
Date: Thu, 11 Apr 2024 14:58:18 +0800
From: Fenglin Wu <quic_fenglinw@...cinc.com>
To: Konrad Dybcio <konrad.dybcio@...aro.org>, <kernel@...cinc.com>,
Andy Gross
<agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Dmitry Torokhov
<dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
"Krzysztof
Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
Dmitry Baryshkov
<dmitry.baryshkov@...aro.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-input@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
Subject: Re: [PATCH v8 3/3] input: pm8xxx-vibrator: add new SPMI vibrator
support
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.
Powered by blists - more mailing lists