18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2017 Broadcom
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#include <linux/gpio/driver.h>
78c2ecf20Sopenharmony_ci#include <linux/init.h>
88c2ecf20Sopenharmony_ci#include <linux/interrupt.h>
98c2ecf20Sopenharmony_ci#include <linux/io.h>
108c2ecf20Sopenharmony_ci#include <linux/irq.h>
118c2ecf20Sopenharmony_ci#include <linux/kernel.h>
128c2ecf20Sopenharmony_ci#include <linux/module.h>
138c2ecf20Sopenharmony_ci#include <linux/platform_device.h>
148c2ecf20Sopenharmony_ci#include <linux/spinlock.h>
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define IPROC_CCA_INT_F_GPIOINT		BIT(0)
178c2ecf20Sopenharmony_ci#define IPROC_CCA_INT_STS		0x20
188c2ecf20Sopenharmony_ci#define IPROC_CCA_INT_MASK		0x24
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_DIN		0x0
218c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_DOUT		0x4
228c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_OUT_EN		0x8
238c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_INT_LEVEL	0x10
248c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_INT_LEVEL_MASK	0x14
258c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_INT_EVENT	0x18
268c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_INT_EVENT_MASK	0x1C
278c2ecf20Sopenharmony_ci#define IPROC_GPIO_CCA_INT_EDGE		0x24
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_cistruct iproc_gpio_chip {
308c2ecf20Sopenharmony_ci	struct irq_chip irqchip;
318c2ecf20Sopenharmony_ci	struct gpio_chip gc;
328c2ecf20Sopenharmony_ci	spinlock_t lock;
338c2ecf20Sopenharmony_ci	struct device *dev;
348c2ecf20Sopenharmony_ci	void __iomem *base;
358c2ecf20Sopenharmony_ci	void __iomem *intr;
368c2ecf20Sopenharmony_ci};
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_cistatic inline struct iproc_gpio_chip *
398c2ecf20Sopenharmony_cito_iproc_gpio(struct gpio_chip *gc)
408c2ecf20Sopenharmony_ci{
418c2ecf20Sopenharmony_ci	return container_of(gc, struct iproc_gpio_chip, gc);
428c2ecf20Sopenharmony_ci}
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_cistatic void iproc_gpio_irq_ack(struct irq_data *d)
458c2ecf20Sopenharmony_ci{
468c2ecf20Sopenharmony_ci	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
478c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip = to_iproc_gpio(gc);
488c2ecf20Sopenharmony_ci	int pin = d->hwirq;
498c2ecf20Sopenharmony_ci	unsigned long flags;
508c2ecf20Sopenharmony_ci	u32 irq = d->irq;
518c2ecf20Sopenharmony_ci	u32 irq_type, event_status = 0;
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci	spin_lock_irqsave(&chip->lock, flags);
548c2ecf20Sopenharmony_ci	irq_type = irq_get_trigger_type(irq);
558c2ecf20Sopenharmony_ci	if (irq_type & IRQ_TYPE_EDGE_BOTH) {
568c2ecf20Sopenharmony_ci		event_status |= BIT(pin);
578c2ecf20Sopenharmony_ci		writel_relaxed(event_status,
588c2ecf20Sopenharmony_ci			       chip->base + IPROC_GPIO_CCA_INT_EVENT);
598c2ecf20Sopenharmony_ci	}
608c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&chip->lock, flags);
618c2ecf20Sopenharmony_ci}
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_cistatic void iproc_gpio_irq_unmask(struct irq_data *d)
648c2ecf20Sopenharmony_ci{
658c2ecf20Sopenharmony_ci	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
668c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip = to_iproc_gpio(gc);
678c2ecf20Sopenharmony_ci	int pin = d->hwirq;
688c2ecf20Sopenharmony_ci	unsigned long flags;
698c2ecf20Sopenharmony_ci	u32 irq = d->irq;
708c2ecf20Sopenharmony_ci	u32 int_mask, irq_type, event_mask;
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci	spin_lock_irqsave(&chip->lock, flags);
738c2ecf20Sopenharmony_ci	irq_type = irq_get_trigger_type(irq);
748c2ecf20Sopenharmony_ci	event_mask = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_EVENT_MASK);
758c2ecf20Sopenharmony_ci	int_mask = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_LEVEL_MASK);
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci	if (irq_type & IRQ_TYPE_EDGE_BOTH) {
788c2ecf20Sopenharmony_ci		event_mask |= 1 << pin;
798c2ecf20Sopenharmony_ci		writel_relaxed(event_mask,
808c2ecf20Sopenharmony_ci			       chip->base + IPROC_GPIO_CCA_INT_EVENT_MASK);
818c2ecf20Sopenharmony_ci	} else {
828c2ecf20Sopenharmony_ci		int_mask |= 1 << pin;
838c2ecf20Sopenharmony_ci		writel_relaxed(int_mask,
848c2ecf20Sopenharmony_ci			       chip->base + IPROC_GPIO_CCA_INT_LEVEL_MASK);
858c2ecf20Sopenharmony_ci	}
868c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&chip->lock, flags);
878c2ecf20Sopenharmony_ci}
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_cistatic void iproc_gpio_irq_mask(struct irq_data *d)
908c2ecf20Sopenharmony_ci{
918c2ecf20Sopenharmony_ci	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
928c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip = to_iproc_gpio(gc);
938c2ecf20Sopenharmony_ci	int pin = d->hwirq;
948c2ecf20Sopenharmony_ci	unsigned long flags;
958c2ecf20Sopenharmony_ci	u32 irq = d->irq;
968c2ecf20Sopenharmony_ci	u32 irq_type, int_mask, event_mask;
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci	spin_lock_irqsave(&chip->lock, flags);
998c2ecf20Sopenharmony_ci	irq_type = irq_get_trigger_type(irq);
1008c2ecf20Sopenharmony_ci	event_mask = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_EVENT_MASK);
1018c2ecf20Sopenharmony_ci	int_mask = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_LEVEL_MASK);
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci	if (irq_type & IRQ_TYPE_EDGE_BOTH) {
1048c2ecf20Sopenharmony_ci		event_mask &= ~BIT(pin);
1058c2ecf20Sopenharmony_ci		writel_relaxed(event_mask,
1068c2ecf20Sopenharmony_ci			       chip->base + IPROC_GPIO_CCA_INT_EVENT_MASK);
1078c2ecf20Sopenharmony_ci	} else {
1088c2ecf20Sopenharmony_ci		int_mask &= ~BIT(pin);
1098c2ecf20Sopenharmony_ci		writel_relaxed(int_mask,
1108c2ecf20Sopenharmony_ci			       chip->base + IPROC_GPIO_CCA_INT_LEVEL_MASK);
1118c2ecf20Sopenharmony_ci	}
1128c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&chip->lock, flags);
1138c2ecf20Sopenharmony_ci}
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_cistatic int iproc_gpio_irq_set_type(struct irq_data *d, u32 type)
1168c2ecf20Sopenharmony_ci{
1178c2ecf20Sopenharmony_ci	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1188c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip = to_iproc_gpio(gc);
1198c2ecf20Sopenharmony_ci	int pin = d->hwirq;
1208c2ecf20Sopenharmony_ci	unsigned long flags;
1218c2ecf20Sopenharmony_ci	u32 irq = d->irq;
1228c2ecf20Sopenharmony_ci	u32 event_pol, int_pol;
1238c2ecf20Sopenharmony_ci	int ret = 0;
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci	spin_lock_irqsave(&chip->lock, flags);
1268c2ecf20Sopenharmony_ci	switch (type & IRQ_TYPE_SENSE_MASK) {
1278c2ecf20Sopenharmony_ci	case IRQ_TYPE_EDGE_RISING:
1288c2ecf20Sopenharmony_ci		event_pol = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_EDGE);
1298c2ecf20Sopenharmony_ci		event_pol &= ~BIT(pin);
1308c2ecf20Sopenharmony_ci		writel_relaxed(event_pol, chip->base + IPROC_GPIO_CCA_INT_EDGE);
1318c2ecf20Sopenharmony_ci		break;
1328c2ecf20Sopenharmony_ci	case IRQ_TYPE_EDGE_FALLING:
1338c2ecf20Sopenharmony_ci		event_pol = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_EDGE);
1348c2ecf20Sopenharmony_ci		event_pol |= BIT(pin);
1358c2ecf20Sopenharmony_ci		writel_relaxed(event_pol, chip->base + IPROC_GPIO_CCA_INT_EDGE);
1368c2ecf20Sopenharmony_ci		break;
1378c2ecf20Sopenharmony_ci	case IRQ_TYPE_LEVEL_HIGH:
1388c2ecf20Sopenharmony_ci		int_pol = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_LEVEL);
1398c2ecf20Sopenharmony_ci		int_pol &= ~BIT(pin);
1408c2ecf20Sopenharmony_ci		writel_relaxed(int_pol, chip->base + IPROC_GPIO_CCA_INT_LEVEL);
1418c2ecf20Sopenharmony_ci		break;
1428c2ecf20Sopenharmony_ci	case IRQ_TYPE_LEVEL_LOW:
1438c2ecf20Sopenharmony_ci		int_pol = readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_LEVEL);
1448c2ecf20Sopenharmony_ci		int_pol |= BIT(pin);
1458c2ecf20Sopenharmony_ci		writel_relaxed(int_pol, chip->base + IPROC_GPIO_CCA_INT_LEVEL);
1468c2ecf20Sopenharmony_ci		break;
1478c2ecf20Sopenharmony_ci	default:
1488c2ecf20Sopenharmony_ci		/* should not come here */
1498c2ecf20Sopenharmony_ci		ret = -EINVAL;
1508c2ecf20Sopenharmony_ci		goto out_unlock;
1518c2ecf20Sopenharmony_ci	}
1528c2ecf20Sopenharmony_ci
1538c2ecf20Sopenharmony_ci	if (type & IRQ_TYPE_LEVEL_MASK)
1548c2ecf20Sopenharmony_ci		irq_set_handler_locked(irq_get_irq_data(irq), handle_level_irq);
1558c2ecf20Sopenharmony_ci	else if (type & IRQ_TYPE_EDGE_BOTH)
1568c2ecf20Sopenharmony_ci		irq_set_handler_locked(irq_get_irq_data(irq), handle_edge_irq);
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ciout_unlock:
1598c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&chip->lock, flags);
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci	return ret;
1628c2ecf20Sopenharmony_ci}
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_cistatic irqreturn_t iproc_gpio_irq_handler(int irq, void *data)
1658c2ecf20Sopenharmony_ci{
1668c2ecf20Sopenharmony_ci	struct gpio_chip *gc = (struct gpio_chip *)data;
1678c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip = to_iproc_gpio(gc);
1688c2ecf20Sopenharmony_ci	int bit;
1698c2ecf20Sopenharmony_ci	unsigned long int_bits = 0;
1708c2ecf20Sopenharmony_ci	u32 int_status;
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ci	/* go through the entire GPIOs and handle all interrupts */
1738c2ecf20Sopenharmony_ci	int_status = readl_relaxed(chip->intr + IPROC_CCA_INT_STS);
1748c2ecf20Sopenharmony_ci	if (int_status & IPROC_CCA_INT_F_GPIOINT) {
1758c2ecf20Sopenharmony_ci		u32 event, level;
1768c2ecf20Sopenharmony_ci
1778c2ecf20Sopenharmony_ci		/* Get level and edge interrupts */
1788c2ecf20Sopenharmony_ci		event =
1798c2ecf20Sopenharmony_ci		    readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_EVENT_MASK);
1808c2ecf20Sopenharmony_ci		event &= readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_EVENT);
1818c2ecf20Sopenharmony_ci		level = readl_relaxed(chip->base + IPROC_GPIO_CCA_DIN);
1828c2ecf20Sopenharmony_ci		level ^= readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_LEVEL);
1838c2ecf20Sopenharmony_ci		level &=
1848c2ecf20Sopenharmony_ci		    readl_relaxed(chip->base + IPROC_GPIO_CCA_INT_LEVEL_MASK);
1858c2ecf20Sopenharmony_ci		int_bits = level | event;
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci		for_each_set_bit(bit, &int_bits, gc->ngpio)
1888c2ecf20Sopenharmony_ci			generic_handle_irq(irq_linear_revmap(gc->irq.domain, bit));
1898c2ecf20Sopenharmony_ci	}
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ci	return int_bits ? IRQ_HANDLED : IRQ_NONE;
1928c2ecf20Sopenharmony_ci}
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_cistatic int iproc_gpio_probe(struct platform_device *pdev)
1958c2ecf20Sopenharmony_ci{
1968c2ecf20Sopenharmony_ci	struct device *dev = &pdev->dev;
1978c2ecf20Sopenharmony_ci	struct device_node *dn = pdev->dev.of_node;
1988c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip;
1998c2ecf20Sopenharmony_ci	u32 num_gpios;
2008c2ecf20Sopenharmony_ci	int irq, ret;
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ci	chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
2038c2ecf20Sopenharmony_ci	if (!chip)
2048c2ecf20Sopenharmony_ci		return -ENOMEM;
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_ci	chip->dev = dev;
2078c2ecf20Sopenharmony_ci	platform_set_drvdata(pdev, chip);
2088c2ecf20Sopenharmony_ci	spin_lock_init(&chip->lock);
2098c2ecf20Sopenharmony_ci
2108c2ecf20Sopenharmony_ci	chip->base = devm_platform_ioremap_resource(pdev, 0);
2118c2ecf20Sopenharmony_ci	if (IS_ERR(chip->base))
2128c2ecf20Sopenharmony_ci		return PTR_ERR(chip->base);
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_ci	ret = bgpio_init(&chip->gc, dev, 4,
2158c2ecf20Sopenharmony_ci			 chip->base + IPROC_GPIO_CCA_DIN,
2168c2ecf20Sopenharmony_ci			 chip->base + IPROC_GPIO_CCA_DOUT,
2178c2ecf20Sopenharmony_ci			 NULL,
2188c2ecf20Sopenharmony_ci			 chip->base + IPROC_GPIO_CCA_OUT_EN,
2198c2ecf20Sopenharmony_ci			 NULL,
2208c2ecf20Sopenharmony_ci			 0);
2218c2ecf20Sopenharmony_ci	if (ret) {
2228c2ecf20Sopenharmony_ci		dev_err(dev, "unable to init GPIO chip\n");
2238c2ecf20Sopenharmony_ci		return ret;
2248c2ecf20Sopenharmony_ci	}
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_ci	chip->gc.label = dev_name(dev);
2278c2ecf20Sopenharmony_ci	if (!of_property_read_u32(dn, "ngpios", &num_gpios))
2288c2ecf20Sopenharmony_ci		chip->gc.ngpio = num_gpios;
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_ci	irq = platform_get_irq(pdev, 0);
2318c2ecf20Sopenharmony_ci	if (irq > 0) {
2328c2ecf20Sopenharmony_ci		struct gpio_irq_chip *girq;
2338c2ecf20Sopenharmony_ci		struct irq_chip *irqc;
2348c2ecf20Sopenharmony_ci		u32 val;
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ci		irqc = &chip->irqchip;
2378c2ecf20Sopenharmony_ci		irqc->name = dev_name(dev);
2388c2ecf20Sopenharmony_ci		irqc->irq_ack = iproc_gpio_irq_ack;
2398c2ecf20Sopenharmony_ci		irqc->irq_mask = iproc_gpio_irq_mask;
2408c2ecf20Sopenharmony_ci		irqc->irq_unmask = iproc_gpio_irq_unmask;
2418c2ecf20Sopenharmony_ci		irqc->irq_set_type = iproc_gpio_irq_set_type;
2428c2ecf20Sopenharmony_ci
2438c2ecf20Sopenharmony_ci		chip->intr = devm_platform_ioremap_resource(pdev, 1);
2448c2ecf20Sopenharmony_ci		if (IS_ERR(chip->intr))
2458c2ecf20Sopenharmony_ci			return PTR_ERR(chip->intr);
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci		/* Enable GPIO interrupts for CCA GPIO */
2488c2ecf20Sopenharmony_ci		val = readl_relaxed(chip->intr + IPROC_CCA_INT_MASK);
2498c2ecf20Sopenharmony_ci		val |= IPROC_CCA_INT_F_GPIOINT;
2508c2ecf20Sopenharmony_ci		writel_relaxed(val, chip->intr + IPROC_CCA_INT_MASK);
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_ci		/*
2538c2ecf20Sopenharmony_ci		 * Directly request the irq here instead of passing
2548c2ecf20Sopenharmony_ci		 * a flow-handler because the irq is shared.
2558c2ecf20Sopenharmony_ci		 */
2568c2ecf20Sopenharmony_ci		ret = devm_request_irq(dev, irq, iproc_gpio_irq_handler,
2578c2ecf20Sopenharmony_ci				       IRQF_SHARED, chip->gc.label, &chip->gc);
2588c2ecf20Sopenharmony_ci		if (ret) {
2598c2ecf20Sopenharmony_ci			dev_err(dev, "Fail to request IRQ%d: %d\n", irq, ret);
2608c2ecf20Sopenharmony_ci			return ret;
2618c2ecf20Sopenharmony_ci		}
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_ci		girq = &chip->gc.irq;
2648c2ecf20Sopenharmony_ci		girq->chip = irqc;
2658c2ecf20Sopenharmony_ci		/* This will let us handle the parent IRQ in the driver */
2668c2ecf20Sopenharmony_ci		girq->parent_handler = NULL;
2678c2ecf20Sopenharmony_ci		girq->num_parents = 0;
2688c2ecf20Sopenharmony_ci		girq->parents = NULL;
2698c2ecf20Sopenharmony_ci		girq->default_type = IRQ_TYPE_NONE;
2708c2ecf20Sopenharmony_ci		girq->handler = handle_simple_irq;
2718c2ecf20Sopenharmony_ci	}
2728c2ecf20Sopenharmony_ci
2738c2ecf20Sopenharmony_ci	ret = devm_gpiochip_add_data(dev, &chip->gc, chip);
2748c2ecf20Sopenharmony_ci	if (ret) {
2758c2ecf20Sopenharmony_ci		dev_err(dev, "unable to add GPIO chip\n");
2768c2ecf20Sopenharmony_ci		return ret;
2778c2ecf20Sopenharmony_ci	}
2788c2ecf20Sopenharmony_ci
2798c2ecf20Sopenharmony_ci	return 0;
2808c2ecf20Sopenharmony_ci}
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_cistatic int iproc_gpio_remove(struct platform_device *pdev)
2838c2ecf20Sopenharmony_ci{
2848c2ecf20Sopenharmony_ci	struct iproc_gpio_chip *chip;
2858c2ecf20Sopenharmony_ci
2868c2ecf20Sopenharmony_ci	chip = platform_get_drvdata(pdev);
2878c2ecf20Sopenharmony_ci	if (!chip)
2888c2ecf20Sopenharmony_ci		return -ENODEV;
2898c2ecf20Sopenharmony_ci
2908c2ecf20Sopenharmony_ci	if (chip->intr) {
2918c2ecf20Sopenharmony_ci		u32 val;
2928c2ecf20Sopenharmony_ci
2938c2ecf20Sopenharmony_ci		val = readl_relaxed(chip->intr + IPROC_CCA_INT_MASK);
2948c2ecf20Sopenharmony_ci		val &= ~IPROC_CCA_INT_F_GPIOINT;
2958c2ecf20Sopenharmony_ci		writel_relaxed(val, chip->intr + IPROC_CCA_INT_MASK);
2968c2ecf20Sopenharmony_ci	}
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ci	return 0;
2998c2ecf20Sopenharmony_ci}
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_cistatic const struct of_device_id bcm_iproc_gpio_of_match[] = {
3028c2ecf20Sopenharmony_ci	{ .compatible = "brcm,iproc-gpio-cca" },
3038c2ecf20Sopenharmony_ci	{}
3048c2ecf20Sopenharmony_ci};
3058c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, bcm_iproc_gpio_of_match);
3068c2ecf20Sopenharmony_ci
3078c2ecf20Sopenharmony_cistatic struct platform_driver bcm_iproc_gpio_driver = {
3088c2ecf20Sopenharmony_ci	.driver = {
3098c2ecf20Sopenharmony_ci		.name = "iproc-xgs-gpio",
3108c2ecf20Sopenharmony_ci		.of_match_table = bcm_iproc_gpio_of_match,
3118c2ecf20Sopenharmony_ci	},
3128c2ecf20Sopenharmony_ci	.probe = iproc_gpio_probe,
3138c2ecf20Sopenharmony_ci	.remove = iproc_gpio_remove,
3148c2ecf20Sopenharmony_ci};
3158c2ecf20Sopenharmony_ci
3168c2ecf20Sopenharmony_cimodule_platform_driver(bcm_iproc_gpio_driver);
3178c2ecf20Sopenharmony_ci
3188c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("XGS IPROC GPIO driver");
3198c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2");
320