Lines Matching refs:edata

353 	struct bma4xx_encoded_data *edata;  in bma4xx_submit_one_shot()  local
375 edata = (struct bma4xx_encoded_data *)buf; in bma4xx_submit_one_shot()
376 edata->header.is_fifo = false; in bma4xx_submit_one_shot()
377 edata->header.accel_fs = bma4xx->accel_fs_range; in bma4xx_submit_one_shot()
378 edata->header.timestamp = sensor_clock_cycles_to_ns(cycles); in bma4xx_submit_one_shot()
379 edata->has_accel = 0; in bma4xx_submit_one_shot()
380 edata->has_temp = 0; in bma4xx_submit_one_shot()
391 edata->has_accel = 1; in bma4xx_submit_one_shot()
393 edata->has_temp = 1; in bma4xx_submit_one_shot()
400 edata->has_accel = 1; in bma4xx_submit_one_shot()
404 edata->has_temp = 1; in bma4xx_submit_one_shot()
415 if (edata->has_accel) { in bma4xx_submit_one_shot()
416 rc = bma4xx_sample_fetch(dev, &edata->accel_xyz[0], &edata->accel_xyz[1], in bma4xx_submit_one_shot()
417 &edata->accel_xyz[2]); in bma4xx_submit_one_shot()
426 if (edata->has_temp) { in bma4xx_submit_one_shot()
427 rc = bma4xx_temp_fetch(dev, &edata->temp); in bma4xx_submit_one_shot()
473 const struct bma4xx_encoded_data *edata = (const struct bma4xx_encoded_data *)buffer; in bma4xx_decoder_get_frame_count() local
474 const struct bma4xx_decoder_header *header = &edata->header; in bma4xx_decoder_get_frame_count()
486 *frame_count = edata->has_accel ? 1 : 0; in bma4xx_decoder_get_frame_count()
489 *frame_count = edata->has_temp ? 1 : 0; in bma4xx_decoder_get_frame_count()
599 const struct bma4xx_encoded_data *edata = (const struct bma4xx_encoded_data *)buffer; in bma4xx_one_shot_decode() local
600 const struct bma4xx_decoder_header *header = &edata->header; in bma4xx_one_shot_decode()
615 if (!edata->has_accel) { in bma4xx_one_shot_decode()
621 out->header.base_timestamp_ns = edata->header.timestamp; in bma4xx_one_shot_decode()
630 bma4xx_convert_raw_accel_to_q31(edata->accel_xyz[0], &out->readings[0].x); in bma4xx_one_shot_decode()
631 bma4xx_convert_raw_accel_to_q31(edata->accel_xyz[1], &out->readings[0].y); in bma4xx_one_shot_decode()
632 bma4xx_convert_raw_accel_to_q31(edata->accel_xyz[2], &out->readings[0].z); in bma4xx_one_shot_decode()
639 if (!edata->has_temp) { in bma4xx_one_shot_decode()
645 out->header.base_timestamp_ns = edata->header.timestamp; in bma4xx_one_shot_decode()
652 bma4xx_convert_raw_temp_to_q31(edata->temp, &out->readings[0].temperature); in bma4xx_one_shot_decode()