[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee4a8076-4db3-ae77-b837-3b14c37a7e6a@quicinc.com>
Date: Mon, 31 Jan 2022 10:44:47 -0800
From: Anjelique Melendez <quic_amelende@...cinc.com>
To: Stephen Boyd <swboyd@...omium.org>, <dmitry.torokhov@...il.com>
CC: <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>, <collinsd@...eaurora.org>,
<bjorn.andersson@...aro.org>, <skakit@...eaurora.org>
Subject: Re: [PATCH v2 2/4] input: misc: pm8941-pwrkey: add support for PON
GEN3 base addresses
On 1/27/2022 2:41 PM, Stephen Boyd wrote:
> Quoting Anjelique Melendez (2022-01-27 13:00:25)
>> diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
>> index e0240db12d4f..7005aede4f81 100644
>> --- a/drivers/input/misc/pm8941-pwrkey.c
>> +++ b/drivers/input/misc/pm8941-pwrkey.c
>> @@ -200,15 +207,21 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev)
>> dev_err(&pdev->dev, "failed to locate regmap\n");
>> return -ENODEV;
>> }
>> + }
>>
>> - error = of_property_read_u32(parent->of_node,
>> - "reg", &pwrkey->baseaddr);
>> - } else {
>> - error = of_property_read_u32(pdev->dev.of_node, "reg",
>> - &pwrkey->baseaddr);
>> + addr = of_get_address(regmap_node, 0, NULL, NULL);
>> + if (!addr) {
>> + dev_err(&pdev->dev, "reg property missing\n");
>> + return -EINVAL;
>> + }
>> + pwrkey->baseaddr = be32_to_cpu(*addr);
> Isn't this supposed to be be32_to_cpup(addr)?
ah yes! Will update in v3!
>
>> +
>> + if (pwrkey->data->has_pon_pbs) {
>> + /* PON_PBS base address is optional */
>> + addr = of_get_address(regmap_node, 1, NULL, NULL);
>> + if (addr)
>> + pwrkey->pon_pbs_baseaddr = be32_to_cpu(*addr);
> Isn't this supposed to be be32_to_cpup(addr)?
Ack
>
>> }
>> - if (error)
>> - return error;
>>
>> pwrkey->irq = platform_get_irq(pdev, 0);
>> if (pwrkey->irq < 0)
Powered by blists - more mailing lists