Lines Matching +full:data +full:- +full:enable +full:- +full:active
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
45 #define pin_to_hwirq(r, p) ((r)->parent_base + (p) - (r)->pin_base)
65 unsigned long enable; in __pdc_enable_intr() local
73 enable = pdc_reg_read(IRQ_ENABLE_BANK, index); in __pdc_enable_intr()
74 __assign_bit(mask, &enable, on); in __pdc_enable_intr()
75 pdc_reg_write(IRQ_ENABLE_BANK, index, enable); in __pdc_enable_intr()
77 enable = pdc_reg_read(IRQ_i_CFG, pin_out); in __pdc_enable_intr()
78 __assign_bit(IRQ_i_CFG_IRQ_ENABLE, &enable, on); in __pdc_enable_intr()
79 pdc_reg_write(IRQ_i_CFG, pin_out, enable); in __pdc_enable_intr()
88 __pdc_enable_intr(d->hwirq, on); in pdc_enable_intr()
105 * GIC does not handle falling edge or active low. To allow falling edge and
106 * active low interrupts to be handled at GIC, PDC has an inverter that inverts
107 * falling edge into a rising edge and active low into an active high.
110 * Level sensitive active low LOW
114 * Level sensitive active High HIGH
130 * @d: the interrupt data
165 return -EINVAL; in qcom_pdc_gic_set_type()
168 old_pdc_type = pdc_reg_read(IRQ_i_CFG, d->hwirq); in qcom_pdc_gic_set_type()
170 pdc_reg_write(IRQ_i_CFG, d->hwirq, pdc_type); in qcom_pdc_gic_set_type()
224 unsigned int nr_irqs, void *data) in qcom_pdc_alloc() argument
226 struct irq_fwspec *fwspec = data; in qcom_pdc_alloc()
247 return irq_domain_disconnect_hierarchy(domain->parent, virq); in qcom_pdc_alloc()
255 parent_fwspec.fwnode = domain->parent->fwnode; in qcom_pdc_alloc()
275 n = of_property_count_elems_of_size(np, "qcom,pdc-ranges", sizeof(u32)); in pdc_setup_pin_mapping()
277 return -EINVAL; in pdc_setup_pin_mapping()
283 return -ENOMEM; in pdc_setup_pin_mapping()
287 ret = of_property_read_u32_index(np, "qcom,pdc-ranges", in pdc_setup_pin_mapping()
292 ret = of_property_read_u32_index(np, "qcom,pdc-ranges", in pdc_setup_pin_mapping()
297 ret = of_property_read_u32_index(np, "qcom,pdc-ranges", in pdc_setup_pin_mapping()
321 return -EINVAL; in qcom_pdc_init()
330 return -ENXIO; in qcom_pdc_init()
338 ret = -ENXIO; in qcom_pdc_init()
344 pr_err("%pOF: failed to init PDC pin-hwirq mapping\n", node); in qcom_pdc_init()
355 ret = -ENOMEM; in qcom_pdc_init()