/openbmc/qemu/hw/i2c/ |
H A D | smbus_master.c | 19 int smbus_quick_command(I2CBus *bus, uint8_t addr, int read) in smbus_quick_command() argument 21 if (i2c_start_transfer(bus, addr, read)) { in smbus_quick_command() 22 return -1; in smbus_quick_command() 24 i2c_end_transfer(bus); in smbus_quick_command() 28 int smbus_receive_byte(I2CBus *bus, uint8_t addr) in smbus_receive_byte() argument 30 uint8_t data; in smbus_receive_byte() local 32 if (i2c_start_recv(bus, addr)) { in smbus_receive_byte() 33 return -1; in smbus_receive_byte() 35 data = i2c_recv(bus); in smbus_receive_byte() 36 i2c_nack(bus); in smbus_receive_byte() [all …]
|
/openbmc/linux/drivers/net/ethernet/ti/ |
H A 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 …]
|
/openbmc/linux/drivers/net/mdio/ |
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A D | mdio-ipq4019.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 46 static int ipq4019_mdio_wait_busy(struct mii_bus *bus) in ipq4019_mdio_wait_busy() argument 48 struct ipq4019_mdio_data *priv = bus->priv; in ipq4019_mdio_wait_busy() 51 return readl_poll_timeout(priv->membase + MDIO_CMD_REG, busy, in ipq4019_mdio_wait_busy() 56 static int ipq4019_mdio_read_c45(struct mii_bus *bus, int mii_id, int mmd, in ipq4019_mdio_read_c45() argument 59 struct ipq4019_mdio_data *priv = bus->priv; in ipq4019_mdio_read_c45() 60 unsigned int data; in ipq4019_mdio_read_c45() local 63 if (ipq4019_mdio_wait_busy(bus)) in ipq4019_mdio_read_c45() 64 return -ETIMEDOUT; in ipq4019_mdio_read_c45() 66 data = readl(priv->membase + MDIO_MODE_REG); in ipq4019_mdio_read_c45() [all …]
|
/openbmc/linux/drivers/ssb/ |
H A 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 …]
|
/openbmc/qemu/hw/i3c/ |
H A D | core.c | 2 * QEMU I3C bus interface. 23 #include "hw/qdev-properties.h" 26 DEFINE_PROP_UINT8("static-address", struct I3CTarget, static_address, 0), 33 static void i3c_realize(BusState *bus, Error **errp) in i3c_realize() argument 35 qbus_set_bus_hotplug_handler(bus); in i3c_realize() 38 static void i3c_class_init(ObjectClass *klass, void *data) in i3c_class_init() argument 41 k->realize = i3c_realize; in i3c_class_init() 64 I3CBus *bus; in i3c_init_bus_type() local 66 bus = I3C_BUS(qbus_new(type, parent, name)); in i3c_init_bus_type() 67 QLIST_INIT(&bus->current_devs); in i3c_init_bus_type() [all …]
|
/openbmc/linux/drivers/net/ethernet/arc/ |
H A 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 …]
|
/openbmc/u-boot/include/ |
H A D | axi.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 11 * enum axi_size_t - Determine size of AXI transfer 12 * @AXI_SIZE_8: AXI sransfer is 8-bit wide 13 * @AXI_SIZE_16: AXI sransfer is 16-bit wide 14 * @AXI_SIZE_32: AXI sransfer is 32-bit wide 24 * read() - Read a single value from a specified address on a AXI bus 25 * @dev: AXI bus to read from. 27 * @data: Pointer to a variable that takes the data value read 28 * from the address on the AXI bus. 29 * @size: The size of the data to be read. [all …]
|
/openbmc/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> 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 …]
|
/openbmc/linux/arch/mips/pci/ |
H A 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 …]
|
H A 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 …]
|
/openbmc/linux/Documentation/ABI/obsolete/ |
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
/openbmc/rest-dbus/resources/ |
H A D | dbus.js | 4 'bus': 'session', property in initial_state 7 function populate_tree_services(node, cb, bus) argument 9 jQuery.getJSON('/bus/' + bus.name, function(data) { argument 11 for (var i in data.objects) { 12 var service = data.objects[i]; 19 'bus': bus, property in AnonymousClass9ebe46fd0201 30 jQuery.getJSON('/bus/' + ctx.bus.name + '/' + ctx.service.name, 31 function(data) { argument 33 for (var i in data.objects) { 34 var obj = data.objects[i]; [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
H A 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 …]
|
H A 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 …]
|
/openbmc/linux/drivers/i2c/busses/ |
H A 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 …]
|
/openbmc/linux/drivers/pmdomain/bcm/ |
H A 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 …]
|
/openbmc/linux/drivers/i2c/muxes/ |
H A 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 …]
|
/openbmc/u-boot/drivers/spi/ |
H A D | kirkwood_spi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Written-by: Prafulla Wadaskar <prafulla@marvell.com> 19 #include <asm/arch-mvebu/spi.h> 23 setbits_le32(®->ctrl, KWSPI_CSN_ACT); in _spi_cs_activate() 28 clrbits_le32(®->ctrl, KWSPI_CSN_ACT); in _spi_cs_deactivate() 43 * handle data in 8-bit chunks in _spi_xfer() 46 clrsetbits_le32(®->cfg, KWSPI_XFERLEN_MASK, KWSPI_XFERLEN_1BYTE); in _spi_xfer() 52 /* Shift data so it's msb-justified */ in _spi_xfer() 56 clrbits_le32(®->irq_cause, KWSPI_SMEMRDIRQ); in _spi_xfer() 57 writel(tmpdout, ®->dout); /* Write the data out */ in _spi_xfer() [all …]
|
/openbmc/linux/Documentation/driver-api/soundwire/ |
H A 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 …]
|
/openbmc/qemu/include/hw/i3c/ |
H A D | i3c.h | 2 * QEMU I3C bus interface. 20 #include "hw/qdev-core.h" 24 #define TYPE_I3C_TARGET "i3c-target" 105 * Controller to target. Returns 0 for success, non-zero for NAK or other 108 int (*send)(I3CTarget *s, const uint8_t *data, uint32_t num_to_send, 114 uint32_t (*recv)(I3CTarget *s, uint8_t *data, uint32_t num_to_read); 115 /* Notify the target of a bus state change. */ 122 int (*handle_ccc_read)(I3CTarget *s, uint8_t *data, uint32_t num_to_read, 129 int (*handle_ccc_write)(I3CTarget *s, const uint8_t *data, 157 #define TYPE_I3C_BUS "i3c-bus" [all …]
|