lkml.org 
[lkml]   [2024]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 3/3] input: pm8xxx-vibrator: add new SPMI vibrator support
From
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.



\
 
 \ /
  Last update: 2024-05-27 16:35    [W:0.069 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site