Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5085716pxb; Sun, 6 Feb 2022 13:13:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhYgTceOWFyjUGlAbEKVLWdVCAZaXMhU01f+YafaCfUQ7XVdeYymsejxCwcELpCHkgbcto X-Received: by 2002:a63:6c87:: with SMTP id h129mr7214100pgc.530.1644182020036; Sun, 06 Feb 2022 13:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644182020; cv=none; d=google.com; s=arc-20160816; b=DU8XafuOLF3dOlTBnBTEiLEwDwgmY/lC6bdBnmjJ+JwyY0FktCSFT2AvMDcTdXrevq Dx9Bc4uhaVvXVon1m+1UBSRJ+UlLdVzWVZVl3u7VSMcIjsv4KVvVc1wb1lU75NOF5WCl uIhQuk4T/wFgnPaz/FFV8Jmb4PiWqwdVxAZCzp0CP3nAv+14/lu7U94k7qWNbQmpC6UH 9ZB6BgXR/1WQi7kWl91zDBuprv4XtSzX0xEBoZ0ZCXibX4hVKBNnx8nk/5VzGAEv0AwJ fFadN23EgBv2LJ9qA+gPoEs3+08xYj1fyIRAlWBJLgbYiIyR2JPdxWEdDl/2auc5STuC BJtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=QNQNR8pSD+bvmM7QVunNiubutry5FOQGRyE/RWkBNGQ=; b=bO4NCD35qDjrCDBpik0DC/Pchzicrfk+D3Of0locV3Jmlc1rVlLVsHGiJSKKDzHGwm m4oVii8eMVoEJ5RqXeoikrSMuQd+Xs0T9Bep54KS3ZujR97QlQLQGGjQojGIZCwailOd 1FshhO64cXsLb6PPmPaAe/mYFI0rkDgvkI3b9C/wCsc3It7JplbM7mKK7o1HP3fAeCUA zeoY2/njnvtfsS72JAtsCRa953LubrX54lEdvBhI67ofrXEHe0BTMYzDFO0fMevA2y6R 7lVwccQdiG1fuglSGPtYcWacZqERZT52Fju2o5YFmu43N6qRv+EPz3a/SmdcX1MDM2Bd 6Otg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=RTcirssT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r142si7811557pgr.622.2022.02.06.13.13.26; Sun, 06 Feb 2022 13:13:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=RTcirssT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377498AbiBDSVA (ORCPT + 99 others); Fri, 4 Feb 2022 13:21:00 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:12986 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234002AbiBDSU7 (ORCPT ); Fri, 4 Feb 2022 13:20:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1643998859; x=1675534859; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=QNQNR8pSD+bvmM7QVunNiubutry5FOQGRyE/RWkBNGQ=; b=RTcirssTTj+yIsmm6lDPWOtmS7Qyx7Q/dq4qMCCKmdpPumLLwiSS4Dqr 3S4f4iRJ6uLfwM2dbWYd2sJiSRLfGmyOMEghw4IRGGUZjEUaYRNZUfIZ8 jXOmLYkrMHeVnN4o463mB91hhKdXDL4xeK8OxeaTXVINfnRbTKcXb9NgB c=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 04 Feb 2022 10:20:59 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 10:20:58 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Fri, 4 Feb 2022 10:20:58 -0800 Received: from [10.110.74.239] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Fri, 4 Feb 2022 10:20:58 -0800 Message-ID: <8ccb18ce-5d86-47dd-dec1-8fc1c27dcba1@quicinc.com> Date: Fri, 4 Feb 2022 10:20:57 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3 2/4] input: misc: pm8941-pwrkey: add support for PON GEN3 base addresses Content-Language: en-US To: Stephen Boyd , CC: , , , , , References: <20220203010804.20883-2-quic_amelende@quicinc.com> <20220203010804.20883-3-quic_amelende@quicinc.com> From: Anjelique Melendez In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/2022 1:16 PM, Stephen Boyd wrote: > Quoting Anjelique Melendez (2022-02-02 17:08:05) >> diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c >> index e0240db12d4f..2a42a676b021 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_cpup(*addr); >> + >> + 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_cpup(*addr); > > With the deref dropped. > > Reviewed-by: Stephen Boyd ACK