Lines Matching +full:pga +full:- +full:gain
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * ads7871 - driver for TI ADS7871 A/D converter
20 #define REG_PGA_VALID 2 /*PGA Valid Register*/
22 #define REG_GAIN_MUX 4 /*Gain/Mux Register*/
44 #define MUX_G_BV 4 /*allows for reg = (gain << MUX_G_BV) | ...*/
59 #include <linux/hwmon-sysfs.h>
95 struct spi_device *spi = pdata->spi; in voltage_show()
100 channel = attr->index; in voltage_show()
103 * other than single ended with a gain of 1 in voltage_show()
106 /*This is also where the gain of the PGA would be set*/ in voltage_show()
129 return -1; in voltage_show()
158 struct device *dev = &spi->dev; in ads7871_probe()
165 spi->mode = (SPI_MODE_0); in ads7871_probe()
166 spi->bits_per_word = 8; in ads7871_probe()
182 return -ENODEV; in ads7871_probe()
186 return -ENOMEM; in ads7871_probe()
188 pdata->spi = spi; in ads7871_probe()
190 hwmon_dev = devm_hwmon_device_register_with_groups(dev, spi->modalias, in ads7871_probe()