summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-hisi.c
diff options
context:
space:
mode:
authorWeilong Chen <chenweilong@huawei.com>2022-11-01 11:24:41 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2022-11-07 23:37:07 +0300
commit80280df758c1498485988b30cf6887fde7796056 (patch)
tree23536a02f2e9cd48db27a21fb7edebb6403dc8a5 /drivers/gpio/gpio-hisi.c
parent95e7fc84c78adeef654acb919f04d98a87e6372d (diff)
downloadlinux-80280df758c1498485988b30cf6887fde7796056.tar.xz
gpio: hisi: Add initial device tree support
Add support for HiSilicon GPIO controller in embedded platform, which boot from devicetree. Signed-off-by: Weilong Chen <chenweilong@huawei.com> Acked-by: Jay Fang <f.fangjian@huawei.com> Reviewed-by: Yicong Yang <yangyicong@hisilicon.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-hisi.c')
-rw-r--r--drivers/gpio/gpio-hisi.c7
1 files changed, 7 insertions, 0 deletions
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,
};