[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36e3719d-ef38-5209-2cd4-7de88257474d@quicinc.com>
Date: Mon, 25 Sep 2023 10:52:12 +0800
From: Fenglin Wu <quic_fenglinw@...cinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <robh+dt@...nel.org>,
<agross@...nel.org>, <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
<linux-input@...r.kernel.org>, <quic_collinsd@...cinc.com>,
<quic_subbaram@...cinc.com>, <quic_kamalw@...cinc.com>,
<jestar@....qualcomm.com>
Subject: Re: [RESEND PATCH v6 1/3] input: pm8xxx-vib: refactor to easily
support new SPMI vibrator
On 9/24/2023 3:05 AM, Dmitry Baryshkov wrote:
>> +#define SSBL_VIB_DRV_REG 0x4A
> SSBI_VIB....
>
Thanks for catching the typo, I will fix it in next patch.
>> +#define SSBI_VIB_DRV_EN_MANUAL_MASK GENMASK(7, 2)
>> - /* operate in manual mode */
>> - error = regmap_read(vib->regmap, regs->drv_addr, &val);
>> - if (error < 0)
>> - return error;
>> + if (data->hw_type != SSBI_VIB) {
> You can drop this condition, if ssbi_vib_data.drv_addr is 0.
I am not sure if I understood this comment: 1st, ssbi_vib_data.drv_addr
is defined as a constant value 0x4A, so it would never be 0. 2nd, The
condition check here is to ignore reading the register base address for
SSBI_VIB HW, so we should do the check based on the HW type.
>
>> + error = fwnode_property_read_u32(pdev->dev.fwnode, "reg", ®_base);
>> + if (error < 0) {
>> + dev_err(&pdev->dev, "Failed to read reg address, rc=%d\n", error);
>> + return error;
>> + }
>> +
>> + vib->reg_base += reg_base;
Powered by blists - more mailing lists