lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89bc03c9-9545-4886-aec7-91c9926257b3@quicinc.com>
Date: Thu, 11 Apr 2024 14:41:13 +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:
> 
> 
>> -#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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ