Lines Matching refs:tmp
83 uint8_t tmp; in tmd2620_sample_fetch() local
103 tmp = TMD2620_ENABLE_PEN | TMD2620_ENABLE_PON; in tmd2620_sample_fetch()
105 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, tmp); in tmd2620_sample_fetch()
115 ret = i2c_reg_read_byte_dt(&config->i2c, TMD2620_STATUS_REG, &tmp); in tmd2620_sample_fetch()
121 LOG_DBG("Status register: 0x%x", tmp); in tmd2620_sample_fetch()
122 if (tmp & TMD2620_STATUS_PINT) { in tmd2620_sample_fetch()
133 tmp = TMD2620_ENABLE_PEN | TMD2620_ENABLE_PON; in tmd2620_sample_fetch()
136 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, 0); in tmd2620_sample_fetch()
173 uint8_t tmp; in tmd2620_sensor_setup() local
197 tmp = config->wait_time_factor; in tmd2620_sensor_setup()
198 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_WTIME_REG, tmp); in tmd2620_sensor_setup()
204 tmp = config->proximity_low_threshold; in tmd2620_sensor_setup()
205 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_PILT_REG, tmp); in tmd2620_sensor_setup()
211 tmp = config->proximity_high_threshold; in tmd2620_sensor_setup()
212 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_PIHT_REG, (255 - tmp)); in tmd2620_sensor_setup()
219 tmp = (config->proximity_interrupt_filter << 3); in tmd2620_sensor_setup()
220 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_PERS_REG, tmp); in tmd2620_sensor_setup()
228 tmp = TMD2620_CFG0_WLONG; in tmd2620_sensor_setup()
230 tmp = 0; in tmd2620_sensor_setup()
233 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_CFG0_REG, tmp); in tmd2620_sensor_setup()
241 tmp = TMD2620_PCFG0_PPULSE_LEN_4US; in tmd2620_sensor_setup()
244 tmp = TMD2620_PCFG0_PPULSE_LEN_8US; in tmd2620_sensor_setup()
247 tmp = TMD2620_PCFG0_PPULSE_LEN_16US; in tmd2620_sensor_setup()
250 tmp = TMD2620_PCFG0_PPULSE_LEN_32US; in tmd2620_sensor_setup()
257 tmp |= config->proximity_pulse_count; in tmd2620_sensor_setup()
258 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_PCFG0_REG, tmp); in tmd2620_sensor_setup()
266 tmp = TMD2620_PCFG1_PGAIN_X1; in tmd2620_sensor_setup()
269 tmp = TMD2620_PCFG1_PGAIN_X2; in tmd2620_sensor_setup()
272 tmp = TMD2620_PCFG1_PGAIN_X4; in tmd2620_sensor_setup()
275 tmp = TMD2620_PCFG1_PGAIN_X8; in tmd2620_sensor_setup()
282 tmp |= config->proximity_led_drive_strength; in tmd2620_sensor_setup()
283 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_PCFG1_REG, tmp); in tmd2620_sensor_setup()
289 tmp = TMD2620_CFG3_INT_READ_CLEAR; in tmd2620_sensor_setup()
290 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_CFG3_REG, tmp); in tmd2620_sensor_setup()
296 tmp = 1; /* enable interrupt */ in tmd2620_sensor_setup()
297 ret = i2c_reg_write_byte_dt(&config->i2c, TMD2620_INTENAB_REG, tmp); in tmd2620_sensor_setup()
321 uint8_t tmp; in tmd2620_init() local
346 tmp = TMD2620_ENABLE_PEN | TMD2620_ENABLE_PON; in tmd2620_init()
347 ret = i2c_reg_update_byte_dt(&config->i2c, TMD2620_ENABLE_REG, tmp, tmp); in tmd2620_init()