/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. 21 if (rc < 0) in sdw_get_id() 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 47 if (!parent) { in sdw_bus_master_add() 49 return -ENODEV; in sdw_bus_master_add() 53 if (ret < 0) { in sdw_bus_master_add() [all …]
|
H A D | bus_type.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright(c) 2015-17 Intel Corporation. 14 * sdw_get_device_id - find the matching SoundWire device id 15 * @slave: SoundWire Slave Device 16 * @drv: SoundWire Slave Driver 22 sdw_get_device_id(struct sdw_slave *slave, struct sdw_driver *drv) in sdw_get_device_id() argument 26 for (id = drv->id_table; id && id->mfg_id; id++) in sdw_get_device_id() 27 if (slave->id.mfg_id == id->mfg_id && in sdw_get_device_id() 28 slave->id.part_id == id->part_id && in sdw_get_device_id() 29 (!id->sdw_version || in sdw_get_device_id() [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 mutex_destroy(&slave->sdw_dev_lock); in sdw_slave_release() 16 kfree(slave); in sdw_slave_release() 28 struct sdw_slave *slave; in sdw_slave_add() local 32 slave = kzalloc(sizeof(*slave), GFP_KERNEL); in sdw_slave_add() 33 if (!slave) in sdw_slave_add() 34 return -ENOMEM; in sdw_slave_add() 37 memcpy(&slave->id, id, sizeof(*id)); in sdw_slave_add() [all …]
|
H A D | stream.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-18 Intel Corporation. 5 * stream.c - SoundWire Bus stream operations. 39 if (sdw_cols[i] == col) in sdw_find_col_index() 53 if (sdw_rows[i] == row) in sdw_find_row_index() 63 struct sdw_slave *slave, in _sdw_program_slave_port_params() argument 71 if (bus->params.next_bank) { in _sdw_program_slave_port_params() 72 addr1 = SDW_DPN_OFFSETCTRL2_B1(t_params->port_num); in _sdw_program_slave_port_params() 73 addr2 = SDW_DPN_BLOCKCTRL3_B1(t_params->port_num); in _sdw_program_slave_port_params() 74 addr3 = SDW_DPN_SAMPLECTRL2_B1(t_params->port_num); in _sdw_program_slave_port_params() [all …]
|
/openbmc/linux/drivers/net/bonding/ |
H A D | bond_main.c | 1 // SPDX-License-Identifier: GPL-1.0+ 21 * the first slave bonded to the channel. All slaves will then use 28 * will attach eth0 to bond0 as a slave. eth0 hw mac address will either 30 * b: if a hw mac address already is there, eth0's hw mac address 89 #if IS_ENABLED(CONFIG_TLS_DEVICE) 97 /*---------------------------- Module parameters ----------------------------*/ 147 MODULE_PARM_DESC(mode, "Mode of operation; 0 for balance-rr, " 148 "1 for active-backup, 2 for balance-xor, " 149 "3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, " 150 "6 for balance-alb"); [all …]
|
H A D | bond_alb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. 37 u8 padding[ETH_ZLEN - ETH_HLEN]; 54 static void alb_send_learning_packets(struct slave *slave, const u8 mac_addr[], 76 if (save_load) { in tlb_init_table_entry() 77 entry->load_history = 1 + entry->tx_bytes / in tlb_init_table_entry() 79 entry->tx_bytes = 0; in tlb_init_table_entry() 82 entry->tx_slave = NULL; in tlb_init_table_entry() 83 entry->next = TLB_NULL_INDEX; in tlb_init_table_entry() 84 entry->prev = TLB_NULL_INDEX; in tlb_init_table_entry() [all …]
|
H A D | bond_sysfs_slave.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 ssize_t (*show)(struct slave *, char *); 21 static ssize_t state_show(struct slave *slave, char *buf) in state_show() argument 23 switch (bond_slave_state(slave)) { in state_show() 34 static ssize_t mii_status_show(struct slave *slave, char *buf) in mii_status_show() argument 36 return sysfs_emit(buf, "%s\n", bond_slave_link_status(slave->link)); in mii_status_show() 40 static ssize_t link_failure_count_show(struct slave *slave, char *buf) in link_failure_count_show() argument 42 return sysfs_emit(buf, "%d\n", slave->link_failure_count); in link_failure_count_show() 46 static ssize_t perm_hwaddr_show(struct slave *slave, char *buf) in perm_hwaddr_show() argument 49 slave->dev->addr_len, in perm_hwaddr_show() [all …]
|
H A D | bond_3ad.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. 52 * -------------------------------------------------------------- 54 * -------------------------------------------------------------- 123 * __get_bond_by_port - get the port's bonding struct 126 * Return @port's bonding struct, or %NULL if it can't be found. 130 if (port->slave == NULL) in __get_bond_by_port() 133 return bond_get_bond_by_slave(port->slave); in __get_bond_by_port() 137 * __get_first_agg - get the first aggregator in the bond 140 * Return the aggregator of the first slave in @bond, or %NULL if it can't be [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/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 */ 106 * FSI endpoint-device support 123 if (addr > dev->size || size > dev->size || addr > dev->size - size) in fsi_device_read() [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | resource_tracker.c | 17 * - Redistributions of source code must retain the above 21 * - Redistributions in binary form must reproduce the above 228 /* > 0 --> apply mirror when getting into HA mode */ 229 /* = 0 --> un-apply mirror when getting out of HA mode */ 237 struct rb_node *node = root->rb_node; in res_tracker_lookup() 243 if (res_id < res->res_id) in res_tracker_lookup() 244 node = node->rb_left; in res_tracker_lookup() 245 else if (res_id > res->res_id) in res_tracker_lookup() 246 node = node->rb_right; in res_tracker_lookup() 255 struct rb_node **new = &(root->rb_node), *parent = NULL; in res_tracker_insert() [all …]
|
H A D | cmd.c | 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 136 static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave, 142 [CMD_STAT_INTERNAL_ERR] = -EIO, in mlx4_status_to_errno() 143 [CMD_STAT_BAD_OP] = -EPERM, in mlx4_status_to_errno() 144 [CMD_STAT_BAD_PARAM] = -EINVAL, in mlx4_status_to_errno() 145 [CMD_STAT_BAD_SYS_STATE] = -ENXIO, in mlx4_status_to_errno() 146 [CMD_STAT_BAD_RESOURCE] = -EBADF, in mlx4_status_to_errno() 147 [CMD_STAT_RESOURCE_BUSY] = -EBUSY, in mlx4_status_to_errno() 148 [CMD_STAT_EXCEED_LIM] = -ENOMEM, in mlx4_status_to_errno() [all …]
|
/openbmc/u-boot/drivers/mtd/ |
H A D | mtdpart.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> 43 * kstrdup - allocate space for and copy an existing string 52 if (!s) in kstrdup() 57 if (buf) in kstrdup() 68 struct mtd_info *slave; in mtd_partitions_used() local 70 list_for_each_entry(slave, &master->partitions, node) { in mtd_partitions_used() 71 if (slave->usecount) in mtd_partitions_used() 79 * mtd_parse_partition - Parse @mtdparts partition definition, fill @partition 103 if (*mtdparts == '-') { in mtd_parse_partition() [all …]
|
/openbmc/u-boot/include/ |
H A D | spi.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * Common SPI Interface: Controller-specific definitions 22 #define SPI_LSB_FIRST BIT(3) /* per-word bits-on-wire */ 25 #define SPI_SLAVE BIT(6) /* slave mode */ 46 * struct dm_spi_platdata - platform data for all SPI slaves 48 * This describes a SPI slave, a child device of the SPI bus. To obtain this 50 * dev_get_parent_platdata(slave->dev). 55 * @cs: Chip select number (0..n-1) 56 * @max_hz: Maximum bus speed that this slave can tolerate 68 * struct spi_slave - Representation of a SPI slave [all …]
|
/openbmc/linux/sound/soc/codecs/ |
H A D | rt722-sdca-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt722-sdca-sdw.c -- rt722 SDCA ALSA SoC audio driver 16 #include "rt722-sdca.h" 17 #include "rt722-sdca-sdw.h" 150 .name = "sdw-mbq", 163 static int rt722_sdca_update_status(struct sdw_slave *slave, in rt722_sdca_update_status() argument 166 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_update_status() 168 if (status == SDW_SLAVE_UNATTACHED) in rt722_sdca_update_status() 169 rt722->hw_init = false; in rt722_sdca_update_status() 171 if (status == SDW_SLAVE_ATTACHED) { in rt722_sdca_update_status() [all …]
|
H A D | rt712-sdca-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt712-sdca-sdw.c -- rt712 SDCA ALSA SoC audio driver 15 #include "rt712-sdca.h" 16 #include "rt712-sdca-sdw.h" 125 .name = "sdw-mbq", 138 static int rt712_sdca_update_status(struct sdw_slave *slave, in rt712_sdca_update_status() argument 141 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_update_status() 143 if (status == SDW_SLAVE_UNATTACHED) in rt712_sdca_update_status() 144 rt712->hw_init = false; in rt712_sdca_update_status() 146 if (status == SDW_SLAVE_ATTACHED) { in rt712_sdca_update_status() [all …]
|
H A D | rt711-sdca-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt711-sdw-sdca.c -- rt711 SDCA ALSA SoC audio driver 16 #include "rt711-sdca.h" 17 #include "rt711-sdca-sdw.h" 128 .name = "sdw-mbq", 141 static int rt711_sdca_update_status(struct sdw_slave *slave, in rt711_sdca_update_status() argument 144 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_update_status() 146 if (status == SDW_SLAVE_UNATTACHED) in rt711_sdca_update_status() 147 rt711->hw_init = false; in rt711_sdca_update_status() 149 if (status == SDW_SLAVE_ATTACHED) { in rt711_sdca_update_status() [all …]
|
/openbmc/u-boot/drivers/rtc/ |
H A D | m41t94.c | 7 * Adaptation for U-Boot: 9 * Albin Tonnerre, Free Electrons <albin.tonnerre@free-electrons.com> 20 static struct spi_slave *slave; variable 41 if (!slave) { in rtc_set() 42 slave = spi_setup_slave(CONFIG_M41T94_SPI_BUS, in rtc_set() 45 if (!slave) in rtc_set() 46 return -1; in rtc_set() 48 spi_claim_bus(slave); in rtc_set() 51 buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); in rtc_set() 52 buf[M41T94_REG_MINUTES] = bin2bcd(tm->tm_min); in rtc_set() [all …]
|
/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | netcp_ethss.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Sandeep Paulraj <s-paulraj@ti.com> 10 * Wingman Kwok <w-kwok2@ti.com> 37 #define GBE_MODULE_NAME "netcp-gbe" 56 #define GBENU_MODULE_NAME "netcp-gbenu" 61 ((GBE_IDENT((d)->ss_version) == GBE_SS_ID_NU) || \ 62 (GBE_IDENT((d)->ss_version) == GBE_SS_ID_2U)) 65 (GBE_IDENT((d)->ss_version) == GBE_SS_ID_NU) 68 (GBE_IDENT((d)->ss_version) == GBE_SS_VERSION_14) 70 (GBE_IDENT((d)->ss_version) == GBE_SS_ID_2U) [all …]
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | i2c-at91-slave.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * i2c slave support for Atmel's AT91 Two-Wire Interface (TWI) 13 #include "i2c-at91.h" 22 if (!irqstatus) in atmel_twi_interrupt_slave() 25 /* slave address has been detected on I2C bus */ in atmel_twi_interrupt_slave() 26 if (irqstatus & AT91_TWI_SVACC) { in atmel_twi_interrupt_slave() 27 if (status & AT91_TWI_SVREAD) { in atmel_twi_interrupt_slave() 28 i2c_slave_event(dev->slave, in atmel_twi_interrupt_slave() 30 writeb_relaxed(value, dev->base + AT91_TWI_THR); in atmel_twi_interrupt_slave() 34 i2c_slave_event(dev->slave, in atmel_twi_interrupt_slave() [all …]
|
H A D | i2c-designware-slave.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Synopsys DesignWare I2C adapter driver (slave only). 19 #include "i2c-designware-core.h" 24 regmap_write(dev->map, DW_IC_TX_TL, 0); in i2c_dw_configure_fifo_slave() 25 regmap_write(dev->map, DW_IC_RX_TL, 0); in i2c_dw_configure_fifo_slave() 27 /* Configure the I2C slave. */ in i2c_dw_configure_fifo_slave() 28 regmap_write(dev->map, DW_IC_CON, dev->slave_cfg); in i2c_dw_configure_fifo_slave() 29 regmap_write(dev->map, DW_IC_INTR_MASK, DW_IC_INTR_SLAVE_MASK); in i2c_dw_configure_fifo_slave() 33 * i2c_dw_init_slave() - Initialize the designware i2c slave hardware 36 * This function configures and enables the I2C in slave mode. [all …]
|
/openbmc/linux/drivers/net/ |
H A D | eql.c | 2 * Equalizer Load-balancer for serial network interfaces. 4 * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes 17 * Phone: 1-703-847-0040 ext 103 33 * Added one-line eql_remove_slave patch. 47 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 52 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 56 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 60 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 74 * Broken set-bit locking snapshot 80 * Log trimmed of non-pertinent 1.x branch messages [all …]
|
/openbmc/u-boot/examples/standalone/ |
H A D | atmel_df_pow2.c | 2 * atmel_df_pow2.c - convert Atmel Dataflashes to Power of 2 mode 6 * Licensed under the 2-clause BSD. 17 static int flash_cmd(struct spi_slave *slave, uchar cmd, uchar *buf, int len) in flash_cmd() argument 20 return spi_xfer(slave, 8 * len, buf, buf, SPI_XFER_BEGIN | SPI_XFER_END); in flash_cmd() 23 static int flash_status(struct spi_slave *slave) in flash_status() argument 26 if (flash_cmd(slave, CMD_STAT, buf, sizeof(buf))) in flash_status() 27 return -1; in flash_status() 31 static int flash_set_pow2(struct spi_slave *slave) in flash_set_pow2() argument 40 ret = flash_cmd(slave, CMD_CFG, buf, sizeof(buf)); in flash_set_pow2() 41 if (ret) in flash_set_pow2() [all …]
|
/openbmc/u-boot/drivers/spi/ |
H A D | spi-uclass.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <dm/device-internal.h> 12 #include <dm/uclass-internal.h> 26 if (ops->set_speed) in spi_set_speed_mode() 27 ret = ops->set_speed(bus, speed); in spi_set_speed_mode() 29 ret = -EINVAL; in spi_set_speed_mode() 30 if (ret) { in spi_set_speed_mode() 35 if (ops->set_mode) in spi_set_speed_mode() 36 ret = ops->set_mode(bus, mode); in spi_set_speed_mode() 38 ret = -EINVAL; in spi_set_speed_mode() [all …]
|
/openbmc/linux/drivers/infiniband/hw/mlx4/ |
H A D | cm.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 58 int slave; member 87 if (mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { in set_local_comm_id() 90 msg->request_id = cpu_to_be32(cm_id); in set_local_comm_id() 91 } else if (mad->mad_hdr.attr_id == CM_SIDR_REP_ATTR_ID) { in set_local_comm_id() 96 msg->local_comm_id = cpu_to_be32(cm_id); in set_local_comm_id() 102 if (mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { in get_local_comm_id() 105 return be32_to_cpu(msg->request_id); in get_local_comm_id() 106 } else if (mad->mad_hdr.attr_id == CM_SIDR_REP_ATTR_ID) { in get_local_comm_id() [all …]
|