From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752293AbcISPuX (ORCPT ); Mon, 19 Sep 2016 11:50:23 -0400 Received: from foss.arm.com ([217.140.101.70]:37568 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750971AbcISPuW (ORCPT ); Mon, 19 Sep 2016 11:50:22 -0400 Subject: Re: [PATCH v3 4/8] scpi: Add support for Legacy match table for Amlogic GXBB SoC To: Neil Armstrong , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1473262477-18045-1-git-send-email-narmstrong@baylibre.com> <1473262477-18045-5-git-send-email-narmstrong@baylibre.com> Cc: Sudeep Holla , linux-amlogic@lists.infradead.org, khilman@baylibre.com, heiko@sntech.de, wxt@rock-chips.com, frank.wang@rock-chips.com From: Sudeep Holla Organization: ARM Message-ID: <6698b7b9-6ffc-d120-be9c-851ea0be2bf2@arm.com> Date: Mon, 19 Sep 2016 16:50:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1473262477-18045-5-git-send-email-narmstrong@baylibre.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/09/16 16:34, Neil Armstrong wrote: > Add new DT match table to setup the is_legacy boolean value across > the scpi functions. > Add the Amlogic GXBB SoC compatible for platform and as legacy match entry. > > Signed-off-by: Neil Armstrong > --- > drivers/firmware/arm_scpi.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c > index 6a16100..60a76e63 100644 > --- a/drivers/firmware/arm_scpi.c > +++ b/drivers/firmware/arm_scpi.c > @@ -979,6 +979,11 @@ static int scpi_alloc_xfer_list(struct device *dev, struct scpi_chan *ch) > return 0; > } > > +static const struct of_device_id legacy_scpi_of_match[] = { > + {.compatible = "amlogic,meson-gxbb-scpi"}, > + {}, > +}; This needs to be documented. > + > static int scpi_probe(struct platform_device *pdev) > { > int count, idx, ret; > @@ -991,6 +996,9 @@ static int scpi_probe(struct platform_device *pdev) > if (!scpi_info) > return -ENOMEM; > > + if (of_match_device(legacy_scpi_of_match, &pdev->dev)) > + scpi_info->is_legacy = true; > + > count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells"); > if (count < 0) { > dev_err(dev, "no mboxes property in '%s'\n", np->full_name); > @@ -1097,6 +1105,7 @@ err: > > static const struct of_device_id scpi_of_match[] = { > {.compatible = "arm,scpi"}, > + {.compatible = "amlogic,meson-gxbb-scpi"}, I also prefer adding "arm,legacy-scpi". So far AMLogic has followed the legacy specification except the capabilities. You could use "amlogic,meson-gxbb-scpi" for that and "arm,legacy-scpi" for the probe part or we can add the use of "amlogic,meson-gxbb-scpi" later but just document it now. -- Regards, Sudeep