/* Set the sensor's acceleration offset (per axis). Use bma4xx_commit_nvm() to save these offsets to nonvolatile memory so they are automatically set during power-on-reset.  */
static int bma4xx_attr_set_odr(const struct device *dev, const struct sensor_value *val)
/* Set the sensor's acceleration offset (per axis). Use bma4xx_commit_nvm() to save these offsets to nonvolatile memory so they are automatically set during power-on-reset.  */
static int bma4xx_attr_set_odr(const struct device *dev, const struct sensor_value *val)
{
	struct bma4xx_data *bma4xx = dev->data;
	int status;
	uint8_t reg_val;
	status = bma4xx_odr_to_reg(val->val1 * 1000000 + val->val2, &reg_val);
	if (status < 0) {
		return status;
	}
	status = bma4xx->hw_ops->update_reg(dev, BMA4XX_REG_ACCEL_CONFIG, BMA4XX_MASK_ACC_CONF_ODR,
					    reg_val);
	if (status < 0) {
		return status;
	}
	bma4xx->accel_odr = reg_val;
	return 0;
}