Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp194498pxa; Tue, 18 Aug 2020 21:10:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz82emMUgeoaUHf4IFV3PoufVP3/00hN2McRamuNzvLDBDXy4Oy6Ugw9RwHOPs+wRvu70T9 X-Received: by 2002:a17:906:1707:: with SMTP id c7mr23728823eje.498.1597810253455; Tue, 18 Aug 2020 21:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597810253; cv=none; d=google.com; s=arc-20160816; b=0QgqvDgRxOKwumcAumYYAh+Vp2EJJAZNqd1F3Q/D9i7MXQyxLZdG9VB1YlofbNgtI3 LdrMgw8sZKXaGm7BWfKufMzicU0l8qHrBRt5FDiG7XKLRZoAIYoWIFrD7TLPJgja1ReW gWgje9z0lMniQT3ahUoziSeWXVPHN8eU05nVdSJUPIs9fKGasiPX5UhUFxpEilsO4xhH pAe6tRp8EtnsXeaqQXPawz2KRsdaHHT1YtX/g1NdKrND0fK/qvvm2mAFjjh/6LGghcfO rT7vxLvvWam1ge98I7Qa6o2RBOk86iUblXYR1s8mdnH9kvBvSvye/abut5dPiWoqiMOK XUKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=2wFx/TsgctK5+t7Y7Cyc5c45EAoBwpb818H5od8Mhvk=; b=C0hSzU42es2IIAtWaHnyzw38ofWLTXEPj37BgLgUwr8n+F3UEGy0qLGLOFvwJrf97Q W46TUPAbn/NBMM0n2eGaYqTiDRY53immFWihEaXySSTvBH3Pxcbn2SGSbKpcYxlhfo2y 5fwPnPXNOthM6JLZOE960+a6x9iE3jDd2QityuC/X6Fc7eVb9AFMPUEeakueFM0e2fRw jvupG6WZHF6nnZzSRSA+vdQwIKFYQgOQyfjJdFCUq9h02tV6anU9FfQOVjOF+7vSbROf wi52KnElQ138LtkvJ7yEUh7IxLqlhL0pOfek9iYm2nbpDiFbhRLuVB/RuRV+fmL1emgV mHOg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm3si18709929ejc.513.2020.08.18.21.10.28; Tue, 18 Aug 2020 21:10:53 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725903AbgHSEH4 (ORCPT + 99 others); Wed, 19 Aug 2020 00:07:56 -0400 Received: from inva020.nxp.com ([92.121.34.13]:39564 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725280AbgHSEH4 (ORCPT ); Wed, 19 Aug 2020 00:07:56 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6C9251A0291; Wed, 19 Aug 2020 06:07:54 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A8D771A028A; Wed, 19 Aug 2020 06:07:51 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id EFB08402C3; Wed, 19 Aug 2020 06:07:47 +0200 (CEST) From: Ran Wang To: Li Yang Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Ma , Ran Wang Subject: [PATCH v3] soc: fsl: enable acpi support Date: Wed, 19 Aug 2020 12:00:31 +0800 Message-Id: <20200819040031.40204-1-ran.wang_1@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Ma This patch enables ACPI support in RCPM driver. Signed-off-by: Peng Ma Signed-off-by: Ran Wang --- 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 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c index a093dbe..55d1d73 100644 --- a/drivers/soc/fsl/rcpm.c +++ b/drivers/soc/fsl/rcpm.c @@ -2,7 +2,7 @@ // // rcpm.c - Freescale QorIQ RCPM driver // -// Copyright 2019 NXP +// Copyright 2019-2020 NXP // // Author: Ran Wang @@ -13,6 +13,7 @@ #include #include #include +#include #define RCPM_WAKEUP_CELL_MAX_SIZE 7 @@ -125,6 +126,7 @@ static int rcpm_probe(struct platform_device *pdev) ret = device_property_read_u32(&pdev->dev, "#fsl,rcpm-wakeup-cells", &rcpm->wakeup_cells); + if (ret) return ret; @@ -139,10 +141,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.7.4