/Linux-v5.10/drivers/iio/adc/ |
D | da9150-gpadc.c | 132 static inline int da9150_gpadc_gpio_6v_voltage_now(int raw_val) in da9150_gpadc_gpio_6v_voltage_now() argument 135 return (6 * ((raw_val * 1000) + 500)) / 1024; in da9150_gpadc_gpio_6v_voltage_now() 138 static inline int da9150_gpadc_ibus_current_avg(int raw_val) in da9150_gpadc_ibus_current_avg() argument 141 return (4 * ((raw_val * 1000) + 500)) / 2048; in da9150_gpadc_ibus_current_avg() 144 static inline int da9150_gpadc_vbus_21v_voltage_now(int raw_val) in da9150_gpadc_vbus_21v_voltage_now() argument 147 return (21 * ((raw_val * 1000) + 500)) / 1024; in da9150_gpadc_vbus_21v_voltage_now() 150 static inline int da9150_gpadc_vsys_6v_voltage_now(int raw_val) in da9150_gpadc_vsys_6v_voltage_now() argument 153 return (3 * ((raw_val * 1000) + 500)) / 512; in da9150_gpadc_vsys_6v_voltage_now() 159 int raw_val; in da9150_gpadc_read_processed() local 161 raw_val = da9150_gpadc_read_adc(gpadc, hw_chan); in da9150_gpadc_read_processed() [all …]
|
D | ab8500-gpadc.c | 896 int raw_val; in ab8500_gpadc_read_raw() local 906 raw_val = ab8500_gpadc_read(gpadc, ch, NULL); in ab8500_gpadc_read_raw() 907 if (raw_val < 0) in ab8500_gpadc_read_raw() 908 return raw_val; in ab8500_gpadc_read_raw() 911 *val = raw_val; in ab8500_gpadc_read_raw() 916 processed = ab8500_gpadc_ad_to_voltage(gpadc, ch->id, raw_val); in ab8500_gpadc_read_raw()
|
D | max9611.c | 210 u16 *raw_val) in max9611_read_single() argument 243 *raw_val = ret; in max9611_read_single()
|
/Linux-v5.10/drivers/power/supply/ |
D | axp288_fuel_gauge.c | 213 int raw_val, ret; in fuel_gauge_debug_show() local 279 ret = iio_read_channel_raw(info->iio_channel[BAT_TEMP], &raw_val); in fuel_gauge_debug_show() 281 seq_printf(s, "axp288-batttemp : %d\n", raw_val); in fuel_gauge_debug_show() 282 ret = iio_read_channel_raw(info->iio_channel[PMIC_TEMP], &raw_val); in fuel_gauge_debug_show() 284 seq_printf(s, "axp288-pmictemp : %d\n", raw_val); in fuel_gauge_debug_show() 285 ret = iio_read_channel_raw(info->iio_channel[SYSTEM_TEMP], &raw_val); in fuel_gauge_debug_show() 287 seq_printf(s, "axp288-systtemp : %d\n", raw_val); in fuel_gauge_debug_show() 288 ret = iio_read_channel_raw(info->iio_channel[BAT_CHRG_CURR], &raw_val); in fuel_gauge_debug_show() 290 seq_printf(s, "axp288-chrgcurr : %d\n", raw_val); in fuel_gauge_debug_show() 291 ret = iio_read_channel_raw(info->iio_channel[BAT_D_CURR], &raw_val); in fuel_gauge_debug_show() [all …]
|
/Linux-v5.10/drivers/iio/gyro/ |
D | mpu3050-core.c | 193 __be16 raw_val[3]; in mpu3050_start_sampling() local 212 raw_val[i] = cpu_to_be16(mpu3050->calibration[i]); in mpu3050_start_sampling() 214 ret = regmap_bulk_write(mpu3050->map, MPU3050_X_OFFS_USR_H, raw_val, in mpu3050_start_sampling() 215 sizeof(raw_val)); in mpu3050_start_sampling() 268 __be16 raw_val; in mpu3050_read_raw() local 324 &raw_val, sizeof(raw_val)); in mpu3050_read_raw() 331 *val = be16_to_cpu(raw_val); in mpu3050_read_raw() 338 &raw_val, in mpu3050_read_raw() 339 sizeof(raw_val)); in mpu3050_read_raw() 346 *val = be16_to_cpu(raw_val); in mpu3050_read_raw()
|
D | bmg160_core.c | 491 unsigned int raw_val; in bmg160_get_temp() local 500 ret = regmap_read(data->regmap, BMG160_REG_TEMP, &raw_val); in bmg160_get_temp() 508 *val = sign_extend32(raw_val, 7); in bmg160_get_temp() 521 __le16 raw_val; in bmg160_get_axis() local 530 ret = regmap_bulk_read(data->regmap, BMG160_AXIS_TO_REG(axis), &raw_val, in bmg160_get_axis() 531 sizeof(raw_val)); in bmg160_get_axis() 539 *val = sign_extend32(le16_to_cpu(raw_val), 15); in bmg160_get_axis()
|
/Linux-v5.10/drivers/iio/accel/ |
D | kxsd9.c | 166 __be16 raw_val; in kxsd9_read_raw() local 173 ret = regmap_bulk_read(st->map, chan->address, &raw_val, in kxsd9_read_raw() 174 sizeof(raw_val)); in kxsd9_read_raw() 177 nval = be16_to_cpu(raw_val); in kxsd9_read_raw()
|
D | adxl372.c | 896 u16 raw_val; in adxl372_write_event_value() local 900 raw_val = DIV_ROUND_UP(val * 1000000, ADXL372_USCALE); in adxl372_write_event_value() 904 return adxl372_write_threshold_value(indio_dev, addr, raw_val); in adxl372_write_event_value() 907 return adxl372_write_threshold_value(indio_dev, addr, raw_val); in adxl372_write_event_value()
|
D | bmc150-accel-core.c | 553 __le16 raw_val; in bmc150_accel_get_axis() local 563 &raw_val, sizeof(raw_val)); in bmc150_accel_get_axis() 570 *val = sign_extend32(le16_to_cpu(raw_val) >> chan->scan_type.shift, in bmc150_accel_get_axis()
|