| /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() 58 ida_init(&bus->slave_ida); in sdw_bus_master_add() 63 bus->link_id); in sdw_bus_master_add() 67 if (!bus->ops) { 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. 13 * sdw_get_device_id - find the matching SoundWire device id 14 * @slave: SoundWire Slave Device 15 * @drv: SoundWire Slave Driver 21 sdw_get_device_id(struct sdw_slave *slave, const struct sdw_driver *drv) in sdw_get_device_id() argument 25 for (id = drv->id_table; id && id->mfg_id; id++) in sdw_get_device_id() 26 if (slave->id.mfg_id == id->mfg_id && in sdw_get_device_id() 27 slave->id.part_id == id->part_id && in sdw_get_device_id() 28 (!id->sdw_version || in sdw_get_device_id() [all …]
|
| H A D | debugfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright(c) 2017-2019 Intel Corporation. 24 /* create the debugfs master-N */ in sdw_bus_debugfs_init() 25 snprintf(name, sizeof(name), "master-%d-%d", bus->controller_id, bus->link_id); in sdw_bus_debugfs_init() 26 bus->debugfs = debugfs_create_dir(name, sdw_debugfs_root); in sdw_bus_debugfs_init() 31 debugfs_remove_recursive(bus->debugfs); in sdw_bus_debugfs_exit() 36 static ssize_t sdw_sprintf(struct sdw_slave *slave, in sdw_sprintf() argument 41 value = sdw_read_no_pm(slave, reg); in sdw_sprintf() 44 return scnprintf(buf + pos, RD_BUF - pos, "%3x\tXX\n", reg); in sdw_sprintf() 46 return scnprintf(buf + pos, RD_BUF - pos, in sdw_sprintf() [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. 66 struct sdw_slave *slave, in _sdw_program_slave_port_params() argument 74 if (bus->params.next_bank) { in _sdw_program_slave_port_params() 75 addr1 = SDW_DPN_OFFSETCTRL2_B1(t_params->port_num); in _sdw_program_slave_port_params() 76 addr2 = SDW_DPN_BLOCKCTRL3_B1(t_params->port_num); in _sdw_program_slave_port_params() 77 addr3 = SDW_DPN_SAMPLECTRL2_B1(t_params->port_num); in _sdw_program_slave_port_params() 78 addr4 = SDW_DPN_HCTRL_B1(t_params->port_num); in _sdw_program_slave_port_params() 80 addr1 = SDW_DPN_OFFSETCTRL2_B0(t_params->port_num); in _sdw_program_slave_port_params() [all …]
|
| H A D | sysfs_slave_dpn.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright(c) 2015-2020 Intel Corporation. 20 * Since we can't use ARRAY_SIZE, hard-code number of dpN attributes. 21 * This needs to be updated when adding new attributes - an error will be 27 static int field##_attribute_alloc(struct device *dev, \ 34 dpn_attr = devm_kzalloc(dev, sizeof(*dpn_attr), GFP_KERNEL); \ 36 return -ENOMEM; \ 37 dpn_attr->N = N; \ 38 dpn_attr->dir = dir; \ 39 sysfs_attr_init(&dpn_attr->dev_attr.attr); \ [all …]
|
| H A D | mipi_disco.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-17 Intel Corporation. 10 * The helper functions read the Master and Slave properties. Implementers 11 * of Master or Slave drivers can use any of the below three mechanisms: 12 * a) Use these APIs here as .read_prop() callback for Master and Slave 39 static bool mipi_device_property_read_bool(const struct device *dev, in mipi_device_property_read_bool() argument 42 return mipi_fwnode_property_read_bool(dev_fwnode(dev), propname); in mipi_device_property_read_bool() 46 * sdw_master_read_prop() - Read Master properties 51 struct sdw_master_prop *prop = &bus->prop; in sdw_master_read_prop() 59 device_property_read_u32(bus->dev, in sdw_master_read_prop() [all …]
|
| H A D | sysfs_slave.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright(c) 2015-2020 Intel Corporation. 13 * Slave sysfs 17 * The sysfs for Slave reflects the MIPI description as given 23 * |---- status 24 * |---- device_number 25 * |---- modalias 26 * |---- dev-properties 27 * |---- mipi_revision 28 * |---- wake_capable [all …]
|
| /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 | eq.c | 15 * - Redistributions of source code must retain the above 19 * - Redistributions in binary form must reproduce the above 38 #include <linux/dma-mapping.h> 86 static u64 get_async_ev_mask(struct mlx4_dev *dev) in get_async_ev_mask() argument 89 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV) in get_async_ev_mask() 91 if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT) in get_async_ev_mask() 99 __raw_writel((__force u32) cpu_to_be32((eq->cons_index & 0xffffff) | in eq_set_ci() 101 eq->doorbell); in eq_set_ci() 109 /* (entry & (eq->nent - 1)) gives us a cyclic array */ in get_eqe() 110 unsigned long offset = (entry & (eq->nent - 1)) * eqe_size; in get_eqe() [all …]
|
| H A D | mlx4.h | 18 * - Redistributions of source code must retain the above 22 * - Redistributions in binary form must reproduce the above 41 #include <linux/radix-tree.h> 60 #define DRV_VERSION "4.0-0" 88 MLX4_MAX_QP_PER_MGM = 4 * ((1 << MLX4_MAX_MGM_LOG_ENTRY_SIZE) / 16 - 2), 134 /*The flag indicates that the slave should delay the RESET cmd*/ 205 int (*verify)(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, 207 int (*wrapper)(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, 223 &(mdev)->persist->pdev->dev, format, \ 228 dev_err(&(mdev)->persist->pdev->dev, format, ##__VA_ARGS__) [all …]
|
| /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 */ 94 /* Legacy /dev numbering: 4 devices per chip, 16 chips */ 105 static int fsi_bus_match(struct device *dev, const struct device_driver *drv) in fsi_bus_match() argument [all …]
|
| /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 …]
|
| /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 …]
|
| /linux/drivers/net/bonding/ |
| 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 * -------------------------------------------------------------- 124 * __get_bond_by_port - get the port's bonding struct 131 if (port->slave == NULL) in __get_bond_by_port() 134 return bond_get_bond_by_slave(port->slave); in __get_bond_by_port() 138 * __get_first_agg - get the first aggregator in the bond 141 * Return the aggregator of the first slave in @bond, or %NULL if it can't be 148 struct slave *first_slave; in __get_first_agg() [all …]
|
| /linux/sound/soc/codecs/ |
| 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" 19 static bool rt711_sdca_readable_register(struct device *dev, unsigned int reg) in rt711_sdca_readable_register() argument 45 static bool rt711_sdca_volatile_register(struct device *dev, unsigned int reg) in rt711_sdca_volatile_register() argument 68 static bool rt711_sdca_mbq_readable_register(struct device *dev, unsigned int reg) in rt711_sdca_mbq_readable_register() argument 95 static bool rt711_sdca_mbq_volatile_register(struct device *dev, unsigned int reg) in rt711_sdca_mbq_volatile_register() argument 128 .name = "sdw-mbq", 141 static int rt711_sdca_update_status(struct sdw_slave *slave, in rt711_sdca_update_status() argument [all …]
|
| H A D | rt721-sdca-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt721-sdca-sdw.c -- rt721 SDCA ALSA SoC audio driver 16 #include "rt721-sdca.h" 17 #include "rt721-sdca-sdw.h" 18 #include "rt-sdw-common.h" 20 static bool rt721_sdca_readable_register(struct device *dev, unsigned int reg) in rt721_sdca_readable_register() argument 44 static bool rt721_sdca_volatile_register(struct device *dev, unsigned int reg) in rt721_sdca_volatile_register() argument 63 static bool rt721_sdca_mbq_readable_register(struct device *dev, unsigned int reg) in rt721_sdca_mbq_readable_register() argument 132 static bool rt721_sdca_mbq_volatile_register(struct device *dev, unsigned int reg) in rt721_sdca_mbq_volatile_register() argument 178 .name = "sdw-mbq", [all …]
|
| H A D | rt5682-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt5682-sdw.c -- RT5682 ALSA SoC audio component driver 28 #include <sound/soc-dapm.h> 42 struct device *dev = context; in rt5682_sdw_read() local 43 struct rt5682_priv *rt5682 = dev_get_drvdata(dev); in rt5682_sdw_read() 46 regmap_write(rt5682->sdw_regmap, RT5682_SDW_CMD, 0); in rt5682_sdw_read() 47 regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_H, (reg >> 8) & 0xff); in rt5682_sdw_read() 48 regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_L, (reg & 0xff)); in rt5682_sdw_read() 49 regmap_read(rt5682->sdw_regmap, RT5682_SDW_DATA_H, &data_h); in rt5682_sdw_read() 50 regmap_read(rt5682->sdw_regmap, RT5682_SDW_DATA_L, &data_l); in rt5682_sdw_read() [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" 18 static bool rt712_sdca_readable_register(struct device *dev, unsigned int reg) in rt712_sdca_readable_register() argument 48 static bool rt712_sdca_volatile_register(struct device *dev, unsigned int reg) in rt712_sdca_volatile_register() argument 74 static bool rt712_sdca_mbq_readable_register(struct device *dev, unsigned int reg) in rt712_sdca_mbq_readable_register() argument 110 static bool rt712_sdca_mbq_volatile_register(struct device *dev, unsigned int reg) in rt712_sdca_mbq_volatile_register() argument 143 .name = "sdw-mbq", 156 static int rt712_sdca_update_status(struct sdw_slave *slave, in rt712_sdca_update_status() argument [all …]
|
| 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" 19 static int rt722_sdca_mbq_size(struct device *dev, unsigned int reg) in rt722_sdca_mbq_size() argument 174 static bool rt722_sdca_readable_register(struct device *dev, unsigned int reg) in rt722_sdca_readable_register() argument 176 return rt722_sdca_mbq_size(dev, reg) > 0; in rt722_sdca_readable_register() 179 static bool rt722_sdca_volatile_register(struct device *dev, unsigned int reg) in rt722_sdca_volatile_register() argument 247 static int rt722_sdca_update_status(struct sdw_slave *slave, in rt722_sdca_update_status() argument 250 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_update_status() [all …]
|
| H A D | max98363.c | 1 // SPDX-License-Identifier: GPL-2.0-only 28 static bool max98363_readable_register(struct device *dev, unsigned int reg) in max98363_readable_register() argument 49 static bool max98363_volatile_reg(struct device *dev, unsigned int reg) in max98363_volatile_reg() argument 77 static int max98363_suspend(struct device *dev) in max98363_suspend() argument 79 struct max98363_priv *max98363 = dev_get_drvdata(dev); in max98363_suspend() 81 regcache_cache_only(max98363->regmap, true); in max98363_suspend() 82 regcache_mark_dirty(max98363->regma in max98363_suspend() 89 max98363_resume(struct device * dev) max98363_resume() argument 91 struct sdw_slave *slave = dev_to_sdw_dev(dev); max98363_resume() local 119 max98363_read_prop(struct sdw_slave * slave) max98363_read_prop() argument 157 max98363_io_init(struct sdw_slave * slave) max98363_io_init() argument 159 struct device *dev = &slave->dev; max98363_io_init() local 298 max98363_update_status(struct sdw_slave * slave,enum sdw_slave_status status) max98363_update_status() argument 386 max98363_init(struct sdw_slave * slave,struct regmap * regmap) max98363_init() argument 390 struct device *dev = &slave->dev; max98363_init() local 432 max98363_sdw_probe(struct sdw_slave * slave,const struct sdw_device_id * id) max98363_sdw_probe() argument [all...] |
| H A D | rt700-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // rt700-sdw.c -- rt700 ALSA SoC audio driver 20 #include "rt700-sdw.h" 22 static bool rt700_readable_register(struct device *dev, unsigned int reg) in rt700_readable_register() argument 55 static bool rt700_volatile_register(struct device *dev, unsigned int reg) in rt700_volatile_register() argument 68 case 0x2012 ... 0x2015: /* HD-A read */ in rt700_volatile_register() 71 case 0x2220 ... 0x2223: /* decoded HD-A */ in rt700_volatile_register() 87 struct device *dev = context; in rt700_sdw_read() local 88 struct rt700_priv *rt700 = dev_get_drvdata(dev); in rt700_sdw_read() 103 ret = regmap_write(rt700->sdw_regmap, reg, 0); in rt700_sdw_read() [all …]
|
| H A D | rt711-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // rt711-sdw.c -- rt711 ALSA SoC audio driver 20 #include "rt711-sdw.h" 22 static bool rt711_readable_register(struct device *dev, unsigned int reg) in rt711_readable_register() argument 62 static bool rt711_volatile_register(struct device *dev, unsigned int reg) in rt711_volatile_register() argument 73 case 0x2012 ... 0x2015: /* HD-A read */ in rt711_volatile_register() 76 case 0x2220 ... 0x2223: /* decoded HD-A */ in rt711_volatile_register() 93 struct device *dev = context; in rt711_sdw_read() local 94 struct rt711_priv *rt711 = dev_get_drvdata(dev); in rt711_sdw_read() 109 ret = regmap_write(rt711->sdw_regmap, reg, 0); in rt711_sdw_read() [all …]
|
| /linux/drivers/infiniband/hw/mlx4/ |
| H A D | mad.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 63 #define GET_BLK_PTR_FROM_EQE(eqe) be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.bl… 64 #define GET_MASK_FROM_EQE(eqe) be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.tbl_e… 91 static void handle_client_rereg_event(struct mlx4_ib_dev *dev, u32 port_num); 92 static void handle_lid_change_event(struct mlx4_ib_dev *dev, u32 port_num); 93 static void __propagate_pkey_ev(struct mlx4_ib_dev *dev, int port_num, 104 return cpu_to_be64(atomic_inc_return(&ctx->tid)) | in mlx4_ib_get_new_demux_tid() 108 int mlx4_MAD_IFC(struct mlx4_ib_dev *dev, int mad_ifc_flags, in mlx4_MAD_IFC() argument 119 inmailbox = mlx4_alloc_cmd_mailbox(dev->dev); in mlx4_MAD_IFC() [all …]
|
| /linux/drivers/net/ethernet/ti/ |
| H A D | cpsw-common.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 static int davinci_emac_3517_get_macid(struct device *dev, u16 offset, in davinci_emac_3517_get_macid() argument 15 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument 21 syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in davinci_emac_3517_get_macid() 23 if (PTR_ERR(syscon) == -ENODEV) in davinci_emac_3517_get_macid() 28 regmap_read(syscon, CTRL_MAC_LO_REG(offset, slave), &macid_lsb); in davinci_emac_3517_get_macid() 29 regmap_read(syscon, CTRL_MAC_HI_REG(offset, slave), &macid_msb); in davinci_emac_3517_get_macid() 41 static int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave, in cpsw_am33xx_cm_get_macid() argument 48 syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in cpsw_am33xx_cm_get_macid() 50 if (PTR_ERR(syscon) == -ENODEV) in cpsw_am33xx_cm_get_macid() [all …]
|
| H A D | cpsw-phy-sel.c | 1 // SPDX-License-Identifier: GPL-2.0 31 struct device *dev; member 35 phy_interface_t phy_mode, int slave); 40 phy_interface_t phy_mode, int slave) in cpsw_gmii_sel_am3352() argument 47 reg = readl(priv->gmii_sel); in cpsw_gmii_sel_am3352() 66 dev_warn(priv->dev, in cpsw_gmii_sel_am3352() 75 mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); in cpsw_gmii_sel_am3352() 76 mask |= BIT(slave + 4); in cpsw_gmii_sel_am3352() 77 mode <<= slave * 2; in cpsw_gmii_sel_am3352() 79 if (priv->rmii_clock_external) { in cpsw_gmii_sel_am3352() [all …]
|