Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2992467pxb; Thu, 3 Feb 2022 21:20:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+VIA4XQgM/DYmm/Ardh9qAgYrYyr9e8uU/1AyuRKklv/T7N7h9pExLBZHfwg4TeXogh+H X-Received: by 2002:a17:90b:4f43:: with SMTP id pj3mr1300728pjb.168.1643952034368; Thu, 03 Feb 2022 21:20:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643952034; cv=none; d=google.com; s=arc-20160816; b=mTLq0npkgpCnuIaEg96TpGGBeW07/uD2q6RDNXWTjiRgunoE5LlhLB5BLepmdr1rxy LSJIn7TI9+IIG4nM8V17joKNHKdupuwfFWvc2YKwle+dsGupl5XYaNoWfyNe/IrQzYnP jEj9/IGiheqbxpQ7oMbggC5ya4KgQaO63epA4fgXl6DJGTpyDjZ5opoa9iex4IyEoLFS RDd5u0emBum0GJSjVfhjV1hPssZhqVbv/geiZ/JU9r2zd1JYpTxxxlFS76RQ9rArDJbC LMkDVDiv2J1Mavp80qSqH51DtulXgMcWTe3ZlhACnvuxnVyZ0PElZBYCnmxpzKWE9699 u9Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=zSzejEssgOdNs4rfva4sRaZfTKtrXGdpO9wn9P5yFPE=; b=JlBGUK+BZPNYL9WkyGkwyf9/K9bwAlNziRXEkZkVrc/PWHNeguJwLTVBED/NrqS3pz 7FBeHYLpzcgovdQ1jDGMa0RO7T5QR54ytwrhl2XH63M8kT1DQu23vKL9eYgeU3/BB9H5 ZlGwuEi/UUPtgWtRYPugEBzR5R49xrNN3I0YTp+FE+4+jVDUfqIuTH6GQxmRujQxvLlF quhkyh01Xi16aopHGujFfjLNc7JldHmj2+4uf+BO1RacnoiBxy5QyYmuf/HDXQr0xZ78 cf2gSXnl1jjCeoBF86ulygJjunX0USulJJOnHrf+sPbn0M6V/LbGpefxbGwlaw1ONoPy lAHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MwGOUZWh; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6si866792pgc.485.2022.02.03.21.20.14; Thu, 03 Feb 2022 21:20:34 -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=@chromium.org header.s=google header.b=MwGOUZWh; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354538AbiBCVQ6 (ORCPT + 99 others); Thu, 3 Feb 2022 16:16:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348776AbiBCVQ5 (ORCPT ); Thu, 3 Feb 2022 16:16:57 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A6D8C06173E for ; Thu, 3 Feb 2022 13:16:57 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id t199so6056399oie.10 for ; Thu, 03 Feb 2022 13:16:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=zSzejEssgOdNs4rfva4sRaZfTKtrXGdpO9wn9P5yFPE=; b=MwGOUZWh//pgE0O2Azb1GhqEJrO/J6MovToSHD8MCOOJDKupVk3C32wVyBw8jo9Vyc M+cvOX593h8WNzUtQOmKZiAoKxthoBbXvtS6+E6ENIVRcWbVRs9vBskKMVISmZHxWPG5 cK91/VOTu2i+F4RylsflgHa25uNq1gd8LwbIM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=zSzejEssgOdNs4rfva4sRaZfTKtrXGdpO9wn9P5yFPE=; b=Nz779ivqjVT+WPiWdwWtNYhVTU5DOJJm8sIlvadFYQeCz6LIppkBQovv7WSajIP8qv /zgOpVtYFBAKdKOYpCQtbsl1Vel4fF7QuR8YW6/v8Cj5xo3heP3Q4EL/5wdfQS3yUO/U jyfBwd+4f3r6NQ37AgOA4ubK3vb93pRU7n80tvExrsN14MQ5R7Ijb0twwWL+3cHyD0cR 1hm0ZGpRh3IuGC5gblsXaElqHPI7rFFlrwdq5BmZKMpDTsU5B9PwifR/0fafSYCIRdkp I5TXihLJ4vbYZ5zZ4gzJtXU+AnV3zBS7pQHym5t0A3/UyEVIDdrzBRMzqjf2fgUoyfGp XYYA== X-Gm-Message-State: AOAM532WtM91uw1msjo3AKBtPVGI+181DRdbcd+E0Fsu6/YdIhURVXNW acBri/FDX/XbzAdOLmPypxjR5KWxiU2+hc/hi000RQ== X-Received: by 2002:a05:6808:190f:: with SMTP id bf15mr8683791oib.40.1643923016742; Thu, 03 Feb 2022 13:16:56 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 3 Feb 2022 21:16:56 +0000 MIME-Version: 1.0 In-Reply-To: <20220203010804.20883-3-quic_amelende@quicinc.com> References: <20220203010804.20883-2-quic_amelende@quicinc.com> <20220203010804.20883-3-quic_amelende@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Thu, 3 Feb 2022 21:16:56 +0000 Message-ID: Subject: Re: [PATCH v3 2/4] input: misc: pm8941-pwrkey: add support for PON GEN3 base addresses To: Anjelique Melendez , dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, collinsd@codeaurora.org, bjorn.andersson@linaro.org, skakit@codeaurora.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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