Lines Matching refs:gain

56 	int				(*gain_dB_to_code)(int gain, int *code);
64 u32 gain; member
71 int gain; in gain_dB_to_code() local
74 gain = (val * 1000) - (val2 / 1000); in gain_dB_to_code()
76 gain = (val * 1000) + (val2 / 1000); in gain_dB_to_code()
78 if (gain > inf->gain_max || gain < inf->gain_min) in gain_dB_to_code()
83 return st->chip_info->gain_dB_to_code(gain, code); in gain_dB_to_code()
86 static int hmc425a_gain_dB_to_code(int gain, int *code) in hmc425a_gain_dB_to_code() argument
88 *code = ~((abs(gain) / 500) & 0x3F); in hmc425a_gain_dB_to_code()
92 static int hmc540s_gain_dB_to_code(int gain, int *code) in hmc540s_gain_dB_to_code() argument
94 *code = ~((abs(gain) / 1000) & 0xF); in hmc540s_gain_dB_to_code()
98 static int adrf5740_gain_dB_to_code(int gain, int *code) in adrf5740_gain_dB_to_code() argument
100 int temp = (abs(gain) / 2000) & 0xF; in adrf5740_gain_dB_to_code()
107 static int ltc6373_gain_dB_to_code(int gain, int *code) in ltc6373_gain_dB_to_code() argument
109 *code = ~(DIV_ROUND_CLOSEST(gain, LTC6373_CONVERSION_CONSTANT) + 3) in ltc6373_gain_dB_to_code()
118 return st->chip_info->code_to_gain_dB(st->gain, val, val2); in code_to_gain_dB()
149 int gain = ((~code & LTC6373_CONVERSION_MASK) - 3) * in ltc6373_code_to_gain_dB() local
152 *val = gain / 1000; in ltc6373_code_to_gain_dB()
153 *val2 = (gain % 1000) * 1000; in ltc6373_code_to_gain_dB()
205 st->gain = code; in hmc425a_write_raw()
207 ret = hmc425a_write(indio_dev, st->gain); in hmc425a_write_raw()
261 code = (powerdown) ? LTC6373_SHUTDOWN : st->gain; in ltc6373_write_powerdown()
369 st->gain = st->chip_info->default_gain; in hmc425a_probe()
396 hmc425a_write(indio_dev, st->gain); in hmc425a_probe()