/openbmc/linux/drivers/staging/nvec/ |
H A D | nvec.c | 3 * NVEC: NVIDIA compliant embedded controller interface 33 #include "nvec.h" 80 .name = "nvec-kbd", 83 .name = "nvec-mouse", 86 .name = "nvec-power", 90 .name = "nvec-power", 94 .name = "nvec-paz00", 99 * nvec_register_notifier - Register a notifier with nvec 100 * @nvec: A &struct nvec_chip 104 * Registers a notifier with @nvec. The notifier will be added to an atomic [all …]
|
H A D | nvec_kbd.c | 17 #include "nvec-keytable.h" 18 #include "nvec.h" 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 128 idev->name = "nvec keyboard"; in nvec_kbd_probe() 129 idev->phys = "nvec"; in nvec_kbd_probe() 147 keys_dev.nvec = nvec; in nvec_kbd_probe() [all …]
|
H A D | nvec_ps2.c | 18 #include "nvec.h" 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 115 strscpy(ser_dev->name, "nvec mouse", sizeof(ser_dev->name)); in nvec_mouse_probe() 116 strscpy(ser_dev->phys, "nvec", sizeof(ser_dev->phys)); in nvec_mouse_probe() 120 ps2_dev.nvec = nvec; in nvec_mouse_probe() 121 nvec_register_notifier(nvec, &ps2_dev.notifier, 0); in nvec_mouse_probe() [all …]
|
H A D | nvec_paz00.c | 15 #include "nvec.h" 23 struct nvec_chip *nvec; member 34 nvec_write_async(led->nvec, buf, sizeof(buf)); in nvec_led_brightness_set() 41 struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent); in nvec_paz00_probe() local 54 led->nvec = nvec; in nvec_paz00_probe() 71 .name = "nvec-paz00", 78 MODULE_DESCRIPTION("Tegra NVEC PAZ00 driver"); 80 MODULE_ALIAS("platform:nvec-paz00");
|
H A D | Kconfig | 11 called mfd-nvec 21 called keyboard-nvec 31 called serio-nvec-ps2 35 tristate "NVEC charger and battery" 42 called nvec-power 53 called nvec-paz00
|
H A D | nvec_power.c | 19 #include "nvec.h" 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() 438 .name = "nvec-power", [all …]
|
H A D | README | 1 NVEC: An NVidia compliant Embedded Controller Protocol Implementation 3 This is an implementation of the NVEC protocol used to communicate with an 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…
|
H A D | nvec.h | 3 * NVEC: NVIDIA compliant embedded controller interface 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);
|
/openbmc/linux/drivers/pci/msi/ |
H A D | msi.c | 22 * @nvec: how many MSIs have been requested? 28 static int pci_msi_supported(struct pci_dev *dev, int nvec) in pci_msi_supported() argument 42 * b) the list manipulation code assumes nvec >= 1. in pci_msi_supported() 44 if (nvec < 1) in pci_msi_supported() 281 static int msi_setup_msi_desc(struct pci_dev *dev, int nvec, in msi_setup_msi_desc() argument 298 desc.nvec_used = nvec; in msi_setup_msi_desc() 303 desc.pci.msi_attrib.multiple = ilog2(__roundup_pow_of_two(nvec)); in msi_setup_msi_desc() 338 * @nvec: number of interrupts to allocate 347 static int msi_capability_init(struct pci_dev *dev, int nvec, in msi_capability_init() argument 355 if (nvec > 1 && !pci_msi_domain_supports(dev, MSI_FLAG_MULTI_PCI_MSI, ALLOW_LEGACY)) in msi_capability_init() [all …]
|
H A D | legacy.c | 19 int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in arch_setup_msi_irqs() argument 28 if (type == PCI_CAP_ID_MSI && nvec > 1) in arch_setup_msi_irqs() 66 int pci_msi_legacy_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in pci_msi_legacy_setup_msi_irqs() argument 68 int ret = arch_setup_msi_irqs(dev, nvec, type); in pci_msi_legacy_setup_msi_irqs()
|
/openbmc/linux/drivers/net/wwan/iosm/ |
H A 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()
|
/openbmc/linux/drivers/fpga/ |
H A 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() 145 static int *cci_pci_create_irq_table(struct pci_dev *pcidev, unsigned int nvec) in cci_pci_create_irq_table() argument 150 table = kcalloc(nvec, sizeof(int), GFP_KERNEL); in cci_pci_create_irq_table() 154 for (i = 0; i < nvec; i++) in cci_pci_create_irq_table() 310 int nvec, ret = 0; in cci_enumerate_feature_devs() local 319 nvec = cci_pci_alloc_irq(pcidev); in cci_enumerate_feature_devs() 320 if (nvec < 0) { in cci_enumerate_feature_devs() [all …]
|
/openbmc/linux/arch/powerpc/platforms/pseries/ |
H A D | msi.c | 115 static int check_req(struct pci_dev *pdev, int nvec, char *prop_name) in check_req() argument 130 if (req_msi < nvec) { in check_req() 131 pr_debug("rtas_msi: %s requests < %d MSIs\n", prop_name, nvec); in check_req() 142 static int check_req_msi(struct pci_dev *pdev, int nvec) in check_req_msi() argument 144 return check_req(pdev, nvec, "ibm,req#msi"); in check_req_msi() 147 static int check_req_msix(struct pci_dev *pdev, int nvec) in check_req_msix() argument 149 return check_req(pdev, nvec, "ibm,req#msi-x"); in check_req_msix() 347 int nvec = nvec_in; in rtas_prepare_msi_irqs() local 351 rc = check_req_msix(pdev, nvec); in rtas_prepare_msi_irqs() 353 rc = check_req_msi(pdev, nvec); in rtas_prepare_msi_irqs() [all …]
|
/openbmc/linux/drivers/base/ |
H A D | platform-msi.c | 143 static int platform_msi_alloc_priv_data(struct device *dev, unsigned int nvec, in platform_msi_alloc_priv_data() argument 155 if (!dev->msi.domain || !write_msi_msg || !nvec || nvec > MAX_DEV_MSIS) in platform_msi_alloc_priv_data() 201 * @nvec: The number of interrupts to allocate 207 int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec, in platform_msi_domain_alloc_irqs() argument 212 err = platform_msi_alloc_priv_data(dev, nvec, write_msi_msg); in platform_msi_domain_alloc_irqs() 216 err = msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, nvec - 1); in platform_msi_domain_alloc_irqs() 256 * @nvec: The number of MSIs that need to be allocated 262 * Return: An irqdomain for @nvec interrupts on success, NULL in case of error. 270 unsigned int nvec, in __platform_msi_create_device_domain() argument 280 err = platform_msi_alloc_priv_data(dev, nvec, write_msi_msg); in __platform_msi_create_device_domain() [all …]
|
/openbmc/linux/Documentation/translations/zh_CN/PCI/ |
H A D | msi-howto.rst | 113 nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_ALL_TYPES) 114 if (nvec < 0) 120 ret = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_ALL_TYPES); 133 nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_MSI | PCI_IRQ_MSIX); 134 if (nvec < 0)
|
/openbmc/linux/arch/x86/pci/ |
H A D | xen.c | 161 int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type); 167 static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in xen_setup_msi_irqs() argument 173 if (type == PCI_CAP_ID_MSI && nvec > 1) in xen_setup_msi_irqs() 176 v = kcalloc(max(1, nvec), sizeof(int), GFP_KERNEL); in xen_setup_msi_irqs() 181 ret = xen_pci_frontend_enable_msix(dev, v, nvec); in xen_setup_msi_irqs() 189 (type == PCI_CAP_ID_MSI) ? nvec : 1, in xen_setup_msi_irqs() 229 static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in xen_hvm_setup_msi_irqs() argument 235 if (type == PCI_CAP_ID_MSI && nvec > 1) in xen_hvm_setup_msi_irqs() 248 (type == PCI_CAP_ID_MSI) ? nvec : 1, in xen_hvm_setup_msi_irqs() 268 static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in xen_initdom_setup_msi_irqs() argument [all …]
|
/openbmc/linux/drivers/soc/ti/ |
H A D | ti_sci_inta_msi.c | 97 int ret, nvec; in ti_sci_inta_msi_domain_alloc_irqs() local 107 nvec = ti_sci_inta_msi_alloc_descs(dev, res); in ti_sci_inta_msi_domain_alloc_irqs() 108 if (nvec <= 0) { in ti_sci_inta_msi_domain_alloc_irqs() 109 ret = nvec; in ti_sci_inta_msi_domain_alloc_irqs() 114 ret = msi_domain_alloc_irqs_all_locked(dev, MSI_DEFAULT_DOMAIN, nvec); in ti_sci_inta_msi_domain_alloc_irqs()
|
/openbmc/linux/drivers/irqchip/ |
H A D | irq-gic-v3-its-pci-msi.c | 54 int nvec, msi_alloc_info_t *info) in its_pci_msi_prepare() argument 90 nvec = max(nvec, alias_count); in its_pci_msi_prepare() 93 nvec = max_t(int, minnvec, roundup_pow_of_two(nvec)); in its_pci_msi_prepare() 94 return msi_info->ops->msi_prepare(domain->parent, dev, nvec, info); in its_pci_msi_prepare()
|
H A 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()
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | msi.c | 12 int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) in arch_setup_msi_irqs() argument 23 if (type == PCI_CAP_ID_MSI && nvec > 1) in arch_setup_msi_irqs() 26 return phb->controller_ops.setup_msi_irqs(dev, nvec, type); in arch_setup_msi_irqs()
|
/openbmc/linux/Documentation/PCI/ |
H A D | msi-howto.rst | 134 as possible, likely up to the limit supported by the device. If nvec is 139 nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_ALL_TYPES) 140 if (nvec < 0) 148 ret = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_ALL_TYPES); 163 nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_MSI | PCI_IRQ_MSIX); 164 if (nvec < 0)
|
/openbmc/linux/include/linux/ |
H A D | msi.h | 384 int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); 459 struct device *dev, int nvec, 466 struct device *dev, int nvec); 630 int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec, 636 int nvec, msi_alloc_info_t *args); 638 int virq, int nvec, msi_alloc_info_t *args); 639 void msi_domain_depopulate_descs(struct device *dev, int virq, int nvec); 643 unsigned int nvec, 649 #define platform_msi_create_device_domain(dev, nvec, write, ops, data) \ argument 650 __platform_msi_create_device_domain(dev, nvec, false, write, ops, data) [all …]
|
/openbmc/linux/drivers/mmc/host/ |
H A D | cavium-thunderx.c | 40 int nvec, ret, i; in thunder_mmc_register_interrupts() local 42 nvec = pci_alloc_irq_vectors(pdev, 1, 9, PCI_IRQ_MSIX); in thunder_mmc_register_interrupts() 43 if (nvec < 0) in thunder_mmc_register_interrupts() 44 return nvec; in thunder_mmc_register_interrupts() 47 for (i = 0; i < nvec; i++) { in thunder_mmc_register_interrupts()
|
/openbmc/linux/Documentation/devicetree/bindings/soc/tegra/ |
H A D | nvidia,nvec.yaml | 4 $id: http://devicetree.org/schemas/soc/tegra/nvidia,nvec.yaml# 15 const: nvidia,nvec 73 compatible = "nvidia,nvec";
|
/openbmc/linux/arch/x86/include/asm/xen/ |
H A D | pci.h | 34 int (*enable_msix)(struct pci_dev *dev, int vectors[], int nvec); 53 int vectors[], int nvec) in xen_pci_frontend_enable_msix() argument 56 return xen_pci_frontend->enable_msix(dev, vectors, nvec); in xen_pci_frontend_enable_msix()
|