/drivers/staging/nvec/ |
D | nvec.c | 108 int nvec_register_notifier(struct nvec_chip *nvec, struct notifier_block *nb, in nvec_register_notifier() argument 111 return atomic_notifier_chain_register(&nvec->notifier_list, nb); in nvec_register_notifier() 123 int nvec_unregister_notifier(struct nvec_chip *nvec, struct notifier_block *nb) in nvec_unregister_notifier() argument 125 return atomic_notifier_chain_unregister(&nvec->notifier_list, nb); in nvec_unregister_notifier() 138 struct nvec_chip *nvec = container_of(nb, struct nvec_chip, in nvec_status_notifier() local 145 dev_warn(nvec->dev, "unhandled msg type %ld\n", event_type); in nvec_status_notifier() 166 static struct nvec_msg *nvec_msg_alloc(struct nvec_chip *nvec, in nvec_msg_alloc() argument 172 if (atomic_xchg(&nvec->msg_pool[i].used, 1) == 0) { in nvec_msg_alloc() 173 dev_vdbg(nvec->dev, "INFO: Allocate %i\n", i); in nvec_msg_alloc() 174 return &nvec->msg_pool[i]; in nvec_msg_alloc() [all …]
|
D | nvec_kbd.c | 34 struct nvec_chip *nvec; member 50 nvec_write_async(keys_dev.nvec, buf, sizeof(buf)); in nvec_kbd_toggle_led() 88 struct nvec_chip *nvec = keys_dev.nvec; in nvec_kbd_event() local 101 nvec_write_async(nvec, buf, sizeof(buf)); in nvec_kbd_event() 108 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); in nvec_kbd_probe() local 147 keys_dev.nvec = nvec; in nvec_kbd_probe() 148 nvec_register_notifier(nvec, &keys_dev.notifier, 0); in nvec_kbd_probe() 151 nvec_write_async(nvec, enable_kbd, 2); in nvec_kbd_probe() 154 nvec_write_async(nvec, cnfg_wake, 4); in nvec_kbd_probe() 156 nvec_write_async(nvec, cnfg_wake_key_reporting, 3); in nvec_kbd_probe() [all …]
|
D | nvec_ps2.c | 44 struct nvec_chip *nvec; member 53 return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf)); in ps2_startstreaming() 60 nvec_write_async(ps2_dev.nvec, buf, sizeof(buf)); in ps2_stopstreaming() 70 return nvec_write_async(ps2_dev.nvec, buf, sizeof(buf)); in ps2_sendcommand() 103 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); in nvec_mouse_probe() local 120 ps2_dev.nvec = nvec; in nvec_mouse_probe() 121 nvec_register_notifier(nvec, &ps2_dev.notifier, 0); in nvec_mouse_probe() 130 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); in nvec_mouse_remove() local 134 nvec_unregister_notifier(nvec, &ps2_dev.notifier); in nvec_mouse_remove()
|
D | nvec_paz00.c | 26 struct nvec_chip *nvec; member 37 nvec_write_async(led->nvec, buf, sizeof(buf)); in nvec_led_brightness_set() 44 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); in nvec_paz00_probe() local 57 led->nvec = nvec; in nvec_paz00_probe()
|
D | nvec_power.c | 26 struct nvec_chip *nvec; member 116 nvec_write_async(power->nvec, buf, 2); in get_bat_mfg_data() 358 nvec_write_async(power->nvec, buf, 2); in nvec_power_poll() 367 nvec_write_async(power->nvec, buf, 2); in nvec_power_poll() 377 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); in nvec_power_probe() local 385 power->nvec = nvec; in nvec_power_probe() 409 nvec_register_notifier(nvec, &power->notifier, NVEC_SYS); in nvec_power_probe() 424 nvec_unregister_notifier(power->nvec, &power->notifier); in nvec_power_remove()
|
D | nvec.h | 164 int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data, 167 int nvec_write_sync(struct nvec_chip *nvec, 171 int nvec_register_notifier(struct nvec_chip *nvec, 177 void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg);
|
D | Kconfig | 11 called mfd-nvec 21 called keyboard-nvec 31 called serio-nvec-ps2 42 called nvec-power 53 called nvec-paz00
|
D | README | 9 but the source code[1] of the published nvec reference drivers can be a guide. 13 [1] e.g. https://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=tree;f=arch/arm/mach-tegra/nvec;hb=a…
|
D | Makefile | 3 obj-$(CONFIG_MFD_NVEC) += nvec.o
|
/drivers/base/ |
D | platform-msi.c | 116 static void platform_msi_free_descs(struct device *dev, int base, int nvec) in platform_msi_free_descs() argument 122 desc->platform.msi_index < (base + nvec)) { in platform_msi_free_descs() 130 int nvec, in platform_msi_alloc_descs_with_irq() argument 143 for (i = 0; i < nvec; i++) { in platform_msi_alloc_descs_with_irq() 155 if (i != nvec) { in platform_msi_alloc_descs_with_irq() 157 platform_msi_free_descs(dev, base, nvec); in platform_msi_alloc_descs_with_irq() 165 static int platform_msi_alloc_descs(struct device *dev, int nvec, in platform_msi_alloc_descs() argument 169 return platform_msi_alloc_descs_with_irq(dev, 0, nvec, data); in platform_msi_alloc_descs() 203 platform_msi_alloc_priv_data(struct device *dev, unsigned int nvec, in platform_msi_alloc_priv_data() argument 213 if (!dev->msi_domain || !write_msi_msg || !nvec || nvec > MAX_DEV_MSIS) in platform_msi_alloc_priv_data() [all …]
|
D | platform.c | 339 int i, ret, nvec; in devm_platform_get_irqs_affinity() local 347 nvec = platform_irq_count(dev); in devm_platform_get_irqs_affinity() 348 if (nvec < 0) in devm_platform_get_irqs_affinity() 349 return nvec; in devm_platform_get_irqs_affinity() 351 if (nvec < minvec) in devm_platform_get_irqs_affinity() 354 nvec = irq_calc_affinity_vectors(minvec, nvec, affd); in devm_platform_get_irqs_affinity() 355 if (nvec < minvec) in devm_platform_get_irqs_affinity() 358 if (nvec > maxvec) in devm_platform_get_irqs_affinity() 359 nvec = maxvec; in devm_platform_get_irqs_affinity() 361 size = sizeof(*ptr) + sizeof(unsigned int) * nvec; in devm_platform_get_irqs_affinity() [all …]
|
/drivers/pci/ |
D | msi.c | 37 static int pci_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in pci_msi_setup_msi_irqs() argument 43 return msi_domain_alloc_irqs(domain, &dev->dev, nvec); in pci_msi_setup_msi_irqs() 45 return arch_setup_msi_irqs(dev, nvec, type); in pci_msi_setup_msi_irqs() 74 int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in arch_setup_msi_irqs() argument 83 if (type == PCI_CAP_ID_MSI && nvec > 1) in arch_setup_msi_irqs() 465 msi_setup_entry(struct pci_dev *dev, int nvec, struct irq_affinity *affd) in msi_setup_entry() argument 472 masks = irq_create_affinity_masks(nvec, affd); in msi_setup_entry() 475 entry = alloc_msi_entry(&dev->dev, nvec, masks); in msi_setup_entry() 492 entry->msi_attrib.multiple = ilog2(__roundup_pow_of_two(nvec)); in msi_setup_entry() 537 static int msi_capability_init(struct pci_dev *dev, int nvec, in msi_capability_init() argument [all …]
|
/drivers/net/wwan/iosm/ |
D | iosm_ipc_irq.c | 40 if (instance >= ipc_pcie->nvec) in ipc_msi_interrupt() 54 while (--ipc_pcie->nvec >= 0) in ipc_release_irq() 55 free_irq(pdev->irq + ipc_pcie->nvec, ipc_pcie); in ipc_release_irq() 65 ipc_pcie->nvec = pci_alloc_irq_vectors(pdev, IPC_MSI_VECTORS, in ipc_acquire_irq() 68 if (ipc_pcie->nvec < 0) { in ipc_acquire_irq() 69 rc = ipc_pcie->nvec; in ipc_acquire_irq() 76 for (i = 0; i < ipc_pcie->nvec; ++i) { in ipc_acquire_irq() 82 ipc_pcie->nvec = i; in ipc_acquire_irq()
|
/drivers/fpga/ |
D | dfl-pci.c | 52 int ret, nvec = pci_msix_vec_count(pcidev); in cci_pci_alloc_irq() local 54 if (nvec <= 0) { in cci_pci_alloc_irq() 59 ret = pci_alloc_irq_vectors(pcidev, nvec, nvec, PCI_IRQ_MSIX); in cci_pci_alloc_irq() 63 return nvec; in cci_pci_alloc_irq() 124 static int *cci_pci_create_irq_table(struct pci_dev *pcidev, unsigned int nvec) in cci_pci_create_irq_table() argument 129 table = kcalloc(nvec, sizeof(int), GFP_KERNEL); in cci_pci_create_irq_table() 133 for (i = 0; i < nvec; i++) in cci_pci_create_irq_table() 287 int nvec, ret = 0; in cci_enumerate_feature_devs() local 296 nvec = cci_pci_alloc_irq(pcidev); in cci_enumerate_feature_devs() 297 if (nvec < 0) { in cci_enumerate_feature_devs() [all …]
|
/drivers/pci/pcie/ |
D | portdrv_core.c | 48 u32 nvec = 0, pos; in pcie_message_numbers() local 62 nvec = *pme + 1; in pcie_message_numbers() 74 nvec = max(nvec, *aer + 1); in pcie_message_numbers() 85 nvec = max(nvec, *dpc + 1); in pcie_message_numbers() 89 return nvec; in pcie_message_numbers() 103 int nr_entries, nvec, pcie_irq; in pcie_port_enable_irq_vec() local 113 nvec = pcie_message_numbers(dev, mask, &pme, &aer, &dpc); in pcie_port_enable_irq_vec() 114 if (nvec > nr_entries) { in pcie_port_enable_irq_vec() 130 if (nvec != nr_entries) { in pcie_port_enable_irq_vec() 133 nr_entries = pci_alloc_irq_vectors(dev, nvec, nvec, in pcie_port_enable_irq_vec()
|
/drivers/irqchip/ |
D | irq-gic-v3-its-pci-msi.c | 55 int nvec, msi_alloc_info_t *info) in its_pci_msi_prepare() argument 91 nvec = max(nvec, alias_count); in its_pci_msi_prepare() 94 nvec = max_t(int, minnvec, roundup_pow_of_two(nvec)); in its_pci_msi_prepare() 95 return msi_info->ops->msi_prepare(domain->parent, dev, nvec, info); in its_pci_msi_prepare()
|
D | irq-gic-v3-its-platform-msi.c | 47 int nvec, msi_alloc_info_t *info) in its_pmsi_prepare() argument 66 nvec = max_t(int, 32, roundup_pow_of_two(nvec)); in its_pmsi_prepare() 68 dev, nvec, info); in its_pmsi_prepare()
|
D | irq-gic-v3-its-fsl-mc-msi.c | 43 int nvec, msi_alloc_info_t *info) in its_fsl_mc_msi_prepare() argument 66 nvec = max_t(int, 32, roundup_pow_of_two(nvec)); in its_fsl_mc_msi_prepare() 67 return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info); in its_fsl_mc_msi_prepare()
|
/drivers/soc/ti/ |
D | ti_sci_inta_msi.c | 114 int ret, nvec; in ti_sci_inta_msi_domain_alloc_irqs() local 123 nvec = ti_sci_inta_msi_alloc_descs(dev, res); in ti_sci_inta_msi_domain_alloc_irqs() 124 if (nvec <= 0) in ti_sci_inta_msi_domain_alloc_irqs() 125 return nvec; in ti_sci_inta_msi_domain_alloc_irqs() 127 ret = msi_domain_alloc_irqs(msi_domain, dev, nvec); in ti_sci_inta_msi_domain_alloc_irqs()
|
/drivers/mmc/host/ |
D | cavium-thunderx.c | 39 int nvec, ret, i; in thunder_mmc_register_interrupts() local 41 nvec = pci_alloc_irq_vectors(pdev, 1, 9, PCI_IRQ_MSIX); in thunder_mmc_register_interrupts() 42 if (nvec < 0) in thunder_mmc_register_interrupts() 43 return nvec; in thunder_mmc_register_interrupts() 46 for (i = 0; i < nvec; i++) { in thunder_mmc_register_interrupts()
|
/drivers/infiniband/hw/qib/ |
D | qib_pcie.c | 207 int nvec; in qib_pcie_params() local 216 nvec = -1; in qib_pcie_params() 223 nvec = pci_alloc_irq_vectors(dd->pcidev, 1, maxvec, flags); in qib_pcie_params() 224 if (nvec < 0) in qib_pcie_params() 233 *nent = !dd->pcidev->msix_enabled ? 0 : nvec; in qib_pcie_params() 277 return nvec < 0 ? nvec : 0; in qib_pcie_params()
|
/drivers/vfio/pci/ |
D | vfio_pci_intrs.c | 247 static int vfio_msi_enable(struct vfio_pci_core_device *vdev, int nvec, bool msix) in vfio_msi_enable() argument 257 vdev->ctx = kcalloc(nvec, sizeof(struct vfio_pci_irq_ctx), GFP_KERNEL); in vfio_msi_enable() 263 ret = pci_alloc_irq_vectors(pdev, 1, nvec, flag); in vfio_msi_enable() 264 if (ret < nvec) { in vfio_msi_enable() 273 vdev->num_ctx = nvec; in vfio_msi_enable() 282 vdev->msi_qmax = fls(nvec * 2 - 1) - 1; in vfio_msi_enable()
|
/drivers/scsi/bfa/ |
D | bfad.c | 1152 for (i = 0, bfad->nvec = 0; i < MAX_MSIX_ENTRY; i++) { in bfad_init_msix_entry() 1154 bfad->msix_tab[bfad->nvec].msix.entry = i; in bfad_init_msix_entry() 1155 bfad->msix_tab[bfad->nvec].bfad = bfad; in bfad_init_msix_entry() 1156 msix_entries[bfad->nvec].entry = i; in bfad_init_msix_entry() 1157 bfad->nvec++; in bfad_init_msix_entry() 1170 for (i = 0; i < bfad->nvec; i++) { in bfad_install_msix_handler() 1220 msix_entries, bfad->nvec); in bfad_setup_intr() 1225 bfad->pci_name, bfad->nvec, error); in bfad_setup_intr() 1226 bfad->nvec = 1; in bfad_setup_intr() 1247 for (i = 0; i < bfad->nvec; i++) { in bfad_setup_intr() [all …]
|
/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_irq.c | 317 int nvec = pci_msix_vec_count(adev->pdev); in amdgpu_irq_init() local 320 if (nvec <= 0) { in amdgpu_irq_init() 326 nvec = pci_alloc_irq_vectors(adev->pdev, 1, 1, flags); in amdgpu_irq_init() 327 if (nvec > 0) { in amdgpu_irq_init()
|
/drivers/net/ethernet/microsoft/mana/ |
D | gdma_main.c | 1173 int nvec, irq; in mana_gd_setup_irqs() local 1182 nvec = pci_alloc_irq_vectors(pdev, 2, max_irqs, PCI_IRQ_MSIX); in mana_gd_setup_irqs() 1183 if (nvec < 0) in mana_gd_setup_irqs() 1184 return nvec; in mana_gd_setup_irqs() 1186 gc->irq_contexts = kcalloc(nvec, sizeof(struct gdma_irq_context), in mana_gd_setup_irqs() 1193 for (i = 0; i < nvec; i++) { in mana_gd_setup_irqs() 1216 err = mana_gd_alloc_res_map(nvec, &gc->msix_resource); in mana_gd_setup_irqs() 1220 gc->max_num_msix = nvec; in mana_gd_setup_irqs() 1221 gc->num_msix_usable = nvec; in mana_gd_setup_irqs()
|