Lines Matching defs:val
41 struct device_attribute *devattr, unsigned int *val)
61 *val = (sample[channel % 4] >> (channel > 3 ? 14 : 2)) & 0x3ff;
70 unsigned val;
73 int ret = mc13783_adc_read(dev, devattr, &val);
79 val = DIV_ROUND_CLOSEST(val * 9, 2);
85 val = DIV_ROUND_CLOSEST(val * 9, 4) + 2400;
87 return sprintf(buf, "%u\n", val);
94 unsigned val;
95 int ret = mc13783_adc_read(dev, devattr, &val);
101 * input range is [0, 2.3V], val has 10 bits, so each bit
104 val = DIV_ROUND_CLOSEST(val * 9, 4);
106 return sprintf(buf, "%u\n", val);
113 unsigned int val;
116 int ret = mc13783_adc_read(dev, devattr, &val);
123 val = DIV_ROUND_CLOSEST(val * 4800, 1024);
126 val = DIV_ROUND_CLOSEST(val * 2555, 1024);
128 return sprintf(buf, "%u\n", val);
135 unsigned int val;
138 int ret = mc13783_adc_read(dev, devattr, &val);
149 ret = DIV_ROUND_CLOSEST(-2635920 + val * 4244, 10);
156 ret = 346480 - 1140 * val;