| /linux/drivers/base/regmap/ |
| H A D | regmap-spmi.c | 18 void *val, size_t val_size) in regmap_spmi_base_read() argument 25 while (val_size-- && !err) in regmap_spmi_base_read() 33 const void *val, size_t val_size) in regmap_spmi_base_gather_write() argument 45 if (addr == 0 && val_size) { in regmap_spmi_base_gather_write() 52 val_size--; in regmap_spmi_base_gather_write() 55 while (val_size) { in regmap_spmi_base_gather_write() 62 val_size--; in regmap_spmi_base_gather_write() 107 void *val, size_t val_size) in regmap_spmi_ext_read() argument 121 while (addr <= 0xFF && val_size) { in regmap_spmi_ext_read() 122 len = min_t(size_t, val_size, 16); in regmap_spmi_ext_read() [all …]
|
| H A D | regmap-sdw.c | 12 static int regmap_sdw_write(void *context, const void *val_buf, size_t val_size) in regmap_sdw_write() argument 20 return sdw_nwrite_no_pm(slave, addr, val_size - sizeof(addr), val + sizeof(addr)); in regmap_sdw_write() 25 const void *val_buf, size_t val_size) in regmap_sdw_gather_write() argument 31 return sdw_nwrite_no_pm(slave, addr, val_size, val_buf); in regmap_sdw_gather_write() 36 void *val_buf, size_t val_size) in regmap_sdw_read() argument 42 return sdw_nread_no_pm(slave, addr, val_size, val_buf); in regmap_sdw_read()
|
| H A D | regmap-i2c.c | 140 const void *val, size_t val_size) in regmap_i2c_gather_write() argument 160 xfer[1].len = val_size; in regmap_i2c_gather_write() 174 void *val, size_t val_size) in regmap_i2c_read() argument 188 xfer[1].len = val_size; in regmap_i2c_read() 224 size_t val_size) in regmap_i2c_smbus_i2c_read() argument 230 if (reg_size != 1 || val_size < 1) in regmap_i2c_smbus_i2c_read() 233 ret = i2c_smbus_read_i2c_block_data(i2c, ((u8 *)reg)[0], val_size, val); in regmap_i2c_smbus_i2c_read() 234 if (ret == val_size) in regmap_i2c_smbus_i2c_read() 265 size_t val_size) in regmap_i2c_smbus_i2c_read_reg16() argument 269 int ret, count, len = val_size; in regmap_i2c_smbus_i2c_read_reg16() [all …]
|
| H A D | regmap-i3c.c | 27 void *val, size_t val_size) in regmap_i3c_read() argument 38 xfers[1].len = val_size; in regmap_i3c_read()
|
| H A D | regmap-slimbus.c | 18 void *val, size_t val_size) in regmap_slimbus_read() argument 22 return slim_read(sdev, *(u16 *)reg, val_size, val); in regmap_slimbus_read()
|
| /linux/drivers/mfd/ |
| H A D | rk8xx-spi.c | 47 size_t val_size = count - RK806_ADDR_SIZE; in rk806_spi_bus_write() local 50 if (val_size < 1 || val_size > (RK806_CMD_LEN_MSK + 1)) in rk806_spi_bus_write() 53 cmd = RK806_CMD_WITH_SIZE(WRITE, val_size); in rk806_spi_bus_write() 64 void *val, size_t val_size) in rk806_spi_bus_read() argument 71 val_size < 1 || val_size > (RK806_CMD_LEN_MSK + 1)) in rk806_spi_bus_read() 75 txbuf[0] = RK806_CMD_WITH_SIZE(READ, val_size); in rk806_spi_bus_read() 78 return spi_write_then_read(spi, txbuf, sizeof(txbuf), val, val_size); in rk806_spi_bus_read()
|
| H A D | mt6360-core.c | 401 void *val, size_t val_size) in mt6360_regmap_read() argument 408 int buf_len = MT6360_ALLOC_READ_SIZE(val_size); in mt6360_regmap_read() 409 int read_size = val_size; in mt6360_regmap_read() 420 ret = mt6360_xlate_pmicldo_addr(®_addr, val_size); in mt6360_regmap_read() 441 crc = crc8(ddata->crc8_tbl, buf, val_size + MT6360_CRC_PREDATA_OFFSET, 0); in mt6360_regmap_read() 442 if (crc != buf[val_size + MT6360_CRC_PREDATA_OFFSET]) in mt6360_regmap_read() 446 memcpy(val, buf + MT6360_CRC_PREDATA_OFFSET, val_size); in mt6360_regmap_read() 451 static int mt6360_regmap_write(void *context, const void *val, size_t val_size) in mt6360_regmap_write() argument 459 int buf_len = MT6360_ALLOC_WRITE_SIZE(val_size); in mt6360_regmap_write() 460 int write_size = val_size - MT6360_REGMAP_REG_BYTE_SIZE; in mt6360_regmap_write() [all …]
|
| H A D | smpro-core.c | 41 void *val, size_t val_size) in smpro_core_read() argument 53 buf[1] = val_size; in smpro_core_read() 59 xfer[1].len = val_size; in smpro_core_read()
|
| H A D | tps6594-i2c.c | 109 void *val_buf, size_t val_size) in tps6594_i2c_read() argument 126 for (i = 0 ; ret == 0 && i < val_size ; i++) in tps6594_i2c_read() 141 msgs[1].len = val_size; in tps6594_i2c_read()
|
| H A D | sprd-sc27xx-spi.c | 117 void *val, size_t val_size) in sprd_pmic_spi_read() argument 125 if (reg_size != sizeof(u32) || val_size != sizeof(u32)) in sprd_pmic_spi_read() 134 memcpy(val, rx_buf, val_size); in sprd_pmic_spi_read()
|
| /linux/drivers/net/dsa/microchip/ |
| H A D | ksz_spi.c | 63 void *val, size_t val_size) in ksz8463_spi_read() argument 71 if (reg_size > 2 || val_size > 4) in ksz8463_spi_read() 74 cmd = ksz8463_reg(cmd, val_size); in ksz8463_spi_read() 77 rc = spi_write_then_read(spi, bytes, reg_size, val, val_size); in ksz8463_spi_read() 82 if (!rc && val_size > 1) { in ksz8463_spi_read() 83 if (val_size == 2) { in ksz8463_spi_read() 87 } else if (val_size == 4) { in ksz8463_spi_read() 101 size_t val_size = count - 2; in ksz8463_spi_write() local 109 cmd = ksz8463_reg(cmd, val_size); in ksz8463_spi_write() 117 if (val_size == 2) { in ksz8463_spi_write() [all …]
|
| /linux/drivers/iio/pressure/ |
| H A D | bmp280-spi.c | 32 size_t reg_size, void *val, size_t val_size) in bmp280_regmap_spi_read() argument 36 return spi_write_then_read(spi, reg, reg_size, val, val_size); in bmp280_regmap_spi_read() 40 size_t reg_size, void *val, size_t val_size) in bmp380_regmap_spi_read() argument 46 if (val_size > BME280_BURST_READ_BYTES) in bmp380_regmap_spi_read() 54 status = spi_write_then_read(spi, reg, 1, rx_buf, val_size + 1); in bmp380_regmap_spi_read() 58 memcpy(val, rx_buf + 1, val_size); in bmp380_regmap_spi_read()
|
| /linux/drivers/iio/accel/ |
| H A D | bma400_spi.c | 22 void *val, size_t val_size) in bma400_regmap_spi_read() argument 29 if (val_size > BMA400_MAX_SPI_READ) in bma400_regmap_spi_read() 32 status = spi_write_then_read(spi, reg, 1, result, val_size + 1); in bma400_regmap_spi_read() 42 memcpy(val, result + 1, val_size); in bma400_regmap_spi_read()
|
| H A D | adxl367_spi.c | 53 void *val_buf, size_t val_size) in adxl367_read() argument 60 st->reg_read_xfer[1].len = val_size; in adxl367_read() 65 static int adxl367_write(void *context, const void *val_buf, size_t val_size) in adxl367_write() argument 70 st->reg_write_xfer[1].len = val_size; in adxl367_write()
|
| H A D | bmi088-accel-spi.c | 27 size_t reg_size, void *val, size_t val_size) in bmi088_regmap_spi_read() argument 36 return spi_write_then_read(spi, addr, sizeof(addr), val, val_size); in bmi088_regmap_spi_read()
|
| /linux/drivers/iio/imu/smi330/ |
| H A D | smi330_i2c.c | 23 size_t val_size) in smi330_regmap_i2c_read() argument 28 if (SMI330_NUM_DUMMY_BYTES + val_size > SMI330_I2C_MAX_RX_BUFFER_SIZE) in smi330_regmap_i2c_read() 48 .len = SMI330_NUM_DUMMY_BYTES + val_size, in smi330_regmap_i2c_read() 57 memcpy(val_buf, priv->rx_buffer + SMI330_NUM_DUMMY_BYTES, val_size); in smi330_regmap_i2c_read()
|
| H A D | smi330_spi.c | 14 size_t val_size) in smi330_regmap_spi_read() argument 27 val_size); in smi330_regmap_spi_read()
|
| /linux/drivers/iio/imu/bno055/ |
| H A D | bno055_ser_core.c | 301 void *val, size_t val_size) in bno055_ser_read_reg() argument 308 if (val_size > 128) { in bno055_ser_read_reg() 309 dev_err(&priv->serdev->dev, "Invalid read valsize %zu", val_size); in bno055_ser_read_reg() 314 trace_read_reg(reg_addr, val_size); in bno055_ser_read_reg() 316 priv->expected_data_len = val_size; in bno055_ser_read_reg() 320 ret = bno055_ser_send_cmd(priv, 1, reg_addr, val_size, NULL); in bno055_ser_read_reg()
|
| /linux/drivers/iio/imu/bmi323/ |
| H A D | bmi323_i2c.c | 27 size_t val_size) in bmi323_regmap_i2c_read() argument 39 msgs[1].len = val_size + BMI323_I2C_DUMMY; in bmi323_regmap_i2c_read() 47 memcpy(val_buf, priv->i2c_rx_buffer + BMI323_I2C_DUMMY, val_size); in bmi323_regmap_i2c_read()
|
| H A D | bmi323_spi.c | 22 size_t val_size) in bmi323_regmap_spi_read() argument 26 return spi_write_then_read(spi, reg_buf, reg_size, val_buf, val_size); in bmi323_regmap_spi_read()
|
| /linux/drivers/pinctrl/ |
| H A D | pinctrl-mcp23s08_spi.c | 43 const void *val, size_t val_size) in mcp23sxx_spi_gather_write() argument 50 { .tx_buf = val, .len = val_size, }, }; in mcp23sxx_spi_gather_write() 61 void *val, size_t val_size) in mcp23sxx_spi_read() argument 73 return spi_write_then_read(spi, tx, sizeof(tx), val, val_size); in mcp23sxx_spi_read()
|
| /linux/tools/testing/selftests/bpf/benchs/ |
| H A D | bench_bloom_filter_map.c | 132 __u32 val_size, i; in map_prepare_thread() local 136 val_size = args.value_size; in map_prepare_thread() 137 val = malloc(val_size); in map_prepare_thread() 152 err = syscall(__NR_getrandom, val, val_size, 0); in map_prepare_thread() 153 if (err != val_size) { in map_prepare_thread()
|
| /linux/drivers/iio/imu/bmi270/ |
| H A D | bmi270_spi.c | 19 size_t val_size) in bmi270_regmap_spi_read() argument 21 return spi_write_then_read(spi, reg_buf, reg_size, val_buf, val_size); in bmi270_regmap_spi_read()
|
| /linux/drivers/net/ethernet/microchip/ |
| H A D | encx24j600-regmap.c | 263 void *val, size_t val_size) in regmap_encx24j600_read() argument 273 return regmap_encx24j600_spi_read(context, reg, val, val_size); in regmap_encx24j600_read() 275 if (val_size > 2) { in regmap_encx24j600_read() 276 pr_err("%s: reg=%02x val_size=%zu\n", __func__, reg, val_size); in regmap_encx24j600_read() 280 return regmap_encx24j600_sfr_read(context, reg, val, val_size); in regmap_encx24j600_read()
|
| /linux/sound/soc/codecs/ |
| H A D | zl38060.c | 481 void *val_buf, size_t val_size) in zl38_bus_read() argument 489 if (reg_size != 2 || val_size > ZL38_MAX_RAW_XFER) in zl38_bus_read() 499 txbuf[len++] = val_size / 2 - 1; in zl38_bus_read() 502 txbuf[len++] = val_size / 2 - 1; in zl38_bus_read() 505 return spi_write_then_read(spi, txbuf, len, val_buf, val_size); in zl38_bus_read()
|