1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
10 int irq_route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
12 const struct irq_ops *ops = irq_get_ops(dev);
14 if (!ops->route_pmc_gpio_gpe)
17 return ops->route_pmc_gpio_gpe(dev, pmc_gpe_num);
20 int irq_set_polarity(struct udevice *dev, uint irq, bool active_low)
22 const struct irq_ops *ops = irq_get_ops(dev);
24 if (!ops->set_polarity)
27 return ops->set_polarity(dev, irq, active_low);
30 int irq_snapshot_polarities(struct udevice *dev)
32 const struct irq_ops *ops = irq_get_ops(dev);
34 if (!ops->snapshot_polarities)
37 return ops->snapshot_polarities(dev);
40 int irq_restore_polarities(struct udevice *dev)
42 const struct irq_ops *ops = irq_get_ops(dev);
44 if (!ops->restore_polarities)
47 return ops->restore_polarities(dev);
50 UCLASS_DRIVER(irq) = {