/linux-6.12.1/drivers/net/ethernet/ti/ |
D | davinci_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0+ 28 #include <linux/mdio-bitbang.h> 32 * This timeout definition is a worst-case ultra defensive measure against 99 struct mii_bus *bus; member 103 * if MDIO bus is registered from DT. 110 static void davinci_mdio_init_clk(struct davinci_mdio_data *data) in davinci_mdio_init_clk() argument 114 mdio_in = clk_get_rate(data->clk); in davinci_mdio_init_clk() 115 div = (mdio_in / data->pdata.bus_freq) - 1; in davinci_mdio_init_clk() 119 data->clk_div = div; in davinci_mdio_init_clk() 123 * 32 bits of transferred data in davinci_mdio_init_clk() [all …]
|
/linux-6.12.1/drivers/ssb/ |
D | sdio.c | 3 * SDIO-Hostbus related functions 9 * Copyright 2007-2008 Michael Buesch <m@bues.ch> 60 #define SBSDIO_FUNC1_SBADDRMID 0x1000b /* SB Address window Mid (b23-b16) */ 61 #define SBSDIO_FUNC1_SBADDRHIGH 0x1000c /* SB Address window High (b24-b31) */ 71 #define SBSDIO_SB_ACCESS_2_4B_FLAG 0x8000 /* forces 32-bit SB access */ 78 * ------- ------- ------------------------------------------ 85 * In order to access the contents of a 32-bit Silicon Backplane address 94 * a 32-bit access flag 104 static inline struct device *ssb_sdio_dev(struct ssb_bus *bus) in ssb_sdio_dev() argument 106 return &bus->host_sdio->dev; in ssb_sdio_dev() [all …]
|
/linux-6.12.1/drivers/net/mdio/ |
D | mdio-hisi-femac.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Hisilicon Fast Ethernet MDIO Bus Driver 28 static int hisi_femac_mdio_wait_ready(struct hisi_femac_mdio_data *data) in hisi_femac_mdio_wait_ready() argument 32 return readl_poll_timeout(data->membase + MDIO_RWCTRL, in hisi_femac_mdio_wait_ready() 36 static int hisi_femac_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in hisi_femac_mdio_read() argument 38 struct hisi_femac_mdio_data *data = bus->priv; in hisi_femac_mdio_read() local 41 ret = hisi_femac_mdio_wait_ready(data); in hisi_femac_mdio_read() 46 data->membase + MDIO_RWCTRL); in hisi_femac_mdio_read() 48 ret = hisi_femac_mdio_wait_ready(data); in hisi_femac_mdio_read() 52 return readl(data->membase + MDIO_RO_DATA) & 0xFFFF; in hisi_femac_mdio_read() [all …]
|
D | mdio-moxart.c | 1 // SPDX-License-Identifier: GPL-2.0 33 static int moxart_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in moxart_mdio_read() argument 35 struct moxart_mdio_data *data = bus->priv; in moxart_mdio_read() local 39 dev_dbg(&bus->dev, "%s\n", __func__); in moxart_mdio_read() 44 writel(ctrl, data->base + REG_PHY_CTRL); in moxart_mdio_read() 47 ctrl = readl(data->base + REG_PHY_CTRL); in moxart_mdio_read() 53 count--; in moxart_mdio_read() 56 dev_dbg(&bus->dev, "%s timed out\n", __func__); in moxart_mdio_read() 58 return -ETIMEDOUT; in moxart_mdio_read() 61 static int moxart_mdio_write(struct mii_bus *bus, int mii_id, in moxart_mdio_write() argument [all …]
|
D | mdio-sun4i.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2012-2013 Stefan Roese <sr@denx.de> 6 * Copyright 2013 Maxime Ripard <maxime.ripard@free-electrons.com> 36 static int sun4i_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in sun4i_mdio_read() argument 38 struct sun4i_mdio_data *data = bus->priv; in sun4i_mdio_read() local 43 writel((mii_id << 8) | regnum, data->membase + EMAC_MAC_MADR_REG); in sun4i_mdio_read() 45 writel(0x1, data->membase + EMAC_MAC_MCMD_REG); in sun4i_mdio_read() 49 while (readl(data->membase + EMAC_MAC_MIND_REG) & 0x1) { in sun4i_mdio_read() 51 return -ETIMEDOUT; in sun4i_mdio_read() 56 writel(0x0, data->membase + EMAC_MAC_MCMD_REG); in sun4i_mdio_read() [all …]
|
D | mdio-ipq4019.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 21 #define MDIO_MODE_DIV(x) FIELD_PREP(MDIO_MODE_DIV_MASK, (x) - 1) 58 static int ipq4019_mdio_wait_busy(struct mii_bus *bus) in ipq4019_mdio_wait_busy() argument 60 struct ipq4019_mdio_data *priv = bus->priv; in ipq4019_mdio_wait_busy() 63 return readl_poll_timeout(priv->membase + MDIO_CMD_REG, busy, in ipq4019_mdio_wait_busy() 68 static int ipq4019_mdio_read_c45(struct mii_bus *bus, int mii_id, int mmd, in ipq4019_mdio_read_c45() argument 71 struct ipq4019_mdio_data *priv = bus->priv; in ipq4019_mdio_read_c45() 72 unsigned int data; in ipq4019_mdio_read_c45() local 75 if (ipq4019_mdio_wait_busy(bus)) in ipq4019_mdio_read_c45() 76 return -ETIMEDOUT; in ipq4019_mdio_read_c45() [all …]
|
D | mdio-aspeed.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 #define DRV_NAME "mdio-aspeed" 48 static int aspeed_mdio_op(struct mii_bus *bus, u8 st, u8 op, u8 phyad, u8 regad, in aspeed_mdio_op() argument 49 u16 data) in aspeed_mdio_op() argument 51 struct aspeed_mdio *ctx = bus->priv; in aspeed_mdio_op() 54 dev_dbg(&bus->dev, "%s: st: %u op: %u, phyad: %u, regad: %u, data: %u\n", in aspeed_mdio_op() 55 __func__, st, op, phyad, regad, data); in aspeed_mdio_op() 62 | FIELD_PREP(ASPEED_MDIO_DATA_MIIRDATA, data); in aspeed_mdio_op() 64 iowrite32(ctrl, ctx->base + ASPEED_MDIO_CTRL); in aspeed_mdio_op() 66 return readl_poll_timeout(ctx->base + ASPEED_MDIO_CTRL, ctrl, in aspeed_mdio_op() [all …]
|
/linux-6.12.1/drivers/net/ethernet/arc/ |
D | emac_mdio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2004-2013 Synopsys, Inc. (www.synopsys.com) 19 * arc_mdio_complete_wait - Waits until MDIO transaction is completed. 20 * @priv: Pointer to ARC EMAC private data structure. 22 * returns: 0 on success, -ETIMEDOUT on a timeout. 42 return -ETIMEDOUT; in arc_mdio_complete_wait() 46 * arc_mdio_read - MDIO interface read function. 47 * @bus: Pointer to MII bus structure. 51 * returns: The register contents on success, -ETIMEDOUT on a timeout. 56 static int arc_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in arc_mdio_read() argument [all …]
|
/linux-6.12.1/drivers/i2c/busses/ |
D | i2c-npcm7xx.c | 1 // SPDX-License-Identifier: GPL-2.0 30 * of the bus. 125 #define NPCM_I2CTXF_CTL 0x12 /* Tx-FIFO Control */ 126 #define NPCM_I2CT_OUT 0x14 /* Bus T.O. */ 127 #define NPCM_I2CPEC 0x16 /* PEC Data */ 128 #define NPCM_I2CTXF_STS 0x1A /* Tx-FIFO Status */ 129 #define NPCM_I2CRXF_STS 0x1C /* Rx-FIFO Status */ 130 #define NPCM_I2CRXF_CTL 0x1E /* Rx-FIFO Control */ 155 #define NPCM_I2CST_BER BIT(5) /* Bus error */ 161 #define NPCM_I2CCST_BB BIT(1) /* Bus busy */ [all …]
|
/linux-6.12.1/sound/i2c/ |
D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de> 25 static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus, 34 static int snd_i2c_bus_free(struct snd_i2c_bus *bus) in snd_i2c_bus_free() argument 39 if (snd_BUG_ON(!bus)) in snd_i2c_bus_free() 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() 45 if (bus->master) in snd_i2c_bus_free() 46 list_del(&bus->buses); in snd_i2c_bus_free() [all …]
|
/linux-6.12.1/arch/mips/pci/ |
D | ops-rc32434.c | 19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 34 #include <asm/mach-rc32434/rc32434.h> 35 #include <asm/mach-rc32434/pci.h> 41 #define PCI_CFG_SET(bus, slot, func, off) \ argument 42 (rc32434_pci->pcicfga = (0x80000000 | \ 43 ((bus) << 16) | ((slot)<<11) | \ 47 struct pci_bus *bus, unsigned int devfn, in config_access() argument 48 unsigned char where, u32 *data) in config_access() argument 54 PCI_CFG_SET(bus->number, slot, func, where); in config_access() 58 rc32434_pci->pcicfgd = *data; in config_access() [all …]
|
D | ops-bcm63xx.c | 15 #include "pci-bcm63xx.h" 18 * swizzle 32bits data to return only the needed part 20 static int postprocess_read(u32 data, int where, unsigned int size) in postprocess_read() argument 27 ret = (data >> ((where & 3) << 3)) & 0xff; in postprocess_read() 30 ret = (data >> ((where & 3) << 3)) & 0xffff; in postprocess_read() 33 ret = data; in postprocess_read() 90 /* type 0 cycle for local bus, type 1 cycle for anything else */ in bcm63xx_setup_cfg_access() 92 /* FIXME: how to specify bus ??? */ in bcm63xx_setup_cfg_access() 104 u32 data; in bcm63xx_do_cfg_read() local 106 /* two phase cycle, first we write address, then read data at in bcm63xx_do_cfg_read() [all …]
|
D | ops-loongson2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 #define MAX_DEV_NUM (31 - ID_SEL_BEGIN) 33 struct pci_bus *bus, in loongson_pcibios_config_access() argument 35 u32 *data) in loongson_pcibios_config_access() argument 37 u32 busnum = bus->number; in loongson_pcibios_config_access() 46 /* board-specific part,currently,only fuloong2f,yeeloong2f in loongson_pcibios_config_access() 60 *data = cs5536_pci_conf_read4(function, reg); in loongson_pcibios_config_access() 63 cs5536_pci_conf_write4(function, reg, *data); in loongson_pcibios_config_access() 69 /* Type 0 configuration for onboard PCI bus */ in loongson_pcibios_config_access() 71 return -1; in loongson_pcibios_config_access() [all …]
|
/linux-6.12.1/Documentation/ABI/obsolete/ |
D | sysfs-driver-hid-roccat-ryos | 1 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 4 Description: When written, this file lets one select which data from which 5 profile will be read next. The data has to be 3 bytes long. 9 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 17 The data has to be 3 bytes long. 18 The device will reject invalid data. 21 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 25 a specific profile. Profile index is included in written data. 26 The data has to be 125 bytes long. 31 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… [all …]
|
D | sysfs-driver-hid-roccat-isku | 1 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 4 Description: The integer value of this attribute ranges from 0-4. 12 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 15 Description: When read, this file returns general data like firmware version. 16 The data is 6 bytes long. 20 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 26 written data. The data has to be 6 bytes long. 31 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 36 in written data. The data has to be 6 bytes long. 41 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… [all …]
|
D | sysfs-driver-hid-roccat-konepure | 1 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 9 The data has to be 3 bytes long. 10 The mouse will reject invalid data. 13 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 16 Description: When written, this file lets one select which data from which 17 profile will be read next. The data has to be 3 bytes long. 21 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… 24 Description: When read, this file returns general data like firmware version. 26 The data is 6 bytes long. 29 What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<p… [all …]
|
/linux-6.12.1/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
D | busnv50.c | 25 #include "bus.h" 32 u32 data; member 38 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_scl() local 39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_scl() 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() 48 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_sda() local 49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_sda() 50 if (state) bus->data |= 0x02; in nv50_i2c_bus_drive_sda() [all …]
|
D | bus.c | 24 #include "bus.h" 30 * i2c-algo-bit 35 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_pre_xfer() local 36 return nvkm_i2c_bus_acquire(bus); in nvkm_i2c_bus_pre_xfer() 42 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_post_xfer() local 43 return nvkm_i2c_bus_release(bus); in nvkm_i2c_bus_post_xfer() 47 nvkm_i2c_bus_setscl(void *data, int state) in nvkm_i2c_bus_setscl() argument 49 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setscl() local 50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl() 54 nvkm_i2c_bus_setsda(void *data, int state) in nvkm_i2c_bus_setsda() argument [all …]
|
/linux-6.12.1/drivers/pmdomain/bcm/ |
D | bcm-pmb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 #include <dt-bindings/soc/bcm-pmb.h> 80 u8 bus; member 86 const struct bcm_pmb_pd_data *data; member 90 static int bcm_pmb_bpcm_read(struct bcm_pmb *pmb, int bus, u8 device, in bcm_pmb_bpcm_read() argument 93 void __iomem *base = pmb->base + bus * 0x20; in bcm_pmb_bpcm_read() 97 spin_lock_irqsave(&pmb->lock, flags); in bcm_pmb_bpcm_read() 99 spin_unlock_irqrestore(&pmb->lock, flags); in bcm_pmb_bpcm_read() 102 *val = pmb->little_endian ? le32_to_cpu(*val) : be32_to_cpu(*val); in bcm_pmb_bpcm_read() 107 static int bcm_pmb_bpcm_write(struct bcm_pmb *pmb, int bus, u8 device, in bcm_pmb_bpcm_write() argument [all …]
|
/linux-6.12.1/drivers/i2c/muxes/ |
D | i2c-mux-pca9541.c | 2 * I2C multiplexer driver for PCA9541 bus master selector 6 * Author: Guenter Roeck <linux@roeck-us.net> 11 * Copyright (c) 2008-2009 Rodolfo Giometti <giometti@linux.it> 12 * Copyright (c) 2008-2009 Eurotech S.p.A. <info@eurotech.it> 23 #include <linux/i2c-mux.h> 29 * The PCA9541 is a bus master selector. It supports two I2C masters connected 30 * to a single slave bus. 32 * Before each bus transaction, a master has to acquire bus ownership. After the 33 * transaction is complete, bus ownership has to be released. This fits well 36 * single-channel I2C bus multiplexer. [all …]
|
/linux-6.12.1/Documentation/driver-api/soundwire/ |
D | summary.rst | 6 SoundWire is used for transporting data typically related to audio 10 SoundWire is a 2-pin multi-drop interface with data and clock line. It 14 (1) Transporting all of payload data channels, control information, and setup 15 commands over a single two-pin interface. 18 (Dual Data Rate) data transmission. 20 (3) Clock scaling and optional multiple data lanes to give wide flexibility 21 in data rate to match system requirements. 23 (4) Device status monitoring, including interrupt-style alerts to the Master. 26 interfaces share the common Bus containing data and clock line. Each of the 27 Slaves can support up to 14 Data Ports. 13 Data Ports are dedicated to audio [all …]
|
/linux-6.12.1/drivers/video/fbdev/via/ |
D | via_aux.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 19 struct i2c_adapter *adap; /* the I2C device to access the bus */ 20 struct list_head drivers; /* drivers for devices on this bus */ 26 struct via_aux_bus *bus; /* the I2C bus used */ member 30 void *data; /* private data of this driver */ member 39 void via_aux_free(struct via_aux_bus *bus); 40 const struct fb_videomode *via_aux_get_preferred_mode(struct via_aux_bus *bus); 45 struct via_aux_drv *data = kmalloc(sizeof(*data), GFP_KERNEL); in via_aux_add() local 47 if (!data) in via_aux_add() 50 *data = *drv; in via_aux_add() [all …]
|
/linux-6.12.1/drivers/pci/pcie/ |
D | pme.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2007 - 2009 Intel Corp 6 * Copyright (C) 2007 - 2009 Shaohua Li <shaohua.li@intel.com> 28 * that using MSI for PCIe PME signaling doesn't play well with PCIe PME-based 29 * wake-up from system sleep states. 50 * pcie_pme_interrupt_enable - Enable/disable PCIe PME interrupt generation. 65 * pcie_pme_walk_bus - Scan a PCI bus for devices asserting PME#. 66 * @bus: PCI bus to scan. 68 * Scan given PCI bus and all buses under it for devices asserting PME#. 70 static bool pcie_pme_walk_bus(struct pci_bus *bus) in pcie_pme_walk_bus() argument [all …]
|
/linux-6.12.1/arch/sh/drivers/pci/ |
D | ops-sh7786.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Generic SH7786 PCI-Express operations. 5 * Copyright (C) 2009 - 2010 Paul Mundt 12 #include "pcie-sh7786.h" 20 struct pci_bus *bus, unsigned int devfn, int where, u32 *data) in sh7786_pcie_config_access() argument 22 struct pci_channel *chan = bus->sysdata; in sh7786_pcie_config_access() 27 type = !!bus->parent; in sh7786_pcie_config_access() 30 if (bus->number > 255 || dev > 31 || func > 7) in sh7786_pcie_config_access() 34 * While each channel has its own memory-mapped extended config in sh7786_pcie_config_access() 42 * the same channel <-> device access works for any PCI_SLOT() in sh7786_pcie_config_access() [all …]
|
/linux-6.12.1/drivers/bus/ |
D | simple-pm-bus.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Simple Power-Managed Bus Driver 5 * Copyright (C) 2014-2015 Glider bvba 27 const struct device *dev = &pdev->dev; in simple_pm_bus_probe() 29 struct device_node *np = dev->of_node; in simple_pm_bus_probe() 31 struct simple_pm_bus *bus; in simple_pm_bus_probe() local 35 * transparent bus device which has a different compatible string in simple_pm_bus_probe() 37 * of the simple-pm-bus tasks for these devices, so return early. in simple_pm_bus_probe() 39 if (pdev->driver_override) in simple_pm_bus_probe() 42 match = of_match_device(dev->driver->of_match_table, dev); in simple_pm_bus_probe() [all …]
|