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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E9FDC433FE for ; Mon, 7 Nov 2022 20:38:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232504AbiKGUiI (ORCPT ); Mon, 7 Nov 2022 15:38:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbiKGUiG (ORCPT ); Mon, 7 Nov 2022 15:38:06 -0500 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9C927DD8 for ; Mon, 7 Nov 2022 12:38:05 -0800 (PST) Received: by mail-vs1-xe2e.google.com with SMTP id p4so11740637vsa.11 for ; Mon, 07 Nov 2022 12:38:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IHQPm0wu+YpCSjSEGUCLAXG8G/dftjICDA1Cd0hRfeQ=; b=v5sI0kcBdDoCOkZIGxqhb4rT9YpWXWkK5YNai2ZsI0LwkhX4FRfRZdOHhe+XFMtmO2 KWo5ymx5sn82nITWbEgRXOiY4GNydpVeDWlQWWwd1ft3/KcBqIsbeNFhjPEb7fW15ccT nhAKNcu5c10qRwFFHodMHjfBi8eE2d/EyAEqiOO0T/m6niREitOTyB6hlrffalAotlXu q7/p7Nwow85rgPMixcCaB1gp3SYzvYPLZwU12im9h+ff+caINUpx95pr7YCGyzqCvy9H SPGt3JDP1X6pnExIK98tIRBCtVsF6n1gjBh3wAnukW3ER2VLyAassxHVe6FXyFgNFR0w Zhfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IHQPm0wu+YpCSjSEGUCLAXG8G/dftjICDA1Cd0hRfeQ=; b=6zvUXJUBkIYqnQoq2bpfMcoUFSKisltK5C+MA4bevAqQ7jO1/cuxqJIRhtYprShVRE V31h5HH4q8J6HzTIPaQvJv8pfu87Al7GRgXd5piFihjDD6yICDkgLQLLq/6yAD/qeIov i1T1HSlQw0MPOJ216wU+fQlrK6UKeuW0HCZe9jvxcx1X6OSgxY/ZTX5jtm774AhVbWDu kgpgOT/6B6KBRevmRXoQ8fB3TCc9zQIIOXXiC0JRwhH804L90E2Uf9VuhPInBtxIxvzF nmX/Tnl529mPuU++suVA93qqJ+K+8o1J5v2iaraJldlNJUJElNrYLQSzxegmyHhUokIA J9Ag== X-Gm-Message-State: ACrzQf2NryCM56zzkFmhm3fcaizlJm0qfZ8pG642iaDSG0B/41DfQ/jB ZTtKdaDQr7iXDOddjuRe4lF6zEM08DJmeQDz2TPL/Q== X-Google-Smtp-Source: AMsMyM7HKtwdW6lovqXQpX0baiK/2edNiHMRZe7qPwavV5oUB/CVeT9TRpDCXiaPRYKoPRZKiDdMY609XkAwj6FX7iE= X-Received: by 2002:a67:ac0e:0:b0:3aa:86c3:e6fc with SMTP id v14-20020a67ac0e000000b003aa86c3e6fcmr26672223vse.9.1667853484301; Mon, 07 Nov 2022 12:38:04 -0800 (PST) MIME-Version: 1.0 References: <20221101082442.263448-1-chenweilong@huawei.com> <9824fa76-89cc-6c17-9c4a-d37524a30a92@huawei.com> In-Reply-To: <9824fa76-89cc-6c17-9c4a-d37524a30a92@huawei.com> From: Bartosz Golaszewski Date: Mon, 7 Nov 2022 21:37:53 +0100 Message-ID: Subject: Re: [PATCH next v3 1/2] gpio: hisi: Add initial device tree support To: chenweilong Cc: f.fangjian@huawei.com, linus.walleij@linaro.org, yangyicong@hisilicon.com, xuwei5@huawei.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Nov 3, 2022 at 9:51 AM chenweilong wrote: > > On 2022/11/1 16:24, Weilong Chen wrote: > > This is the latest version for the patch, I used the v3 version number incorrectly. > Sorry for the mistake. I will pay attention next time. > > > Add support for HiSilicon GPIO controller in embedded platform, which > > boot from devicetree. > > > > Signed-off-by: Weilong Chen > > --- > > Change since v2: > > - Drop wrong use ACPI_PTR/of_match_ptr > > Link: https://lore.kernel.org/lkml/20221028022453.163186-1-chenweilong@huawei.com/ > > > > drivers/gpio/Kconfig | 2 +- > > drivers/gpio/gpio-hisi.c | 7 +++++++ > > 2 files changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig > > index e034f752e7ce..71a7880af59d 100644 > > --- a/drivers/gpio/Kconfig > > +++ b/drivers/gpio/Kconfig > > @@ -310,7 +310,7 @@ config GPIO_GRGPIO > > > > config GPIO_HISI > > tristate "HiSilicon GPIO controller driver" > > - depends on (ARM64 && ACPI) || COMPILE_TEST > > + depends on ARM64 || COMPILE_TEST > > select GPIO_GENERIC > > select GPIOLIB_IRQCHIP > > help > > diff --git a/drivers/gpio/gpio-hisi.c b/drivers/gpio/gpio-hisi.c > > index 3caabef5c7a2..55bd69043bf4 100644 > > --- a/drivers/gpio/gpio-hisi.c > > +++ b/drivers/gpio/gpio-hisi.c > > @@ -221,6 +221,12 @@ static const struct acpi_device_id hisi_gpio_acpi_match[] = { > > }; > > MODULE_DEVICE_TABLE(acpi, hisi_gpio_acpi_match); > > > > +static const struct of_device_id hisi_gpio_dts_match[] = { > > + { .compatible = "hisilicon,ascend910-gpio", }, > > + { } > > +}; > > +MODULE_DEVICE_TABLE(of, hisi_gpio_dts_match); > > + > > static void hisi_gpio_get_pdata(struct device *dev, > > struct hisi_gpio *hisi_gpio) > > { > > @@ -311,6 +317,7 @@ static struct platform_driver hisi_gpio_driver = { > > .driver = { > > .name = HISI_GPIO_DRIVER_NAME, > > .acpi_match_table = hisi_gpio_acpi_match, > > + .of_match_table = hisi_gpio_dts_match, > > }, > > .probe = hisi_gpio_probe, > > }; > > I applied both, but reversed the order as dt bindings should come first. Thanks! Bart