Home
last modified time | relevance | path

Searched +full:bus +full:- +full:addr (Results 1 – 25 of 1039) sorted by relevance

12345678910>>...42

/Linux-v6.1/drivers/net/phy/
Dmdio_bus.c1 // SPDX-License-Identifier: GPL-2.0+
2 /* MDIO Bus interface
41 #include "mdio-boardinfo.h"
46 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod()
48 if (IS_ERR(mdiodev->reset_gpio)) in mdiobus_register_gpiod()
49 return PTR_ERR(mdiodev->reset_gpio); in mdiobus_register_gpiod()
51 if (mdiodev->reset_gpio) in mdiobus_register_gpiod()
52 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod()
61 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdiobus_register_reset()
65 mdiodev->reset_ctrl = reset; in mdiobus_register_reset()
[all …]
/Linux-v6.1/sound/hda/
Dhdac_bus.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * HD-audio core bus driver
24 * snd_hdac_bus_init - initialize a HD-audio bas bus
25 * @bus: the pointer to bus object
27 * @ops: bus verb operators
31 int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, in snd_hdac_bus_init() argument
34 memset(bus, 0, sizeof(*bus)); in snd_hdac_bus_init()
35 bus->dev = dev; in snd_hdac_bus_init()
37 bus->ops = ops; in snd_hdac_bus_init()
39 bus->ops = &default_ops; in snd_hdac_bus_init()
[all …]
Dhdac_controller.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * HD-audio controller helpers
15 static void azx_clear_corbrp(struct hdac_bus *bus) in azx_clear_corbrp() argument
19 for (timeout = 1000; timeout > 0; timeout--) { in azx_clear_corbrp()
20 if (snd_hdac_chip_readw(bus, CORBRP) & AZX_CORBRP_RST) in azx_clear_corbrp()
25 dev_err(bus->dev, "CORB reset timeout#1, CORBRP = %d\n", in azx_clear_corbrp()
26 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
28 snd_hdac_chip_writew(bus, CORBRP, 0); in azx_clear_corbrp()
29 for (timeout = 1000; timeout > 0; timeout--) { in azx_clear_corbrp()
30 if (snd_hdac_chip_readw(bus, CORBRP) == 0) in azx_clear_corbrp()
[all …]
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
Danx9805.c28 #include "bus.h"
32 struct nvkm_i2c_bus *bus; member
33 u8 addr; member
39 u8 addr; member
45 struct anx9805_bus *bus = anx9805_bus(base); in anx9805_bus_xfer() local
46 struct anx9805_pad *pad = bus->pad; in anx9805_bus_xfer()
47 struct i2c_adapter *adap = &pad->bus->i2c; in anx9805_bus_xfer()
49 int ret = -ETIMEDOUT; in anx9805_bus_xfer()
53 tmp = nvkm_rdi2cr(adap, pad->addr, 0x07) & ~0x10; in anx9805_bus_xfer()
54 nvkm_wri2cr(adap, pad->addr, 0x07, tmp | 0x10); in anx9805_bus_xfer()
[all …]
Dbusnv50.c25 #include "bus.h"
31 u32 addr; 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 …]
/Linux-v6.1/drivers/net/mdio/
Dmdio-aspeed.c1 // 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
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()
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()
72 static int aspeed_mdio_get_data(struct mii_bus *bus) in aspeed_mdio_get_data() argument
74 struct aspeed_mdio *ctx = bus->priv; in aspeed_mdio_get_data()
78 rc = readl_poll_timeout(ctx->base + ASPEED_MDIO_DATA, data, in aspeed_mdio_get_data()
[all …]
/Linux-v6.1/drivers/media/pci/cx25821/
Dcx25821-i2c.c1 // SPDX-License-Identifier: GPL-2.0-or-later
22 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
27 printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \
38 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local
39 struct cx25821_dev *dev = bus->dev; in i2c_slave_did_ack()
40 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack()
45 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local
46 struct cx25821_dev *dev = bus->dev; in i2c_is_busy()
47 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy()
69 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local
[all …]
/Linux-v6.1/drivers/pci/controller/
Dpci-thunder-ecam.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/pci-ecam.h>
29 static int handle_ea_bar(u32 e0, int bar, struct pci_bus *bus, in handle_ea_bar() argument
32 void __iomem *addr; in handle_ea_bar() local
35 /* Entries are 16-byte aligned; bits[2,3] select word in entry */ in handle_ea_bar()
43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
44 if (!addr) in handle_ea_bar()
47 v = readl(addr); in handle_ea_bar()
49 v |= 2; /* EA entry-1. Base-L */ in handle_ea_bar()
57 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
[all …]
/Linux-v6.1/arch/powerpc/platforms/maple/
Dpci.c1 // SPDX-License-Identifier: GPL-2.0-or-later
19 #include <asm/pci-bridge.h>
22 #include <asm/ppc-pci.h>
23 #include <asm/isa-bridge.h>
37 for (; node; node = node->sibling) { in fixup_one_level_bus_range()
42 /* For PCI<->PCI bridges or CardBus bridges, we go down */ in fixup_one_level_bus_range()
43 class_code = of_get_property(node, "class-code", NULL); in fixup_one_level_bus_range()
47 bus_range = of_get_property(node, "bus-range", &len); in fixup_one_level_bus_range()
52 higher = fixup_one_level_bus_range(node->child, higher); in fixup_one_level_bus_range()
57 /* This routine fixes the "bus-range" property of all bridges in the
[all …]
/Linux-v6.1/drivers/net/dsa/sja1105/
Dsja1105_mdio.c1 // SPDX-License-Identifier: GPL-2.0
4 #include <linux/pcs/pcs-xpcs.h>
10 int sja1105_pcs_mdio_read(struct mii_bus *bus, int phy, int reg) in sja1105_pcs_mdio_read() argument
12 struct sja1105_mdio_private *mdio_priv = bus->priv; in sja1105_pcs_mdio_read()
13 struct sja1105_private *priv = mdio_priv->priv; in sja1105_pcs_mdio_read()
14 u64 addr; in sja1105_pcs_mdio_read() local
20 return -EINVAL; in sja1105_pcs_mdio_read()
23 addr = (mmd << 16) | (reg & GENMASK(15, 0)); in sja1105_pcs_mdio_read()
33 rc = sja1105_xfer_u32(priv, SPI_READ, addr, &tmp, NULL); in sja1105_pcs_mdio_read()
40 int sja1105_pcs_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val) in sja1105_pcs_mdio_write() argument
[all …]
/Linux-v6.1/drivers/soundwire/
Dbus.c1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2 // Copyright(c) 2015-17 Intel Corporation.
11 #include "bus.h"
17 static int sdw_get_id(struct sdw_bus *bus) in sdw_get_id() argument
24 bus->id = rc; in sdw_get_id()
29 * sdw_bus_master_add() - add a bus Master instance
30 * @bus: bus instance
34 * Initializes the bus instance, read properties and create child
37 int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent, in sdw_bus_master_add() argument
45 return -ENODEV; in sdw_bus_master_add()
[all …]
Dslave.c1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2 // Copyright(c) 2015-17 Intel Corporation.
8 #include "bus.h"
15 mutex_destroy(&slave->sdw_dev_lock); in sdw_slave_release()
25 int sdw_slave_add(struct sdw_bus *bus, in sdw_slave_add() argument
34 return -ENOMEM; in sdw_slave_add()
37 memcpy(&slave->id, id, sizeof(*id)); in sdw_slave_add()
38 slave->dev.parent = bus->dev; in sdw_slave_add()
39 slave->dev.fwnode = fwnode; in sdw_slave_add()
41 if (id->unique_id == SDW_IGNORED_UNIQUE_ID) { in sdw_slave_add()
[all …]
/Linux-v6.1/drivers/infiniband/hw/hfi1/
Dqsfp.c1 // SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause
12 /* for the given bus number, return the CSR for reading an i2c line */
18 /* for the given bus number, return the CSR for writing an i2c line */
26 struct hfi1_i2c_bus *bus = (struct hfi1_i2c_bus *)data; in hfi1_setsda() local
27 struct hfi1_devdata *dd = bus->controlling_dd; in hfi1_setsda()
31 target_oe = i2c_oe_csr(bus->num); in hfi1_setsda()
50 struct hfi1_i2c_bus *bus = (struct hfi1_i2c_bus *)data; in hfi1_setscl() local
51 struct hfi1_devdata *dd = bus->controlling_dd; in hfi1_setscl()
55 target_oe = i2c_oe_csr(bus->num); in hfi1_setscl()
74 struct hfi1_i2c_bus *bus = (struct hfi1_i2c_bus *)data; in hfi1_getsda() local
[all …]
/Linux-v6.1/drivers/of/
Dfdt_address.c1 // SPDX-License-Identifier: GPL-2.0+
3 * FDT Address translation based on u-boot fdt_support.c which in turn was
9 * Copyright 2010-2011 Freescale Semiconductor, Inc.
27 static void __init of_dump_addr(const char *s, const __be32 *addr, int na) in of_dump_addr() argument
30 while(na--) in of_dump_addr()
31 pr_cont(" %08x", *(addr++)); in of_dump_addr()
35 static void __init of_dump_addr(const char *s, const __be32 *addr, int na) { } in of_dump_addr() argument
38 /* Callbacks for bus specific translators */
42 u64 (*map)(__be32 *addr, const __be32 *range,
44 int (*translate)(__be32 *addr, u64 offset, int na);
[all …]
/Linux-v6.1/arch/sparc/kernel/
Dpci_common.c1 // SPDX-License-Identifier: GPL-2.0
20 unsigned long bus, in config_out_of_range() argument
24 if (bus < pbm->pci_first_busno || in config_out_of_range()
25 bus > pbm->pci_last_busno) in config_out_of_range()
31 unsigned long bus, in sun4u_config_mkaddr() argument
35 unsigned long rbits = pbm->config_space_reg_bits; in sun4u_config_mkaddr()
37 if (config_out_of_range(pbm, bus, devfn, reg)) in sun4u_config_mkaddr()
40 reg = (reg & ((1 << rbits) - 1)); in sun4u_config_mkaddr()
42 bus <<= rbits + 8; in sun4u_config_mkaddr()
44 return (void *) (pbm->config_space | bus | devfn | reg); in sun4u_config_mkaddr()
[all …]
/Linux-v6.1/sound/i2c/
Di2c.c1 // 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,
26 unsigned short addr);
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()
[all …]
/Linux-v6.1/drivers/media/usb/cx231xx/
Dcx231xx-i2c.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 cx231xx-i2c.c - driver for Conexant Cx23100/101/102 USB video capture devices
15 #include <linux/i2c-mux.h>
16 #include <media/v4l2-common.h>
20 /* ----------------------------------------------------------- */
24 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
41 dev->name, __func__ , ##args); \
48 return dev->port_3_switch_enabled ? I2C_1_MUX_3 : I2C_1_MUX_1; in get_real_i2c_port()
52 static inline bool is_tuner(struct cx231xx *dev, struct cx231xx_i2c *bus, in is_tuner() argument
55 int i2c_port = get_real_i2c_port(dev, bus->nr); in is_tuner()
[all …]
/Linux-v6.1/drivers/media/pci/cx23885/
Dcx23885-i2c.c1 // SPDX-License-Identifier: GPL-2.0-or-later
15 #include <media/v4l2-common.h>
23 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
39 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local
40 struct cx23885_dev *dev = bus->dev; in i2c_slave_did_ack()
41 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack()
46 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local
47 struct cx23885_dev *dev = bus->dev; in i2c_is_busy()
48 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy()
70 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local
[all …]
/Linux-v6.1/arch/powerpc/platforms/pasemi/
Dpci.c1 // SPDX-License-Identifier: GPL-2.0-only
18 #include <asm/pci-bridge.h>
19 #include <asm/isa-bridge.h>
22 #include <asm/ppc-pci.h>
26 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) argument
28 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) in pa_pxp_offset_valid() argument
31 * well, so allow larger offset. It's really a two-function device but the in pa_pxp_offset_valid()
34 if (bus == 0 && devfn == 0) in pa_pxp_offset_valid()
41 u8 bus, u8 devfn, int offset) in pa_pxp_cfg_addr() argument
43 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); in pa_pxp_cfg_addr()
[all …]
/Linux-v6.1/drivers/ssb/
Dhost_soc.c18 struct ssb_bus *bus = dev->bus; in ssb_host_soc_read8() local
20 offset += dev->core_index * SSB_CORE_SIZE; in ssb_host_soc_read8()
21 return readb(bus->mmio + offset); in ssb_host_soc_read8()
26 struct ssb_bus *bus = dev->bus; in ssb_host_soc_read16() local
28 offset += dev->core_index * SSB_CORE_SIZE; in ssb_host_soc_read16()
29 return readw(bus->mmio + offset); in ssb_host_soc_read16()
34 struct ssb_bus *bus = dev->bus; in ssb_host_soc_read32() local
36 offset += dev->core_index * SSB_CORE_SIZE; in ssb_host_soc_read32()
37 return readl(bus->mmio + offset); in ssb_host_soc_read32()
44 struct ssb_bus *bus = dev->bus; in ssb_host_soc_block_read() local
[all …]
/Linux-v6.1/drivers/media/usb/em28xx/
Dem28xx-i2c.c1 // 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 /* ----------------------------------------------------------- */
27 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
35 dev_printk(KERN_DEBUG, &dev->intf->dev, \
54 switch (dev->i2c_speed & 0x03) { in em28xx_i2c_timeout()
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()
82 b2[5] = 0x80 + len - 1; in em2800_i2c_send_bytes()
[all …]
/Linux-v6.1/arch/m68k/coldfire/
Dpci.c2 * pci.c -- PCI bus support for ColdFire processors
26 * PCI bus memory (no reason not to really). IO space is mapped in its own
34 * We need to be careful probing on bus 0 (directly connected to host
53 static unsigned long mcf_mk_pcicar(int bus, unsigned int devfn, int where) in mcf_mk_pcicar() argument
55 return (bus << PCICAR_BUSN) | (devfn << PCICAR_DEVFNN) | (where & 0xfc); in mcf_mk_pcicar()
58 static int mcf_pci_readconfig(struct pci_bus *bus, unsigned int devfn, in mcf_pci_readconfig() argument
61 unsigned long addr; in mcf_pci_readconfig() local
65 if (bus->number == 0) { in mcf_pci_readconfig()
70 addr = mcf_mk_pcicar(bus->number, devfn, where); in mcf_pci_readconfig()
71 __raw_writel(PCICAR_E | addr, PCICAR); in mcf_pci_readconfig()
[all …]
/Linux-v6.1/include/sound/
Dhdaudio.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * HD-audio core stuff
12 #include <linux/io-64-nonatomic-lo-hi.h>
33 * exported bus type
49 * HD-audio codec base device
54 struct hdac_bus *bus; member
55 unsigned int addr; /* codec address */ member
56 struct list_head list; /* list point for bus codec_list */
120 int snd_hdac_device_init(struct hdac_device *dev, struct hdac_bus *bus,
121 const char *name, unsigned int addr);
[all …]
/Linux-v6.1/arch/x86/pci/
Dnumachip.c1 // SPDX-License-Identifier: GPL-2.0
3 * Numascale NumaConnect-specific PCI code
19 static inline char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) in pci_dev_base() argument
21 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in pci_dev_base()
23 if (cfg && cfg->virt) in pci_dev_base()
24 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base()
28 static int pci_mmcfg_read_numachip(unsigned int seg, unsigned int bus, in pci_mmcfg_read_numachip() argument
31 char __iomem *addr; in pci_mmcfg_read_numachip() local
33 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ in pci_mmcfg_read_numachip()
34 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read_numachip()
[all …]
/Linux-v6.1/drivers/pci/
Daccess.c1 // SPDX-License-Identifier: GPL-2.0
11 * This interrupt-safe spinlock protects all accesses to PCI
19 * alignment, do locking and call the low-level functions pointed to
20 * by pci_dev->ops.
37 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
44 res = bus->ops->read(bus, devfn, pos, len, &data); \
55 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \
61 res = bus->ops->write(bus, devfn, pos, len, value); \
80 int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read() argument
83 void __iomem *addr; in pci_generic_config_read() local
[all …]

12345678910>>...42