/* @ohm: key value search is looking for @i_low: return Lower interval index value @i_high: return Higher interval index value  */
static void ntc_lookup_comp(const struct ntc_type *type, unsigned int ohm, int *i_low, int *i_high)
/* @ohm: key value search is looking for @i_low: return Lower interval index value @i_high: return Higher interval index value  */
static void ntc_lookup_comp(const struct ntc_type *type, unsigned int ohm, int *i_low, int *i_high)
{
	int low = 0;
	int high = type->n_comp - 1;
	if (ohm > type->comp[low].ohm) {
		high = low;
	} else if (ohm < type->comp[high].ohm) {
		low = high;
	}
	while (high - low > 1) {
		int mid = (low + high) / 2;
		if (ohm > type->comp[mid].ohm) {
			high = mid;
		} else {
			low = mid;
		}
	}
	*i_low = low;
	*i_high = high;
}