Lines Matching full:gain

3  * HMC425A and similar Gain Amplifiers
26 * The LTC6373 amplifier supports configuring gain using GPIO's with the following
30 * From here, it is observed that all values are multiples of the '2' gain setting,
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()
312 .default_gain = -0x40, /* set default gain -31.5db*/
323 .default_gain = -0x10, /* set default gain -15.0db*/
334 .default_gain = 0xF, /* set default gain -22.0db*/
343 .gain_min = -12041, /* gain setting x0.25*/
344 .gain_max = 24082, /* gain setting x16 */
369 st->gain = st->chip_info->default_gain; in hmc425a_probe()
395 /* Set default gain */ in hmc425a_probe()
396 hmc425a_write(indio_dev, st->gain); in hmc425a_probe()
426 MODULE_DESCRIPTION("Analog Devices HMC425A and similar GPIO control Gain Amplifiers");