Lines Matching refs:value
423 static int vadc_hw_settle_time_from_dt(u32 value)
425 if ((value <= 1000 && value % 100) || (value > 1000 && value % 2000))
428 if (value <= 1000)
429 value /= 100;
431 value = value / 2000 + 10;
433 return value;
436 static int vadc_avg_samples_from_dt(u32 value)
438 if (!is_power_of_2(value) || value > VADC_AVG_SAMPLES_MAX)
441 return __ffs64(value);
656 u32 chan, value, varr[2];
673 ret = of_property_read_u32(node, "qcom,decimation", &value);
675 ret = qcom_vadc_decimation_from_dt(value);
678 chan, value);
699 ret = of_property_read_u32(node, "qcom,hw-settle-time", &value);
701 ret = vadc_hw_settle_time_from_dt(value);
704 chan, value);
712 ret = of_property_read_u32(node, "qcom,avg-samples", &value);
714 ret = vadc_avg_samples_from_dt(value);
717 chan, value);