Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp900347pxb; Fri, 28 Jan 2022 12:41:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1P7TlFGLS+J/YCrjf/fA1Vw9hordKrUE05NB6toqd2+3XC9KnvfOlp9gLG+2P8x4Cu1t+ X-Received: by 2002:a05:6402:5cb:: with SMTP id n11mr5964316edx.399.1643402461512; Fri, 28 Jan 2022 12:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643402461; cv=none; d=google.com; s=arc-20160816; b=QcJC3T9LxV1hVw0HBdFYplXa5sKbM6Qbid2J/T/84jW+TTy+785Uz41u+IO6C85eUU MvaoY5gWPHmuHXfwPYg8oGzAW0SufN1gjzckPqxZEgK6VI0DlDQm+ABZZnujBHBDauE7 aNhOvmhzubiOmBnIhvB9WqaWpFJQxMBbZIvV05jsJ6ACrH3PTI3gcNwl3z3KOBLciB+e H1IPw4QGK6c2+ff9qGc+VxICIK702xG3F5tHR57dlb4PnCZuCdLuTHI5Z8nK7dNI5mUh kn3JKo/m5BlDe1G9u3pBPcBq4x0Fp/ss7RUuCUD2IRP82jhmugzYUCFLxlDWzeSNLo1y Hprg== 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=C79nec5d4UWFoxeuqvc4pTvKWdk7yx+4+JUc6wJBQYE=; b=nWgfqcz81MblX+ffUh3H8LG49irMl8T0g8aCCE6UFJfmC4Wkg9egu4+14Ts1AyqGZm wRa4uKWsMhDXPH1A0oYx+/vlNKp0tAliImC0pk4JYWY0qvf3Te4J/Tx8+ymxGHCO5l9b 7UbAQF/Q0Ij+YhaNw1ysYBQtxqPAGbq8kL/cBITZgS6gqcvnXACJGxcwF+aHHqtM1C9w 93V2FeDompzZwj/IG5HDwvd8FG3ThtCnx9G3a1tMxZkevboO2C6sybUQlk/v613lr0J2 +DyW0jNOsMAEJqc2Ecy1mwqozbe2RXn77q9BtmcFYbXWTbw8rR5BvcayfZSttsZqRTYn CWlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IIkUwq5f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si826771ejy.891.2022.01.28.12.40.36; Fri, 28 Jan 2022 12:41:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IIkUwq5f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237421AbiA0WlH (ORCPT + 99 others); Thu, 27 Jan 2022 17:41:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231520AbiA0WlG (ORCPT ); Thu, 27 Jan 2022 17:41:06 -0500 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C918C06173B for ; Thu, 27 Jan 2022 14:41:06 -0800 (PST) Received: by mail-ot1-x335.google.com with SMTP id b17-20020a9d4791000000b005a17fc2dfc1so4036362otf.1 for ; Thu, 27 Jan 2022 14:41:06 -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=C79nec5d4UWFoxeuqvc4pTvKWdk7yx+4+JUc6wJBQYE=; b=IIkUwq5frbe8Fuxr7LiChay7jMsr50X27LAdiOIiSi6CTTvrZlPi65qZPJ5ZcAd1Ma BiTTL5IgCMax9MQJEm5SMrp1iqBP895vbaQ7PzuQVDUMOnGdrEaoqwhrISUH28jJ5Pof s9TH1wGmSt5TMSq6VARBdJm3eopMzgfWE3mbo= 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=C79nec5d4UWFoxeuqvc4pTvKWdk7yx+4+JUc6wJBQYE=; b=jxQMTTAqFhUW28uJw9rULpc7mW3Apw9FZqf/VHLuWbGB/vWmCn+pzh7Aoqc1jNDbJG XKO08pVVbvG/LZWyWh7odgH/OPkNjG9X1qlNtvptBp0h1MRDpZ3HaNgQURClsLa7bgJ+ MHxicM+IocHrPO7nhD8maoJJz4545A56HZN1Z26tBWLeU0zv22T+lxlW21DpMSIO3Sf/ DmsztuUa5s+R1v4wuheDUBuneE7rYzd9Db8oC5cfEAx8U9VxM0FZhkEkPZsktqIhsRMK OqvG+KCvX2GZY7xa7DRsLXllIkXVsQo8DCMKjUPBLPhiFsVzvXSdTDqr2lYvrOia8T9+ 0Xiw== X-Gm-Message-State: AOAM530EuFFNeI5ESl/TBvuvg9m6wMp5y4jhLs7+JRlbwhmxkGphJA59 MZtvrEg9lAsi/JsYG4ezocc8KjQuVBai57+ClDO25tPbi7I= X-Received: by 2002:a9d:6f06:: with SMTP id n6mr3225915otq.159.1643323265903; Thu, 27 Jan 2022 14:41:05 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 27 Jan 2022 14:41:05 -0800 MIME-Version: 1.0 In-Reply-To: <20220127210024.25597-3-quic_amelende@quicinc.com> References: <20220127210024.25597-1-quic_amelende@quicinc.com> <20220127210024.25597-3-quic_amelende@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Thu, 27 Jan 2022 14:41:05 -0800 Message-ID: Subject: Re: [PATCH v2 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-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)? > + > + 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)? > } > - if (error) > - return error; > > pwrkey->irq = platform_get_irq(pdev, 0); > if (pwrkey->irq < 0)