| /linux/net/core/ |
| H A D | dev_addr_lists.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * net/core/dev_addr_lists.c - Functions for handling net device lists 6 * This file contains functions for working with unicast, multicast and device 24 struct rb_node **ins_point = &list->tree.rb_node, *parent = NULL; in __hw_addr_insert() 31 diff = memcmp(new->addr, ha->addr, addr_len); in __hw_addr_insert() 33 diff = memcmp(&new->type, &ha->type, sizeof(new->type)); in __hw_addr_insert() 37 ins_point = &parent->rb_left; in __hw_addr_insert() 39 ins_point = &parent->rb_right; in __hw_addr_insert() 41 return -EEXIST; in __hw_addr_insert() 44 rb_link_node_rcu(&new->node, parent, ins_point); in __hw_addr_insert() [all …]
|
| H A D | of_net.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/device.h> 15 #include <linux/nvmem-consumer.h> 18 * of_get_phy_mode - Get phy mode for given device_node 22 * The function gets phy interface string from property 'phy-mode' or 23 * 'phy-connection-type'. The index in phy_modes table is set in 25 * PHY_INTERFACE_MODE_NA and an errno is returned, e.g. -ENODEV. 34 err = of_property_read_string(np, "phy-mode", &pm); in of_get_phy_mode() 36 err = of_property_read_string(np, "phy-connection-type", &pm); in of_get_phy_mode() 46 return -ENODEV; in of_get_phy_mode() [all …]
|
| /linux/drivers/peci/ |
| H A D | device.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright (c) 2018-2021 Intel Corporation 6 #include <linux/peci-cpu.h> 12 * PECI device can be removed using sysfs, but the removal can also happen as 14 * Mutex is used to protect PECI device from being double-deleted. 19 static int peci_get_revision(struct peci_device *device, u8 *revision) in peci_get_revision() argument 24 req = peci_xfer_get_dib(device); in peci_get_revision() 29 * PECI device may be in a state where it is unable to return a proper in peci_get_revision() 37 return -EIO; in peci_get_revision() 47 static int peci_get_cpu_id(struct peci_device *device, u32 *cpu_id) in peci_get_cpu_id() argument [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
| H A D | shadowramin.c | 33 struct nvkm_device *device = bios->subdev.device; in pramin_read() local 37 *(u32 *)&bios->data[i] = nvkm_rd32(device, 0x700000 + i); in pramin_read() 48 struct nvkm_device *device = priv->bios->subdev.device; in pramin_fini() local 49 nvkm_wr32(device, 0x001700, priv->bar0); in pramin_fini() 57 struct nvkm_subdev *subdev = &bios->subdev; in pramin_init() 58 struct nvkm_device *device = subdev->device; in pramin_init() local 60 u64 addr = 0; in pramin_init() local 63 if (device->card_type < NV_50) in pramin_init() 67 if (device->card_type >= GA100) in pramin_init() 68 addr = device->chipset == 0x170; /*XXX: find the fuse reg for this */ in pramin_init() [all …]
|
| /linux/drivers/net/phy/ |
| H A D | mdio_bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <linux/device.h> 32 #include "mdio-private.h" 41 if (mdiodev->bus->mdio_map[mdiodev->addr]) in mdiobus_register_device() 42 return -EBUSY; in mdiobus_register_device() 44 if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) { in mdiobus_register_device() 53 mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; in mdiobus_register_device() 61 if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev) in mdiobus_unregister_device() 62 return -EINVAL; in mdiobus_unregister_device() 66 mdiodev->bus->mdio_map[mdiodev->addr] = NULL; in mdiobus_unregister_device() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
| H A D | ga100.c | 39 return (chan->cgrp->runl->doorbell << 16) | chan->id; in ga100_chan_doorbell_handle() 45 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_stop() 47 nvkm_wr32(runl->fifo->engine.subdev.device, runl->chan + (chan->id * 4), 0x00000003); in ga100_chan_stop() 53 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_start() 54 struct nvkm_device *device = runl->fifo->engine.subdev.device; in ga100_chan_start() local 57 nvkm_wr32(device, runl->chan + (chan->id * 4), 0x00000002); in ga100_chan_start() 58 nvkm_wr32(device, runl->addr + 0x0090, (gfid << 16) | chan->id); /* INTERNAL_DOORBELL. */ in ga100_chan_start() 64 struct nvkm_runl *runl = chan->cgrp->runl; in ga100_chan_unbind() 66 nvkm_wr32(runl->fifo->engine.subdev.device, runl->chan + (chan->id * 4), 0xffffffff); in ga100_chan_unbind() 74 nvkm_kmap(chan->inst); in ga100_chan_ramfc_write() [all …]
|
| /linux/lib/ |
| H A D | devres.c | 1 // SPDX-License-Identifier: GPL-2.0 3 #include <linux/device.h> 19 void devm_ioremap_release(struct device *dev, void *res) in devm_ioremap_release() 24 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) in devm_ioremap_match() 29 static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, in __devm_ioremap() 33 void __iomem **ptr, *addr = NULL; in __devm_ioremap() local 42 addr = ioremap(offset, size); in __devm_ioremap() 45 addr = ioremap_uc(offset, size); in __devm_ioremap() 48 addr = ioremap_wc(offset, size); in __devm_ioremap() 51 addr = ioremap_np(offset, size); in __devm_ioremap() [all …]
|
| /linux/drivers/cxl/core/ |
| H A D | regs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 #include <linux/io-64-nonatomic-lo-hi.h> 4 #include <linux/device.h> 16 * CXL device capabilitie 179 devm_cxl_iomap_block(struct device * dev,resource_size_t addr,resource_size_t length) devm_cxl_iomap_block() argument 210 void __iomem **addr; cxl_map_component_regs() member 219 resource_size_t addr; cxl_map_component_regs() local 244 void __iomem **addr; cxl_map_device_regs() member 255 resource_size_t addr; cxl_map_device_regs() local 487 void __iomem *addr; cxl_rcrb_to_aer() local 524 void __iomem *addr; cxl_rcrb_to_linkcap() local 582 void __iomem *addr; __rcrb_to_component() local [all...] |
| /linux/drivers/net/ethernet/huawei/hinic/ |
| H A D | hinic_hw_if.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 #include <linux/device.h> 20 #define VALID_MSIX_IDX(attr, msix_index) ((msix_index) < (attr)->num_irqs) 27 * hinic_msix_attr_set - set message attribute for msix entry 28 * @hwif: the HW interface of a pci function device 36 * Return 0 - Success, negative - Failure 43 u32 msix_ctrl, addr; in hinic_msix_attr_set() local 45 if (!VALID_MSIX_IDX(&hwif->attr, msix_index)) in hinic_msix_attr_set() 46 return -EINVAL; in hinic_msix_attr_set() 54 addr = HINIC_CSR_MSIX_CTRL_ADDR(msix_index); in hinic_msix_attr_set() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ |
| H A D | tu102.c | 42 nvkm_falcon_fw_dtor(&gsp->fws.falcon.sb); in tu102_gsp_fwsec_sb_dtor() 48 struct nvkm_subdev *subdev = &gsp->subdev; in tu102_gsp_booter_unload() 49 struct nvkm_device *device = subdev->device; in tu102_gsp_booter_unload() local 53 wpr2_hi = nvkm_rd32(device, 0x1fa828); in tu102_gsp_booter_unload() 55 nvkm_debug(subdev, "WPR2 not set - skipping booter unload\n"); in tu102_gsp_booter_unload() 59 ret = nvkm_falcon_fw_boot(&gsp->booter.unload, &gsp->subdev, true, &mbox0, &mbox1, 0, 0); in tu102_gsp_booter_unload() 63 wpr2_hi = nvkm_rd32(device, 0x1fa828); in tu102_gsp_booter_unload() 65 return -EIO; in tu102_gsp_booter_unload() 73 return nvkm_falcon_fw_boot(&gsp->booter.load, &gsp->subdev, true, &mbox0, &mbox1, 0, 0); in tu102_gsp_booter_load() 80 struct nvkm_subdev *subdev = &gsp->subdev; in tu102_gsp_booter_ctor() [all …]
|
| /linux/drivers/media/usb/em28xx/ |
| H A D | em28xx-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // em28xx-i2c.c - driver for Empia EM2800/EM2820/2840 USB video capture devices 20 #include <media/v4l2-common.h> 23 /* ----------------------------------------------------------- */ 35 dev_printk(KERN_DEBUG, &dev->intf->dev, \ 41 * 35ms is the maximum time a SMBUS device could wait when 54 switch (dev->i2c_speed & 0x03) { in em28xx_i2c_timeout() 71 * send up to 4 bytes to the em2800 i2c device 73 static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len) in em2800_i2c_send_bytes() argument 80 return -EOPNOTSUPP; in em2800_i2c_send_bytes() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
| H A D | busnv50.c | 31 u32 addr; member 39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_scl() local 40 if (state) bus->data |= 0x01; in nv50_i2c_bus_drive_scl() 41 else bus->data &= 0xfe; in nv50_i2c_bus_drive_scl() 42 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_scl() 49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_sda() local 50 if (state) bus->data |= 0x02; in nv50_i2c_bus_drive_sda() 51 else bus->data &= 0xfd; in nv50_i2c_bus_drive_sda() 52 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_sda() 59 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_sense_scl() local [all …]
|
| /linux/Documentation/devicetree/bindings/powerpc/fsl/ |
| H A D | mpc5200.txt | 1 MPC5200 Device Tree Bindings 2 ---------------------------- 4 (c) 2006-2009 Secret Lab Technologies Ltd 8 ------------------ 9 For mpc5200 on-chip devices, the format for each compatible value is 10 <chip>-<device>[-<mode>]. The OS should be able to match a device driver 11 to the device based solely on the compatible value. If two drivers 21 "fsl,mpc5200-<device>". 27 To express this information as completely as possible, 5200B device trees 29 compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>"; [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/ |
| H A D | xtensa.c | 30 struct nvkm_xtensa *xtensa = nvkm_xtensa(oclass->engine); in nvkm_xtensa_oclass_get() 33 while (xtensa->func->sclass[c].oclass) { in nvkm_xtensa_oclass_get() 35 oclass->base = xtensa->func->sclass[index]; in nvkm_xtensa_oclass_get() 47 return nvkm_gpuobj_new(object->engine->subdev.device, 0x10000, align, in nvkm_xtensa_cclass_bind() 60 struct nvkm_subdev *subdev = &xtensa->engine.subdev; in nvkm_xtensa_intr() 61 struct nvkm_device *device = subdev->device; in nvkm_xtensa_intr() local 62 const u32 base = xtensa->addr; in nvkm_xtensa_intr() 63 u32 unk104 = nvkm_rd32(device, base + 0xd04); in nvkm_xtensa_intr() 64 u32 intr = nvkm_rd32(device, base + 0xc20); in nvkm_xtensa_intr() 65 u32 chan = nvkm_rd32(device, base + 0xc28); in nvkm_xtensa_intr() [all …]
|
| /linux/drivers/gpio/ |
| H A D | gpio-f7188x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * GPIO driver for Fintek and Nuvoton Super-I/O chips 5 * Copyright (C) 2010-2013 LaCie 10 #define DRVNAME "gpio-f7188x" 21 * Super-I/O registers 23 #define SIO_LDSEL 0x07 /* Logical device select */ 24 #define SIO_DEVID 0x20 /* Device ID (2 bytes) */ 26 #define SIO_UNLOCK_KEY 0x87 /* Key to enable Super-I/O */ 27 #define SIO_LOCK_KEY 0xAA /* Key to disable Super-I/O */ 32 #define SIO_FINTEK_DEVREV 0x22 /* Fintek Device revision */ [all …]
|
| /linux/Documentation/i2c/ |
| H A D | smbus-protocol.rst | 14 If you write a driver for some I2C device, please try to use the SMBus 15 commands if at all possible (if the device uses only that subset of the 16 I2C protocol). This makes it possible to use the device driver on both 28 transaction function, a device driver should always check (just once) for 44 Addr (7 bits) I2C 7 bit address. Note that this can be expanded to 47 the device. 52 [..] Data sent by I2C device, as opposed to data sent by the host 60 This sends a single bit to the device, at the place of the Rd/Wr bit:: 62 S Addr Rd/Wr [A] P 72 This reads a single byte from a device, without specifying a device [all …]
|
| /linux/drivers/infiniband/core/ |
| H A D | cma.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 4 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. 5 * Copyright (c) 1999-2019, Mellanox Technologies, Inc. All rights reserved. 6 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. 64 [RDMA_CM_EVENT_DEVICE_REMOVAL] = "device removal", 71 static void cma_iboe_set_mgid(struct sockaddr *addr, union ib_gid *mgid, 88 if (rdma_ib_or_roce(id->devic in rdma_reject_msg() 205 struct ib_device *device; global() member 353 struct sockaddr_storage addr; global() member 369 __be32 addr; global() member 386 struct ib_device *device; global() member 656 cma_translate_addr(struct sockaddr * addr,struct rdma_dev_addr * dev_addr) cma_translate_addr() argument 671 cma_validate_port(struct ib_device * device,u32 port,enum ib_gid_type gid_type,union ib_gid * gid,struct rdma_id_private * id_priv) cma_validate_port() argument 932 struct sockaddr_ib *addr; cma_resolve_ib_dev() local 1325 cma_zero_addr(const struct sockaddr * addr) cma_zero_addr() argument 1339 cma_loopback_addr(const struct sockaddr * addr) cma_loopback_addr() argument 1356 cma_any_addr(const struct sockaddr * addr) cma_any_addr() argument 1392 cma_port(const struct sockaddr * addr) cma_port() argument 1410 cma_any_port(const struct sockaddr * addr) cma_any_port() argument 1725 struct sockaddr *addr = cma_src_addr(id_priv); cma_match_private_data() local 1760 struct ib_device *device = id->device; cma_protocol_roce() local 1781 const struct rdma_addr *addr = &id->route.addr; cma_match_net_dev() local 2483 rdma_get_service_id(struct rdma_cm_id * id,struct sockaddr * addr) rdma_get_service_id() argument 2495 struct rdma_addr *addr = &cm_id->route.addr; rdma_read_gids() local 2655 struct sockaddr *addr; cma_ib_listen() local 3132 struct rdma_addr *addr = &route->addr; cma_iboe_set_path_rec_l2_fields() local 3297 struct rdma_addr *addr = &route->addr; cma_resolve_iboe_route() local 3427 cma_set_loopback(struct sockaddr * addr) cma_set_loopback() argument 3508 struct sockaddr *addr; addr_handler() local 3647 struct sockaddr *addr; cma_bind_port() local 3798 struct sockaddr *addr, *cur_addr; cma_check_port() local 3918 cma_check_linklocal(struct rdma_dev_addr * dev_addr,struct sockaddr * addr) cma_check_linklocal() argument 4007 rdma_bind_addr_dst(struct rdma_id_private * id_priv,struct sockaddr * addr,const struct sockaddr * daddr) rdma_bind_addr_dst() argument 4180 rdma_bind_addr(struct rdma_cm_id * id,struct sockaddr * addr) rdma_bind_addr() argument 4893 cma_set_mgid(struct rdma_id_private * id_priv,struct sockaddr * addr,union ib_gid * mgid) cma_set_mgid() argument 4967 cma_iboe_set_mgid(struct sockaddr * addr,union ib_gid * mgid,enum ib_gid_type gid_type) cma_iboe_set_mgid() argument 5001 struct sockaddr *addr = (struct sockaddr *)&mc->addr; cma_iboe_join_multicast() local 5053 rdma_join_multicast(struct rdma_cm_id * id,struct sockaddr * addr,u8 join_state,void * context) rdma_join_multicast() argument 5106 rdma_leave_multicast(struct rdma_cm_id * id,struct sockaddr * addr) rdma_leave_multicast() argument 5323 cma_supported(struct ib_device * device) cma_supported() argument 5334 cma_add_one(struct ib_device * device) cma_add_one() argument 5411 cma_remove_one(struct ib_device * device,void * client_data) cma_remove_one() argument 5527 struct sockaddr_ib *addr; cma_query_ib_service_handler() local [all...] |
| /linux/include/linux/mmc/ |
| H A D | sdio_func.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 5 * Copyright 2007-2008 Pierre Ossman 11 #include <linux/device.h> 35 struct mmc_card *card; /* the card this device belongs to */ 36 struct device dev; /* the device */ 42 unsigned short device; /* device id */ global() member [all...] |
| /linux/drivers/input/rmi4/ |
| H A D | rmi_bus.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2011-2016 Synaptics Incorporated 21 * struct rmi_function - represents the implementation of an RMI4 22 * function for a particular device (basically, a driver for that RMI4 function) 25 * @rmi_dev: Pointer to the RMI device associated with this function container 26 * @dev: The device associated with this particular function. 34 * @node: entry in device's list of functions 39 struct device dev; 50 bool rmi_is_function_device(struct device *dev); 56 * struct rmi_function_handler - driver routines for a particular RMI function. [all …]
|
| /linux/arch/mips/kvm/ |
| H A D | loongson_ipi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Loongson-3 Virtual IPI interrupt support. 54 gpa_t addr, int len, void *val) in loongson_vipi_read() argument 56 uint32_t core = (addr >> 8) & 3; in loongson_vipi_read() 57 uint32_t node = (addr >> 44) & 3; in loongson_vipi_read() 59 uint64_t offset = addr & 0xff; in loongson_vipi_read() 61 struct ipi_state *s = &(ipi->ipistate[id]); in loongson_vipi_read() 63 BUG_ON(offset & (len - 1)); in loongson_vipi_read() 67 *(uint64_t *)val = s->status; in loongson_vipi_read() 71 *(uint64_t *)val = s->en; in loongson_vipi_read() [all …]
|
| /linux/drivers/usb/gadget/udc/ |
| H A D | udc-xilinx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 8 * Copyright (C) 2010 - 2014 Xilinx, Inc. 10 * Some parts of this driver code is based on the driver for at91-series 16 #include <linux/device.h> 17 #include <linux/dma-mapping.h> 27 /* Register offsets for the USB device.*/ 40 #define XUSB_DMA_DDAR_ADDR_OFFSET 0x020C /* DMA destination Addr Reg */ 82 /* USB device specific global configuration constants.*/ 109 * struct xusb_req - Xilinx USB device request structure 111 * @queue: usb device request queue [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/pci/ |
| H A D | base.c | 31 nvkm_pci_msi_rearm(struct nvkm_device *device) in nvkm_pci_msi_rearm() argument 33 struct nvkm_pci *pci = device->pci; in nvkm_pci_msi_rearm() 35 if (pci && pci->msi) in nvkm_pci_msi_rearm() 36 pci->func->msi_rearm(pci); in nvkm_pci_msi_rearm() 40 nvkm_pci_rd32(struct nvkm_pci *pci, u16 addr) in nvkm_pci_rd32() argument 42 return nvkm_rd32(pci->subdev.device, pci->func->cfg.addr + addr); in nvkm_pci_rd32() 46 nvkm_pci_wr08(struct nvkm_pci *pci, u16 addr, u8 data) in nvkm_pci_wr08() argument 48 nvkm_wr08(pci->subdev.device, pci->func->cfg.addr + addr, data); in nvkm_pci_wr08() 52 nvkm_pci_wr32(struct nvkm_pci *pci, u16 addr, u32 data) in nvkm_pci_wr32() argument 54 nvkm_wr32(pci->subdev.device, pci->func->cfg.addr + addr, data); in nvkm_pci_wr32() [all …]
|
| /linux/include/linux/ |
| H A D | virtio_pci_modern.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 * struct virtio_pci_modern_device - info for modern PCI virtio 11 * @pci_dev: Ptr to the PCI device struct 13 * @device: Device-specific data (non-legacy mode) 14 * @notify_base: Base of vq notifications (non-legacy mode) 17 * @notify_len: So we can sanity-check accesses 18 * @device_len: So we can sanity-check accesses 19 * @notify_map_cap: Capability for when we need to map notifications per-vq 21 * (non-legacy mode). 23 * @id: Device and vendor id [all …]
|
| /linux/sound/pci/ctxfi/ |
| H A D | ctvmem.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 * for card device. 18 #define CT_PTP_NUM 4 /* num of device page table pages */ 30 #define CT_PAGE_MASK (~(PAGE_SIZE - 1)) 31 #define CT_PAGE_ALIGN(addr) ALIGN(addr, CT_PAGE_SIZE) argument 34 unsigned int addr; /* starting logical addr of this block */ member 35 unsigned int size; /* size of this device virtual mem block */ 41 /* Virtual memory management object for card device */ 43 struct snd_dma_buffer ptp[CT_PTP_NUM]; /* Device page table pages */ 44 unsigned int size; /* Available addr space in bytes */ [all …]
|
| /linux/sound/i2c/ |
| H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de> 21 static int snd_i2c_bit_sendbytes(struct snd_i2c_device *device, 23 static int snd_i2c_bit_readbytes(struct snd_i2c_device *device, 26 unsigned short addr); 37 struct snd_i2c_device *device; in snd_i2c_bus_free() local 40 return -EINVAL; in snd_i2c_bus_free() 41 while (!list_empty(&bus->devices)) { in snd_i2c_bus_free() 42 device = snd_i2c_device(bus->devices.next); in snd_i2c_bus_free() 43 snd_i2c_device_free(device); in snd_i2c_bus_free() [all …]
|