From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FD49C433B4 for ; Thu, 8 Apr 2021 21:35:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 87B0261001 for ; Thu, 8 Apr 2021 21:35:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87B0261001 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=46xPsShotM2ye5Gn0wD8+eY8BSdRquVzl3HmC05OuGg=; b=onPilYB2ZITrdMlRooEAcJ8fq QAhmIbBpHAuSG/MCEeqoiSZFOgYmhAEaBhPGSZt3NQr74A/1akqIQYA4fFuzH2dV0TE8g+Snx9niI PTNvTKpo72M3RYG9pXwa/m/YxC0V3sRqzq1cn8uo/WSmp5Vxpy9eZRyemv06//l8UtOSoM4C2Kyg/ 8navbbJLs4bd2so9tCSC+gOXSdL3bb8ZtPPG1T3CdNRw6VxS1E1hPdYR9VVpJVhP4pMz683ETl1ST fGg6wXpi89S7i5c83UswQN+CkVagMY+upitGdXXBvjnWCgmgKReudmW+aqNAJXRC1WERHKsuL0+bR s0agAF53Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUcHB-009Il3-By; Thu, 08 Apr 2021 21:33:21 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUcH6-009IkI-Ns for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 21:33:18 +0000 Received: by mail-oi1-f178.google.com with SMTP id k25so3709170oic.4 for ; Thu, 08 Apr 2021 14:33:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mySPQZAxeKxPZ6g7lCnXPm49GveuRCHUb1NT0KmJXUE=; b=cbTbD7Sdp/gpA4OjXnwph78woGXOOShURDXx2O6kuvMgOaQj2olYm+85EkpQzu5dya R1m4CUvpLNcK7k1ZyaVXuYXk74qRCj0W11Te+NpsPyG25SIs/exs/leNVIEkmmuG26ni GEIZQEOiP5fVC6ET4KJ72nsiWTlRcPn3hbCw3fi2lq4vdWbJc8aRE4dydVq7YOFz/Dqg hOxGqChszycwYgGfDdlO1PCi7946BCfULDkcbkl9k76sWEoIsCjDYWGNZdCeSwfQdfoU gmsaHtNWJlLmVjxA7vkVJiIedPeMCmKPLK2OJ9MbwtxEqARwFNYFkCiyK0waw9YtEIKd QMZA== X-Gm-Message-State: AOAM530Yc18LtdhKlOWaeXVB5w/gUUd3Fbqt/JMM7Y2D18JuVro4Rcpb 3DMDo+fMpgKfRScqWZuBVPUvjwEA3mY= X-Google-Smtp-Source: ABdhPJxRgk7HxWyu7P6SP1v+yuYJ+iuBFnwvvfHc5tHKiG5m7AJTm7QaMrG0VLGTnnnMF9VuJWjNOg== X-Received: by 2002:a05:6808:1444:: with SMTP id x4mr7842081oiv.142.1617917594471; Thu, 08 Apr 2021 14:33:14 -0700 (PDT) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com. [209.85.167.170]) by smtp.gmail.com with ESMTPSA id s131sm141069oib.14.2021.04.08.14.33.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Apr 2021 14:33:14 -0700 (PDT) Received: by mail-oi1-f170.google.com with SMTP id w70so3751120oie.0 for ; Thu, 08 Apr 2021 14:33:13 -0700 (PDT) X-Received: by 2002:aca:3456:: with SMTP id b83mr7828412oia.51.1617917593399; Thu, 08 Apr 2021 14:33:13 -0700 (PDT) MIME-Version: 1.0 References: <20210408030353.37193-1-ran.wang_1@nxp.com> In-Reply-To: <20210408030353.37193-1-ran.wang_1@nxp.com> From: Li Yang Date: Thu, 8 Apr 2021 16:33:02 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7] soc: fsl: enable acpi support in RCPM driver To: Ran Wang Cc: Christophe Leroy , linuxppc-dev , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , lkml , Peng Ma X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_223316_870632_EF933A5D X-CRM114-Status: GOOD ( 30.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 7, 2021 at 9:58 PM Ran Wang wrote: > > From: Peng Ma > > This patch enables ACPI support in RCPM driver. > > Signed-off-by: Peng Ma > Signed-off-by: Ran Wang Applied for next. Thanks. > --- > Change in v7: > - Update comment for checking RCPM node which refferred to > > Change in v6: > - Remove copyright udpate to rebase on latest mainline > > Change in v5: > - Fix panic when dev->of_node is null > > Change in v4: > - Make commit subject more accurate > - Remove unrelated new blank line > > Change in v3: > - Add #ifdef CONFIG_ACPI for acpi_device_id > - Rename rcpm_acpi_imx_ids to rcpm_acpi_ids > > Change in v2: > - Update acpi_device_id to fix conflict with other driver > > drivers/soc/fsl/rcpm.c | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > > diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c > index 4ace28cab314..90d3f4060b0c 100644 > --- a/drivers/soc/fsl/rcpm.c > +++ b/drivers/soc/fsl/rcpm.c > @@ -13,6 +13,7 @@ > #include > #include > #include > +#include > > #define RCPM_WAKEUP_CELL_MAX_SIZE 7 > > @@ -78,10 +79,20 @@ static int rcpm_pm_prepare(struct device *dev) > "fsl,rcpm-wakeup", value, > rcpm->wakeup_cells + 1); > > - /* Wakeup source should refer to current rcpm device */ > - if (ret || (np->phandle != value[0])) > + if (ret) > continue; > > + /* > + * For DT mode, would handle devices with "fsl,rcpm-wakeup" > + * pointing to the current RCPM node. > + * > + * For ACPI mode, currently we assume there is only one > + * RCPM controller existing. > + */ > + if (is_of_node(dev->fwnode)) > + if (np->phandle != value[0]) > + continue; > + > /* Property "#fsl,rcpm-wakeup-cells" of rcpm node defines the > * number of IPPDEXPCR register cells, and "fsl,rcpm-wakeup" > * of wakeup source IP contains an integer array: @@ -172,10 +183,19 @@ static const struct of_device_id rcpm_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, rcpm_of_match); > > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id rcpm_acpi_ids[] = { > + {"NXP0015",}, > + { } > +}; > +MODULE_DEVICE_TABLE(acpi, rcpm_acpi_ids); > +#endif > + > static struct platform_driver rcpm_driver = { > .driver = { > .name = "rcpm", > .of_match_table = rcpm_of_match, > + .acpi_match_table = ACPI_PTR(rcpm_acpi_ids), > .pm = &rcpm_pm_ops, > }, > .probe = rcpm_probe, > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel