Lines Matching refs:status

117 	int status;  in bma4xx_attr_set_odr()  local
121 status = bma4xx_odr_to_reg(val->val1 * 1000000 + val->val2, &reg_val); in bma4xx_attr_set_odr()
122 if (status < 0) { in bma4xx_attr_set_odr()
123 return status; in bma4xx_attr_set_odr()
126 status = bma4xx->hw_ops->update_reg(dev, BMA4XX_REG_ACCEL_CONFIG, BMA4XX_MASK_ACC_CONF_ODR, in bma4xx_attr_set_odr()
128 if (status < 0) { in bma4xx_attr_set_odr()
129 return status; in bma4xx_attr_set_odr()
169 int status; in bma4xx_attr_set_range() local
173 status = bma4xx_fs_to_reg(sensor_ms2_to_ug(val), &reg_val); in bma4xx_attr_set_range()
174 if (status < 0) { in bma4xx_attr_set_range()
175 return status; in bma4xx_attr_set_range()
178 status = bma4xx->hw_ops->update_reg(dev, BMA4XX_REG_ACCEL_RANGE, BMA4XX_MASK_ACC_RANGE, in bma4xx_attr_set_range()
180 if (status < 0) { in bma4xx_attr_set_range()
181 return status; in bma4xx_attr_set_range()
232 int status; in bma4xx_chip_init() local
235 status = cfg->bus_init(dev); in bma4xx_chip_init()
236 if (status) { in bma4xx_chip_init()
237 LOG_ERR("bus_init failed: %d", status); in bma4xx_chip_init()
238 return status; in bma4xx_chip_init()
242 status = bma4xx->hw_ops->read_reg(dev, BMA4XX_REG_CHIP_ID, &bma4xx->chip_id); in bma4xx_chip_init()
243 if (status) { in bma4xx_chip_init()
244 LOG_ERR("could not read chip_id: %d", status); in bma4xx_chip_init()
245 return status; in bma4xx_chip_init()
254 status = bma4xx->hw_ops->write_reg(dev, BMA4XX_REG_CMD, BMA4XX_CMD_SOFT_RESET); in bma4xx_chip_init()
255 if (status) { in bma4xx_chip_init()
256 LOG_ERR("Could not soft-reset chip: %d", status); in bma4xx_chip_init()
257 return status; in bma4xx_chip_init()
268 status = bma4xx->hw_ops->update_reg(dev, BMA4XX_REG_ACCEL_CONFIG, BMA4XX_BIT_ACC_PERF_MODE, in bma4xx_chip_init()
270 if (status) { in bma4xx_chip_init()
271 LOG_ERR("Could not enable performance power save mode: %d", status); in bma4xx_chip_init()
272 return status; in bma4xx_chip_init()
276 status = bma4xx->hw_ops->update_reg(dev, BMA4XX_REG_POWER_CTRL, BMA4XX_BIT_ACC_EN, in bma4xx_chip_init()
278 if (status) { in bma4xx_chip_init()
279 LOG_ERR("Could not enable accel: %d", status); in bma4xx_chip_init()
280 return status; in bma4xx_chip_init()
283 return status; in bma4xx_chip_init()
297 int status; in bma4xx_sample_fetch() local
300 status = bma4xx->hw_ops->read_data(dev, BMA4XX_REG_DATA_8, (uint8_t *)&read_data, in bma4xx_sample_fetch()
302 if (status < 0) { in bma4xx_sample_fetch()
303 LOG_ERR("Cannot read accel data: %d", status); in bma4xx_sample_fetch()
304 return status; in bma4xx_sample_fetch()
326 int status; in bma4xx_temp_fetch() local
328 status = bma4xx->hw_ops->read_reg(dev, BMA4XX_REG_TEMPERATURE, temp); in bma4xx_temp_fetch()
329 if (status) { in bma4xx_temp_fetch()
330 LOG_ERR("could not read temp reg: %d", status); in bma4xx_temp_fetch()
331 return status; in bma4xx_temp_fetch()