/openbmc/linux/drivers/soundwire/ |
H A D | bus.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-17 Intel Corporation. 24 bus->id = rc; in sdw_get_id() 26 if (bus->controller_id == -1) in sdw_get_id() 27 bus->controller_id = rc; in sdw_get_id() 33 * sdw_bus_master_add() - add a bus Master instance 49 return -ENODEV; in sdw_bus_master_add() 61 bus->link_id); in sdw_bus_master_add() 65 if (!bus->ops) { in sdw_bus_master_add() 66 dev_err(bus->dev, "SoundWire Bus ops are not set\n"); in sdw_bus_master_add() [all …]
|
H A D | slave.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-17 Intel Corporation. 13 struct sdw_slave *slave = dev_to_sdw_dev(dev); in sdw_slave_release() local 15 of_node_put(slave->dev.of_node); in sdw_slave_release() 16 mutex_destroy(&slave->sdw_dev_lock); in sdw_slave_release() 17 kfree(slave); in sdw_slave_release() 29 struct sdw_slave *slave; in sdw_slave_add() local 33 slave = kzalloc(sizeof(*slave), GFP_KERNEL); in sdw_slave_add() 34 if (!slave) in sdw_slave_add() 35 return -ENOMEM; in sdw_slave_add() [all …]
|
H A D | bus.h | 1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 2 /* Copyright(c) 2015-17 Intel Corporation. */ 10 u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr); 17 return -ENOTSUPP; in sdw_acpi_find_slaves() 23 u64 addr, struct sdw_slave_id *id); 33 void sdw_slave_debugfs_init(struct sdw_slave *slave); 34 void sdw_slave_debugfs_exit(struct sdw_slave *slave); 40 static inline void sdw_slave_debugfs_init(struct sdw_slave *slave) {} in sdw_slave_debugfs_init() argument 41 static inline void sdw_slave_debugfs_exit(struct sdw_slave *slave) {} in sdw_slave_debugfs_exit() argument 52 * struct sdw_msg - Message structure [all …]
|
/openbmc/linux/drivers/fsi/ |
H A D | fsi-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * - Rework topology 9 * - s/chip_id/chip_loc 10 * - s/cfam/chip (cfam_id -> chip_id etc...) 27 #include "fsi-master.h" 28 #include "fsi-slave.h" 51 * FSI slave engine control register offsets 55 #define FSI_SSTAT 0x14 /* R : Slave status */ 98 uint8_t slave_id, uint32_t addr, void *val, size_t size); 100 uint8_t slave_id, uint32_t addr, const void *val, size_t size); [all …]
|
/openbmc/ipmbbridge/ |
H A D | README.md | 10 "slave-path": "/dev/ipmb-4", 11 "bmc-addr": 32, 12 "remote-addr": 44 16 "slave-path": "/dev/ipmb-9", 17 "bmc-addr": 32, 18 "remote-addr": 96 31 "slave-path": "/dev/ipmb-1", 32 "bmc-addr": 32, 33 "remote-addr": 64, 38 "slave-path": "/dev/ipmb-3", [all …]
|
/openbmc/linux/include/linux/soundwire/ |
H A D | sdw.h | 1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 2 /* Copyright(c) 2015-17 Intel Corporation. */ 75 * enum sdw_slave_status - Slave status 76 * @SDW_SLAVE_UNATTACHED: Slave is not attached with the bus. 77 * @SDW_SLAVE_ATTACHED: Slave is attached with bus. 78 * @SDW_SLAVE_ALERT: Some alert condition on the Slave 93 * @SDW_CLK_PRE_DEPREPARE: pre clock stop de-prepare 94 * @SDW_CLK_POST_DEPREPARE: post clock stop de-prepare 104 * enum sdw_command_response - Command response as defined by SDW spec 190 * enum sdw_p15_behave - Slave Port 15 behaviour when the Master attempts a [all …]
|
/openbmc/u-boot/drivers/net/ti/ |
H A D | cpsw-common.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * CPSW common - libs used across TI ethernet devices. 20 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument 22 void *fdt = (void *)gd->fdt_blob; in davinci_emac_3517_get_macid() 28 u32 addr; in davinci_emac_3517_get_macid() local 33 return -ENOENT; in davinci_emac_3517_get_macid() 36 addr = (u32)map_physmem(fdt_translate_address(fdt, syscon, &gmii), in davinci_emac_3517_get_macid() 38 if (addr == FDT_ADDR_T_NONE) { in davinci_emac_3517_get_macid() 40 return -ENOENT; in davinci_emac_3517_get_macid() 43 addr += CTRL_MAC_REG(offset, slave); in davinci_emac_3517_get_macid() [all …]
|
/openbmc/u-boot/drivers/spi/ |
H A D | spi-mem.c | 1 // SPDX-License-Identifier: GPL-2.0+ 15 #include <spi-mem.h> 20 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a 24 * @sgt: a pointer to a non-initialized sg_table that will be filled by this 28 * This helper prepares everything for you and provides a ready-to-use 32 * op->data.buf.{in,out} is DMA-able before calling this function. 42 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data() 43 return -EINVAL; in spi_controller_dma_map_mem_op_data() 45 if (op->data.dir == SPI_MEM_DATA_OUT && ctlr->dma_tx) in spi_controller_dma_map_mem_op_data() 46 dmadev = ctlr->dma_tx->device->dev; in spi_controller_dma_map_mem_op_data() [all …]
|
H A D | spi-mem-nodm.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ 7 #include <spi-mem.h> 9 int spi_mem_exec_op(struct spi_slave *slave, in spi_mem_exec_op() argument 21 if (op->data.nbytes) { in spi_mem_exec_op() 22 if (op->data.dir == SPI_MEM_DATA_IN) in spi_mem_exec_op() 23 rx_buf = op->data.buf.in; in spi_mem_exec_op() 25 tx_buf = op->data.buf.out; in spi_mem_exec_op() 28 op_len = sizeof(op->cmd.opcode) + op->addr.nbytes + op->dummy.nbytes; in spi_mem_exec_op() 31 ret = spi_claim_bus(slave); in spi_mem_exec_op() [all …]
|
/openbmc/linux/drivers/spmi/ |
H A D | spmi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. 16 #include <dt-bindings/spmi/spmi.h> 38 ida_free(&ctrl_ida, ctrl->nr); in spmi_ctrl_release() 51 if (drv->name) in spmi_device_match() 52 return strncmp(dev_name(dev), drv->name, in spmi_device_match() 59 * spmi_device_add() - add a device previously constructed via spmi_device_alloc() 64 struct spmi_controller *ctrl = sdev->ctrl; in spmi_device_add() 67 dev_set_name(&sdev->dev, "%d-%02x", ctrl->nr, sdev->usid); in spmi_device_add() 69 err = device_add(&sdev->dev); in spmi_device_add() [all …]
|
/openbmc/linux/include/trace/events/ |
H A D | fsi.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 13 uint32_t addr, size_t size), 14 TP_ARGS(master, link, id, addr, size), 19 __field(__u32, addr) 23 __entry->master_idx = master->idx; 24 __entry->link = link; 25 __entry->id = id; 26 __entry->addr = addr; 27 __entry->size = size; 30 __entry->master_idx, [all …]
|
/openbmc/linux/drivers/staging/sm750fb/ |
H A D | ddk750_hwi2c.c | 1 // SPDX-License-Identifier: GPL-2.0 63 timeout--; in hw_i2c_wait_tx_done() 66 return -1; in hw_i2c_wait_tx_done() 72 * This function writes data to the i2c slave device registers. 75 * addr - i2c Slave device address 76 * length - Total number of bytes to be written to the device 77 * buf - The buffer that contains the data to be written to the 83 static unsigned int hw_i2c_write_data(unsigned char addr, in hw_i2c_write_data() argument 91 poke32(I2C_SLAVE_ADDRESS, addr & ~0x01); in hw_i2c_write_data() 107 count = length - 1; in hw_i2c_write_data() [all …]
|
H A D | ddk750_swi2c.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 * swi2c.h --- SM750/SM718 DDK 22 * i2cClkGPIO - The GPIO pin to be used as i2c SCL 23 * i2cDataGPIO - The GPIO pin to be used as i2c SDA 26 * -1 - Fail to initialize the i2c 27 * 0 - Success 32 * This function reads the slave device's register 35 * addr - i2c Slave device address which register 37 * reg - Slave device's register to be read 42 unsigned char sm750_sw_i2c_read_reg(unsigned char addr, unsigned char reg); [all …]
|
/openbmc/linux/include/net/ |
H A D | bonding.h | 1 /* SPDX-License-Identifier: GPL-1.0+ */ 5 * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes 43 netdev_info(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 45 netdev_warn(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 47 netdev_dbg(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 49 netdev_err(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 51 #define BOND_MODE(bond) ((bond)->params.mode) 53 /* slave list primitives */ 54 #define bond_slave_list(bond) (&(bond)->dev->adj_list.lower) 61 netdev_adjacent_get_private(bond_slave_list(bond)->next) : \ [all …]
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-mlxbf.c | 1 // SPDX-License-Identifier: GPL-2.0 57 * memory-mapped region whose addresses are specified in either the DT or 67 /* Reference clock for Bluefield - 156 MHz. */ 124 * Slave cause status flags. Note that those bits might be considered 132 /* Slave busy bit reset. */ 149 * SMBUS GW0 -> bits[26:25] 150 * SMBUS GW1 -> bits[28:27] 151 * SMBUS GW2 -> bits[30:29] 236 #define MLXBF_I2C_MASTER_SLV_ADDR_SHIFT 12 /* Slave address */ 245 #define MLXBF_I2C_MASTER_DATA_W_LENGTH (MLXBF_I2C_MASTER_DATA_DESC_SIZE - 1) [all …]
|
/openbmc/linux/include/linux/ |
H A D | fsi.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 17 struct fsi_slave *slave; member 18 uint32_t addr; member 22 extern int fsi_device_read(struct fsi_device *dev, uint32_t addr, 24 extern int fsi_device_write(struct fsi_device *dev, uint32_t addr, 52 /* module_fsi_driver() - Helper macro for drivers that don't do 61 /* direct slave API */ 62 extern int fsi_slave_claim_range(struct fsi_slave *slave, 63 uint32_t addr, uint32_t size); 64 extern void fsi_slave_release_range(struct fsi_slave *slave, [all …]
|
H A D | spmi.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 11 /* Maximum slave identifier */ 34 * struct spmi_device - Basic representation of an SPMI device 37 * @usid: This devices' Unique Slave IDentifier. 52 return dev_get_drvdata(&sdev->dev); in spmi_device_get_drvdata() 57 dev_set_drvdata(&sdev->dev, data); in spmi_device_set_drvdata() 65 put_device(&sdev->dev); in spmi_device_put() 73 * struct spmi_controller - interface to the SPMI master controller 75 * @nr: board-specific number identifier for this controller/bus [all …]
|
/openbmc/qemu/include/hw/i2c/ |
H A D | i2c.h | 4 #include "hw/qdev-core.h" 8 immediately. It does not support slave devices that need to be able to 9 defer their response (eg. CPU slave interfaces where the data is supplied 22 #define TYPE_I2C_SLAVE "i2c-slave" 29 /* Master to slave. Returns non-zero for a NAK, 0 for success. */ 32 /* Master to slave (asynchronous). Receiving slave must call i2c_ack(). */ 36 * Slave to master. This cannot fail, the device should always 42 * Notify the slave of a bus state change. For start event, 43 * returns non-zero to NAK an operation. For other events the 66 #define TYPE_I2C_BUS "i2c-bus" [all …]
|
/openbmc/linux/drivers/base/regmap/ |
H A D | regmap-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright(c) 2015-17 Intel Corporation. 15 struct sdw_slave *slave = dev_to_sdw_dev(dev); in regmap_sdw_write() local 17 u32 addr = le32_to_cpu(*(const __le32 *)val_buf); in regmap_sdw_write() local 20 return sdw_nwrite_no_pm(slave, addr, val_size - sizeof(addr), val + sizeof(addr)); in regmap_sdw_write() 28 struct sdw_slave *slave = dev_to_sdw_dev(dev); in regmap_sdw_gather_write() local 29 u32 addr = le32_to_cpu(*(const __le32 *)reg_buf); in regmap_sdw_gather_write() local 31 return sdw_nwrite_no_pm(slave, addr, val_size, val_buf); in regmap_sdw_gather_write() 39 struct sdw_slave *slave = dev_to_sdw_dev(dev); in regmap_sdw_read() local 40 u32 addr = le32_to_cpu(*(const __le32 *)reg_buf); in regmap_sdw_read() local [all …]
|
/openbmc/linux/drivers/dma/ |
H A D | sa11x0-dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Derived in part from arch/arm/mach-sa1100/dma.c, 20 #include "virt-dma.h" 68 u32 addr; member 89 /* protected by c->vc.lock */ 93 /* protected by d->lock */ 107 /* Protected by c->vc.lock */ 118 struct dma_device slave; member 133 return container_of(dmadev, struct sa11x0_dma_dev, slave); in to_sa11x0_dma() 138 struct virt_dma_desc *vd = vchan_next_desc(&c->vc); in sa11x0_dma_next_desc() [all …]
|
/openbmc/linux/drivers/i2c/ |
H A D | i2c-core-smbus.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * (e.g. smbalert) are handled in a separate i2c-smbus module. 9 * All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> 16 #include <linux/i2c-smbus.h> 20 #include "i2c-core.h" 42 * i2c_smbus_pec - Incremental CRC8 over the given input data array 59 /* Assume a 7-bit address, which is reasonable for SMBus */ 63 u8 addr = i2c_8bit_addr_from_msg(msg); in i2c_smbus_msg_pec() local 64 pec = i2c_smbus_pec(pec, &addr, 1); in i2c_smbus_msg_pec() 67 return i2c_smbus_pec(pec, msg->buf, msg->len); in i2c_smbus_msg_pec() [all …]
|
/openbmc/linux/sound/soc/codecs/ |
H A D | sdw-mockup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // sdw-mockup.c -- a mockup SoundWire codec for tests where only the host 23 struct sdw_slave *slave; member 59 struct snd_soc_component *component = dai->component; in sdw_mockup_pcm_hw_params() 67 return -EINVAL; in sdw_mockup_pcm_hw_params() 69 if (!sdw_mockup->slave) in sdw_mockup_pcm_hw_params() 70 return -EINVAL; in sdw_mockup_pcm_hw_params() 75 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sdw_mockup_pcm_hw_params() 80 ret = sdw_stream_add_slave(sdw_mockup->slave, &stream_config, in sdw_mockup_pcm_hw_params() 83 dev_err(dai->dev, "Unable to configure port\n"); in sdw_mockup_pcm_hw_params() [all …]
|
/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | cpsw.c | 1 // SPDX-License-Identifier: GPL-2.0 68 struct cpsw_slave *slave; \ 69 struct cpsw_common *cpsw = (priv)->cpsw; \ 71 if (cpsw->data.dual_emac) \ 72 (func)((cpsw)->slaves + priv->emac_port, ##arg);\ 74 for (n = cpsw->data.slaves, \ 75 slave = cpsw->slaves; \ 76 n; n--) \ 77 (func)(slave++, ##arg); \ 83 return cpsw->data.dual_emac ? priv->emac_port : cpsw->data.active_slave; in cpsw_slave_index_priv() [all …]
|
/openbmc/linux/Documentation/networking/dsa/ |
H A D | configuration.rst | 1 .. SPDX-License-Identifier: GPL-2.0 10 .. _dsa-config-showcases: 13 ----------------------- 35 All other corresponding linux interfaces are called slave interfaces. 37 The slave interfaces depend on the master interface being up in order for them 42 - when a DSA slave interface is brought up, the master interface is 44 - when the master interface is brought down, all DSA slave interfaces are 56 a slave interface 59 another slave interface 62 a third slave interface [all …]
|
/openbmc/phosphor-mrw-tools/ |
H A D | gen_callouts.pl | 31 my $targets = Targets->new; 32 $targets->loadXML($mrwFile); 40 …s/devices/platform/ahb/ahb:apb/ahb:apb:bus\@1e78a000/1e78a100.i2c-bus/i2c-<port>/<port>-00<address… 41 my $fsiMasterPath = "/sys/devices/platform/gpio-fsi/fsi0/slave\@00:00/raw"; 42 my $fsiSlavePath = "/sys/devices/platform/gpio-fsi/fsi0/slave\@00:00/00:00:00:0a/fsi1/slave\@<link>… 56 my $connections = $targets->findConnections($bmc, "I2C"); 57 # hash of arrays - {I2C master port : list of connected slave Targets} 60 for my $i2c (@{$connections->{CONN}}) 62 my $master = $i2c->{SOURCE}; 63 my $port = $targets->getAttribute($master,"I2C_PORT"); [all …]
|