/Zephyr-latest/drivers/sensor/ti/ina3221/ |
D | ina3221.c | 23 static int reg_read(const struct device *dev, uint8_t reg_addr, uint16_t *reg_data) in reg_read() argument 31 *reg_data = sys_get_be16(rx_buf); in reg_read() 36 static int reg_write(const struct device *dev, uint8_t addr, uint16_t reg_data) in reg_write() argument 42 sys_put_be16(reg_data, &tx_buf[1]); in reg_write() 52 uint16_t reg_data; in ina3221_init() local 73 ret = reg_read(dev, INA3221_MANUF_ID, ®_data); in ina3221_init() 78 if (reg_data != INA3221_MANUF_ID_VALUE) { in ina3221_init() 79 LOG_ERR("Unexpected manufacturer ID: 0x%04x", reg_data); in ina3221_init() 82 ret = reg_read(dev, INA3221_CHIP_ID, ®_data); in ina3221_init() 86 if (reg_data != INA3221_CHIP_ID_VALUE) { in ina3221_init() [all …]
|
/Zephyr-latest/drivers/sensor/adi/adxl367/ |
D | adxl367_i2c.c | 40 uint8_t *reg_data) in adxl367_i2c_reg_read() argument 42 return adxl367_bus_access(dev, ADXL367_REG_READ(reg_addr), reg_data, 1); in adxl367_i2c_reg_read() 47 uint8_t *reg_data, in adxl367_i2c_reg_read_multiple() argument 51 reg_data, count); in adxl367_i2c_reg_read_multiple() 56 uint8_t reg_data) in adxl367_i2c_reg_write() argument 59 ®_data, 1); in adxl367_i2c_reg_write()
|
D | adxl367_spi.c | 66 uint8_t *reg_data) in adxl367_spi_reg_read() argument 68 return adxl367_bus_access(dev, ADXL367_REG_READ(reg_addr), reg_data, 1); in adxl367_spi_reg_read() 73 uint8_t *reg_data, in adxl367_spi_reg_read_multiple() argument 77 reg_data, count); in adxl367_spi_reg_read_multiple() 82 uint8_t reg_data) in adxl367_spi_reg_write() argument 85 ®_data, 1); in adxl367_spi_reg_write()
|
D | adxl367.c | 705 uint8_t reg_data, nready = 1U; in adxl367_get_accel_data() local 709 ret = data->hw_tf->read_reg(dev, ADXL367_STATUS, ®_data); in adxl367_get_accel_data() 714 if ((reg_data & ADXL367_STATUS_DATA_RDY) != 0) { in adxl367_get_accel_data() 758 uint8_t reg_data, nready = 1U; in adxl367_get_temp_data() local 762 ret = data->hw_tf->read_reg(dev, ADXL367_STATUS, ®_data); in adxl367_get_temp_data() 767 if ((reg_data & ADXL367_STATUS_DATA_RDY) != 0) { in adxl367_get_temp_data()
|
/Zephyr-latest/drivers/sensor/adi/adxl372/ |
D | adxl372_i2c.c | 42 uint8_t *reg_data) in adxl372_i2c_reg_read() argument 44 return adxl372_bus_access(dev, ADXL372_REG_READ(reg_addr), reg_data, 1); in adxl372_i2c_reg_read() 49 uint8_t *reg_data, in adxl372_i2c_reg_read_multiple() argument 53 reg_data, count); in adxl372_i2c_reg_read_multiple() 58 uint8_t reg_data) in adxl372_i2c_reg_write() argument 61 ®_data, 1); in adxl372_i2c_reg_write()
|
D | adxl372_spi.c | 57 uint8_t *reg_data) in adxl372_spi_reg_read() argument 59 return adxl372_bus_access(dev, ADXL372_REG_READ(reg_addr), reg_data, 1); in adxl372_spi_reg_read() 64 uint8_t *reg_data, in adxl372_spi_reg_read_multiple() argument 68 reg_data, count); in adxl372_spi_reg_read_multiple() 73 uint8_t reg_data) in adxl372_spi_reg_write() argument 76 ®_data, 1); in adxl372_spi_reg_write()
|
/Zephyr-latest/drivers/sensor/ti/ina219/ |
D | ina219.c | 23 uint16_t *reg_data) in ina219_reg_read() argument 33 *reg_data = sys_get_be16(rx_buf); in ina219_reg_read() 40 uint16_t reg_data) in ina219_reg_write() argument 46 sys_put_be16(reg_data, &tx_buf[1]); in ina219_reg_write() 56 uint16_t reg_data; in ina219_reg_field_update() local 59 rc = ina219_reg_read(dev, addr, ®_data); in ina219_reg_field_update() 64 reg_data = (reg_data & ~mask) | field; in ina219_reg_field_update() 66 return ina219_reg_write(dev, addr, reg_data); in ina219_reg_field_update() 82 uint16_t reg_data; in ina219_set_config() local 84 reg_data = (cfg->brng & INA219_BRNG_MASK) << INA219_BRNG_SHIFT | in ina219_set_config() [all …]
|
/Zephyr-latest/drivers/i2s/ |
D | i2s_litex.c | 32 uint8_t reg_data = litex_read8(reg + I2S_CONTROL_OFFSET); in i2s_enable() local 34 litex_write8(reg_data | I2S_ENABLE, reg + I2S_CONTROL_OFFSET); in i2s_enable() 44 uint8_t reg_data = litex_read8(reg + I2S_CONTROL_OFFSET); in i2s_disable() local 46 litex_write8(reg_data & ~(I2S_ENABLE), reg + I2S_CONTROL_OFFSET); in i2s_disable() 56 uint8_t reg_data = litex_read8(reg + I2S_CONTROL_OFFSET); in i2s_reset_fifo() local 58 litex_write8(reg_data | I2S_FIFO_RESET, reg + I2S_CONTROL_OFFSET); in i2s_reset_fifo() 71 uint8_t reg_data = litex_read32(reg + I2S_CONFIG_OFFSET); in i2s_get_foramt() local 73 reg_data &= I2S_CONF_FORMAT_MASK; in i2s_get_foramt() 74 if (reg_data == LITEX_I2S_STANDARD) { in i2s_get_foramt() 76 } else if (reg_data == LITEX_I2S_LEFT_JUSTIFIED) { in i2s_get_foramt() [all …]
|
/Zephyr-latest/drivers/sensor/bosch/bmp581/ |
D | bmp581.h | 38 #define BMP5_SET_BIT_VAL_0(reg_data, bitname) (reg_data & ~(bitname##_MSK)) argument 40 #define BMP5_SET_BITS_POS_0(reg_data, bitname, data) \ argument 41 ((reg_data & ~(bitname##_MSK)) | (data & bitname##_MSK)) 43 #define BMP5_GET_BITS_POS_0(reg_data, bitname) (reg_data & (bitname##_MSK)) argument
|
D | bmp581.c | 240 uint8_t reg_data[2] = {0}; in get_osr_odr_press_config() local 247 rslt = i2c_burst_read_dt(&conf->i2c, BMP5_REG_OSR_CONFIG, reg_data, 2); in get_osr_odr_press_config() 250 osr_odr_press_cfg->osr_t = BMP5_GET_BITS_POS_0(reg_data[0], BMP5_TEMP_OS); in get_osr_odr_press_config() 251 osr_odr_press_cfg->osr_p = BMP5_GET_BITSLICE(reg_data[0], BMP5_PRESS_OS); in get_osr_odr_press_config() 252 osr_odr_press_cfg->press_en = BMP5_GET_BITSLICE(reg_data[0], BMP5_PRESS_EN); in get_osr_odr_press_config() 253 osr_odr_press_cfg->odr = BMP5_GET_BITSLICE(reg_data[1], BMP5_ODR); in get_osr_odr_press_config()
|
/Zephyr-latest/drivers/spi/ |
D | spi_dw.c | 318 uint32_t reg_data = dw_spi_txftlr_dflt; in spi_dw_update_txftlr() local 322 reg_data = 0U; in spi_dw_update_txftlr() 324 reg_data = spi->ctx.tx_len - 1; in spi_dw_update_txftlr() 328 LOG_DBG("TxFTLR: %u", reg_data); in spi_dw_update_txftlr() 330 write_txftlr(dev, reg_data); in spi_dw_update_txftlr() 345 uint32_t reg_data; in transceive() local 372 reg_data = spi_dw_compute_ndf(rx_bufs->buffers, in transceive() 375 if (reg_data == UINT32_MAX) { in transceive() 380 write_ctrlr1(dev, reg_data); in transceive() 395 reg_data = read_ctrlr0(dev); in transceive() [all …]
|
D | spi_pw.c | 193 uint32_t reg_data; in spi_pw_tx_thld_set() local 196 reg_data = spi_pw_reg_read(dev, PW_SPI_REG_SITF); in spi_pw_tx_thld_set() 198 reg_data &= ~(PW_SPI_WM_MASK); in spi_pw_tx_thld_set() 200 reg_data &= ~(PW_SPI_WM_MASK << PW_SPI_SITF_LWMTF_SHIFT); in spi_pw_tx_thld_set() 201 reg_data |= (PW_SPI_SITF_HIGH_WM_DFLT | PW_SPI_SITF_LOW_WM_DFLT); in spi_pw_tx_thld_set() 202 spi_pw_reg_write(dev, PW_SPI_REG_SITF, reg_data); in spi_pw_tx_thld_set() 208 uint32_t reg_data; in spi_pw_rx_thld_set() local 211 reg_data = spi_pw_reg_read(dev, PW_SPI_REG_SIRF); in spi_pw_rx_thld_set() 212 reg_data &= (uint32_t) ~(PW_SPI_WM_MASK); in spi_pw_rx_thld_set() 213 reg_data |= PW_SPI_SIRF_WM_DFLT; in spi_pw_rx_thld_set() [all …]
|
/Zephyr-latest/drivers/gpio/ |
D | gpio_brcmstb.c | 99 uint32_t reg_data; in gpio_brcmstb_port_toggle_bits() local 101 reg_data = sys_read32(data->base + GIO_DATA); in gpio_brcmstb_port_toggle_bits() 102 reg_data ^= pins; in gpio_brcmstb_port_toggle_bits() 103 sys_write32(reg_data, data->base + GIO_DATA); in gpio_brcmstb_port_toggle_bits()
|
/Zephyr-latest/drivers/sensor/nordic/npm2100_vbat/ |
D | npm2100_vbat.c | 317 uint8_t reg_data; in npm2100_vbat_attr_get() local 320 ®_data); in npm2100_vbat_attr_get() 326 reg_data = FIELD_GET(npm2100_attr[idx].reg_mask, reg_data); in npm2100_vbat_attr_get() 328 ret = linear_range_get_value(npm2100_attr[idx].range, reg_data, &val_mv); in npm2100_vbat_attr_get() 428 uint8_t reg_data; in npm2100_vbat_attr_set() local 437 reg_data = FIELD_PREP(npm2100_attr[idx].reg_mask, range_idx); in npm2100_vbat_attr_set() 451 reg_data); in npm2100_vbat_attr_set() 454 npm2100_attr[idx].reg_mask, reg_data); in npm2100_vbat_attr_set()
|
/Zephyr-latest/drivers/mfd/ |
D | mfd_ad559x_i2c.c | 31 static int mfd_ad559x_i2c_read_reg(const struct device *dev, uint8_t reg, uint8_t reg_data, in mfd_ad559x_i2c_read_reg() argument 38 ARG_UNUSED(reg_data); in mfd_ad559x_i2c_read_reg()
|
D | mfd_ad559x.c | 37 int mfd_ad559x_read_reg(const struct device *dev, uint8_t reg, uint8_t reg_data, uint16_t *val) in mfd_ad559x_read_reg() argument 41 return data->transfer_function->read_reg(dev, reg, reg_data, val); in mfd_ad559x_read_reg()
|
D | mfd_ad559x_spi.c | 41 static int mfd_ad559x_spi_read_reg(const struct device *dev, uint8_t reg, uint8_t reg_data, in mfd_ad559x_spi_read_reg() argument 52 reg_data); in mfd_ad559x_spi_read_reg()
|
D | mfd_ad559x.h | 38 int (*read_reg)(const struct device *dev, uint8_t reg, uint8_t reg_data, uint16_t *val);
|
/Zephyr-latest/drivers/mdio/ |
D | mdio_dwcxgmac.c | 95 uint32_t reg_data, mdio_addr, mdio_data = 0; in mdio_transfer() local 108 reg_data = sys_read32(reg_addr); in mdio_transfer() 109 reg_data |= BIT(prtad); in mdio_transfer() 110 sys_write32(reg_data, reg_addr); in mdio_transfer()
|
/Zephyr-latest/drivers/sensor/bosch/bmi270/ |
D | bmi270.h | 254 #define BMI270_SET_BITS(reg_data, bitname, data) \ argument 255 ((reg_data & ~(bitname##_MSK)) | ((data << bitname##_POS) \ 257 #define BMI270_SET_BITS_POS_0(reg_data, bitname, data) \ argument 258 ((reg_data & ~(bitname##_MSK)) | (data & bitname##_MSK))
|
/Zephyr-latest/include/zephyr/drivers/mfd/ |
D | ad559x.h | 83 int mfd_ad559x_read_reg(const struct device *dev, uint8_t reg, uint8_t reg_data, uint16_t *val);
|
/Zephyr-latest/drivers/sensor/ti/fdc2x1x/ |
D | fdc2x1x.c | 102 uint16_t *reg_data) in fdc2x1x_reg_read() argument 108 *reg_data = ((uint16_t)buf[0] << 8) | buf[1]; in fdc2x1x_reg_read() 122 uint16_t reg_data) in fdc2x1x_reg_write() argument 124 LOG_DBG("[0x%x] = 0x%x", reg_addr, reg_data); in fdc2x1x_reg_write() 128 buf[0] = (uint8_t)(reg_data >> 8); in fdc2x1x_reg_write() 129 buf[1] = (uint8_t)reg_data; in fdc2x1x_reg_write()
|
/Zephyr-latest/drivers/pcie/host/ |
D | pcie_ecam.c | 187 uint32_t reg_data) in pcie_ecam_ctrl_conf_write() argument 191 pcie_generic_ctrl_conf_write(data->cfg_addr, bdf, reg, reg_data); in pcie_ecam_ctrl_conf_write()
|
/Zephyr-latest/drivers/espi/ |
D | host_subs_npcx.c | 713 void host_c2h_write_io_cfg_reg(uint8_t reg_index, uint8_t reg_data) in host_c2h_write_io_cfg_reg() argument 744 inst_c2h->IHD = reg_data; in host_c2h_write_io_cfg_reg()
|