提交 1e4eb360 编写于 作者: G Gu Zitao 提交者: Zheng Zengkai

sw64: gpio: add sunway builtin gpio driver

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SPZD
CVE: NA

-------------------------------

Signed-off-by: Gu Zitao <guzitao@wxiat.com> #openEuler_contributor
Signed-off-by: NLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9d21798e
...@@ -232,6 +232,15 @@ config GPIO_DWAPB ...@@ -232,6 +232,15 @@ config GPIO_DWAPB
Say Y or M here to build support for the Synopsys DesignWare APB Say Y or M here to build support for the Synopsys DesignWare APB
GPIO block. GPIO block.
config GPIO_SUNWAY
tristate "Sunway gpio driver"
depends on SW64
select GPIO_GENERIC
select GENERIC_IRQ_CHIP
help
Say Y or M here to build support for the Sunway
GPIO block.
config GPIO_EIC_SPRD config GPIO_EIC_SPRD
tristate "Spreadtrum EIC support" tristate "Spreadtrum EIC support"
depends on ARCH_SPRD || COMPILE_TEST depends on ARCH_SPRD || COMPILE_TEST
......
...@@ -181,3 +181,4 @@ obj-$(CONFIG_GPIO_XTENSA) += gpio-xtensa.o ...@@ -181,3 +181,4 @@ obj-$(CONFIG_GPIO_XTENSA) += gpio-xtensa.o
obj-$(CONFIG_GPIO_ZEVIO) += gpio-zevio.o obj-$(CONFIG_GPIO_ZEVIO) += gpio-zevio.o
obj-$(CONFIG_GPIO_ZX) += gpio-zx.o obj-$(CONFIG_GPIO_ZX) += gpio-zx.o
obj-$(CONFIG_GPIO_ZYNQ) += gpio-zynq.o obj-$(CONFIG_GPIO_ZYNQ) += gpio-zynq.o
obj-$(CONFIG_GPIO_SUNWAY) += gpio-sunway.o
此差异已折叠。
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright(c) 2014 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef GPIO_SUNWAY_H
#define GPIO_SUNWAY_H
struct sunway_port_property {
struct fwnode_handle *fwnode;
unsigned int idx;
unsigned int ngpio;
unsigned int gpio_base;
int irq[32];
bool has_irq;
bool irq_shared;
};
struct sunway_platform_data {
struct sunway_port_property *properties;
unsigned int nports;
};
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册