Lines Matching full:gain
3 * HMC425A and similar Gain Amplifiers
42 u32 gain; member
62 int code, gain = 0; in hmc425a_read_raw() local
68 code = st->gain; in hmc425a_read_raw()
72 gain = ~code * -500; in hmc425a_read_raw()
76 *val = gain / 1000; in hmc425a_read_raw()
77 *val2 = (gain % 1000) * 1000; in hmc425a_read_raw()
95 int code = 0, gain; in hmc425a_write_raw() local
99 gain = (val * 1000) - (val2 / 1000); in hmc425a_write_raw()
101 gain = (val * 1000) + (val2 / 1000); in hmc425a_write_raw()
103 if (gain > inf->gain_max || gain < inf->gain_min) in hmc425a_write_raw()
108 code = ~((abs(gain) / 500) & 0x3F); in hmc425a_write_raw()
115 st->gain = code; in hmc425a_write_raw()
117 ret = hmc425a_write(indio_dev, st->gain); in hmc425a_write_raw()
180 .default_gain = -0x40, /* set default gain -31.5db*/
201 st->gain = st->chip_info->default_gain; in hmc425a_probe()
243 MODULE_DESCRIPTION("Analog Devices HMC425A and similar GPIO control Gain Amplifiers");