Lines Matching refs:regdata
253 uint8_t regdata; in tmag5273_attr_set_xyz_meas_range() local
257 regdata = TMAG5273_XYZ_MEAS_RANGE_HIGH; in tmag5273_attr_set_xyz_meas_range()
260 regdata = TMAG5273_XYZ_MEAS_RANGE_LOW; in tmag5273_attr_set_xyz_meas_range()
265 TMAG5273_MEAS_RANGE_XYZ_MSK, regdata); in tmag5273_attr_set_xyz_meas_range()
290 uint8_t regdata; in tmag5273_attr_get_xyz_meas_range() local
293 retval = i2c_reg_read_byte_dt(&drv_cfg->i2c, TMAG5273_REG_SENSOR_CONFIG_2, ®data); in tmag5273_attr_get_xyz_meas_range()
298 if ((regdata & TMAG5273_MEAS_RANGE_XYZ_MSK) == TMAG5273_XYZ_MEAS_RANGE_HIGH) { in tmag5273_attr_get_xyz_meas_range()
322 uint8_t regdata; in tmag5273_attr_set_xyz_calc() local
327 regdata = TMAG5273_ANGLE_EN_NONE; in tmag5273_attr_set_xyz_calc()
334 regdata = TMAG5273_ANGLE_EN_XY; in tmag5273_attr_set_xyz_calc()
341 regdata = TMAG5273_ANGLE_EN_YZ; in tmag5273_attr_set_xyz_calc()
348 regdata = TMAG5273_ANGLE_EN_XZ; in tmag5273_attr_set_xyz_calc()
356 TMAG5273_ANGLE_EN_MSK, regdata); in tmag5273_attr_set_xyz_calc()
377 uint8_t regdata; in tmag5273_attr_get_xyz_calc() local
380 retval = i2c_reg_read_byte_dt(&drv_cfg->i2c, TMAG5273_REG_SENSOR_CONFIG_2, ®data); in tmag5273_attr_get_xyz_calc()
385 switch (regdata & TMAG5273_ANGLE_EN_MSK) { in tmag5273_attr_get_xyz_calc()
907 uint8_t regdata; in tmag5273_init_device_config() local
910 regdata = 0; in tmag5273_init_device_config()
914 regdata |= TMAG5273_CRC_ENABLE; in tmag5273_init_device_config()
920 regdata |= TMAG5273_MAGNET_TEMP_COEFF_NDBFE; in tmag5273_init_device_config()
923 regdata |= TMAG5273_MAGNET_TEMP_COEFF_CERAMIC; in tmag5273_init_device_config()
928 regdata |= TMAG5273_MAGNET_TEMP_COEFF_NONE; in tmag5273_init_device_config()
934 regdata |= TMAG5273_CONV_AVG_2; in tmag5273_init_device_config()
937 regdata |= TMAG5273_CONV_AVG_4; in tmag5273_init_device_config()
940 regdata |= TMAG5273_CONV_AVG_8; in tmag5273_init_device_config()
943 regdata |= TMAG5273_CONV_AVG_16; in tmag5273_init_device_config()
946 regdata |= TMAG5273_CONV_AVG_32; in tmag5273_init_device_config()
951 regdata |= TMAG5273_CONV_AVG_1; in tmag5273_init_device_config()
962 (FIELD_GET(TMAG5273_CONV_AVB_MSK, regdata)), (nb_captured_channels)); in tmag5273_init_device_config()
964 regdata |= TMAG5273_I2C_READ_MODE_STANDARD; in tmag5273_init_device_config()
966 retval = i2c_reg_write_byte_dt(&drv_cfg->i2c, TMAG5273_REG_DEVICE_CONFIG_1, regdata); in tmag5273_init_device_config()
973 regdata = 0; in tmag5273_init_device_config()
976 regdata |= TMAG5273_LP_LOWNOISE; in tmag5273_init_device_config()
980 regdata |= TMAG5273_TRIGGER_MODE_INT; in tmag5273_init_device_config()
984 regdata |= TMAG5273_OPERATING_MODE_CONTINUOUS; in tmag5273_init_device_config()
989 retval = i2c_reg_write_byte_dt(&drv_cfg->i2c, TMAG5273_REG_DEVICE_CONFIG_2, regdata); in tmag5273_init_device_config()
1010 uint8_t regdata; in tmag5273_init_sensor_settings() local
1013 regdata = drv_cfg->mag_channel << TMAG5273_MAG_CH_EN_POS; in tmag5273_init_sensor_settings()
1015 retval = i2c_reg_write_byte_dt(&drv_cfg->i2c, TMAG5273_REG_SENSOR_CONFIG_1, regdata); in tmag5273_init_sensor_settings()
1022 regdata = 0; in tmag5273_init_sensor_settings()
1025 regdata |= TMAG5273_MAG_GAIN_CORRECTION_CH_2; in tmag5273_init_sensor_settings()
1030 regdata |= TMAG5273_ANGLE_EN_XY; in tmag5273_init_sensor_settings()
1033 regdata |= TMAG5273_ANGLE_EN_YZ; in tmag5273_init_sensor_settings()
1036 regdata |= TMAG5273_ANGLE_EN_XZ; in tmag5273_init_sensor_settings()
1042 regdata |= TMAG5273_ANGLE_EN_POS; in tmag5273_init_sensor_settings()
1047 regdata |= TMAG5273_XYZ_MEAS_RANGE_LOW; in tmag5273_init_sensor_settings()
1049 regdata |= TMAG5273_XYZ_MEAS_RANGE_HIGH; in tmag5273_init_sensor_settings()
1052 retval = i2c_reg_write_byte_dt(&drv_cfg->i2c, TMAG5273_REG_SENSOR_CONFIG_2, regdata); in tmag5273_init_sensor_settings()
1063 regdata = 0; in tmag5273_init_sensor_settings()
1066 regdata |= TMAG5273_T_CH_EN_ENABLED; in tmag5273_init_sensor_settings()
1069 retval = i2c_reg_write_byte_dt(&drv_cfg->i2c, TMAG5273_REG_T_CONFIG, regdata); in tmag5273_init_sensor_settings()
1092 uint8_t regdata; in tmag5273_init() local
1112 retval = i2c_reg_read_byte_dt(&drv_cfg->i2c, TMAG5273_REG_DEVICE_CONFIG_2, ®data); in tmag5273_init()
1118 LOG_DBG("operation mode: %d", (int)FIELD_GET(TMAG5273_OPERATING_MODE_MSK, regdata)); in tmag5273_init()
1120 retval = i2c_reg_read_byte_dt(&drv_cfg->i2c, TMAG5273_REG_MANUFACTURER_ID_LSB, ®data); in tmag5273_init()
1125 if (regdata != TMAG5273_MANUFACTURER_ID_LSB) { in tmag5273_init()
1126 LOG_ERR("unexpected manufacturer id LSB 0x%X", regdata); in tmag5273_init()
1130 retval = i2c_reg_read_byte_dt(&drv_cfg->i2c, TMAG5273_REG_MANUFACTURER_ID_MSB, ®data); in tmag5273_init()
1136 if (regdata != TMAG5273_MANUFACTURER_ID_MSB) { in tmag5273_init()
1137 LOG_ERR("unexpected manufacturer id MSB 0x%X", regdata); in tmag5273_init()
1141 (void)tmag5273_check_device_status(drv_cfg, ®data); in tmag5273_init()
1149 retval = i2c_reg_read_byte_dt(&drv_cfg->i2c, TMAG5273_REG_DEVICE_ID, ®data); in tmag5273_init()
1155 drv_data->version = regdata & TMAG5273_VER_MSK; in tmag5273_init()
1164 regdata = TMAG5273_INT_MODE_NONE; in tmag5273_init()
1167 regdata |= TMAG5273_INT_MASK_INTB_PIN_MASKED; in tmag5273_init()
1170 retval = i2c_reg_write_byte_dt(&drv_cfg->i2c, TMAG5273_REG_INT_CONFIG_1, regdata); in tmag5273_init()