Lines Matching refs:val1
280 if ((val->val1 == ICM42670_LOW_POWER_MODE) && in icm42670_set_accel_power_mode()
290 drv_data->accel_pwr_mode = val->val1; in icm42670_set_accel_power_mode()
291 } else if ((val->val1 == ICM42670_LOW_NOISE_MODE) && in icm42670_set_accel_power_mode()
301 drv_data->accel_pwr_mode = val->val1; in icm42670_set_accel_power_mode()
311 if (val->val1 <= 1600 && val->val1 >= 1) { in icm42670_set_accel_odr()
315 convert_freq_to_bitfield(val->val1, &drv_data->accel_hz)); in icm42670_set_accel_odr()
324 convert_freq_to_bitfield(val->val1, &drv_data->accel_hz)); in icm42670_set_accel_odr()
326 } else if (val->val1 == 0) { in icm42670_set_accel_odr()
328 drv_data->accel_hz = val->val1; in icm42670_set_accel_odr()
338 if (val->val1 > 16 || val->val1 < 2) { in icm42670_set_accel_fs()
343 convert_acc_fs_to_bitfield(val->val1, &drv_data->accel_fs)); in icm42670_set_accel_fs()
361 if (val->val1 > 180) { in icm42670_accel_config()
365 inv_imu_set_accel_ln_bw(&drv_data->driver, convert_ln_bw_to_bitfield(val->val1)); in icm42670_accel_config()
368 if (val->val1 > 64 || val->val1 < 2) { in icm42670_accel_config()
372 inv_imu_set_accel_lp_avg(&drv_data->driver, convert_lp_avg_to_bitfield(val->val1)); in icm42670_accel_config()
382 if (val->val1 <= 1600 && val->val1 > 12) { in icm42670_set_gyro_odr()
386 convert_freq_to_bitfield(val->val1, &drv_data->gyro_hz)); in icm42670_set_gyro_odr()
391 convert_freq_to_bitfield(val->val1, &drv_data->gyro_hz)); in icm42670_set_gyro_odr()
393 } else if (val->val1 == 0) { in icm42670_set_gyro_odr()
395 drv_data->gyro_hz = val->val1; in icm42670_set_gyro_odr()
405 if (val->val1 > 2000 || val->val1 < 250) { in icm42670_set_gyro_fs()
410 convert_gyr_fs_to_bitfield(val->val1, &drv_data->gyro_fs)); in icm42670_set_gyro_fs()
425 if (val->val1 > 180) { in icm42670_gyro_config()
429 inv_imu_set_gyro_ln_bw(&drv_data->driver, convert_ln_bw_to_bitfield(val->val1)); in icm42670_gyro_config()
559 val->val1 = conv_val / 1000000; in icm42670_convert_accel()
571 val->val1 = conv_val / 1000000; in icm42670_convert_gyro()
581 val->val1 = conv_val / 1000000; in icm42670_convert_temp()
621 val[0].val1 = data->pedometer_cnt; in icm42670_channel_get()
622 val[1].val1 = data->pedometer_activity; in icm42670_channel_get()
626 val[0].val1 = (data->apex_status & ICM42670_APEX_STATUS_MASK_WOM_X) ? 1 : 0; in icm42670_channel_get()
627 val[1].val1 = (data->apex_status & ICM42670_APEX_STATUS_MASK_WOM_Y) ? 1 : 0; in icm42670_channel_get()
628 val[2].val1 = (data->apex_status & ICM42670_APEX_STATUS_MASK_WOM_Z) ? 1 : 0; in icm42670_channel_get()
630 val[0].val1 = data->apex_status; in icm42670_channel_get()
872 if (val->val1 == TDK_APEX_PEDOMETER) { in icm42670_attr_set()
875 } else if (val->val1 == TDK_APEX_TILT) { in icm42670_attr_set()
878 } else if (val->val1 == TDK_APEX_SMD) { in icm42670_attr_set()
881 } else if (val->val1 == TDK_APEX_WOM) { in icm42670_attr_set()
927 val->val1 = data->accel_hz; in icm42670_attr_get()
929 val->val1 = data->accel_fs; in icm42670_attr_get()
941 val->val1 = data->gyro_hz; in icm42670_attr_get()
943 val->val1 = data->gyro_fs; in icm42670_attr_get()
952 val->val1 = cfg->apex; in icm42670_attr_get()