summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/cdc/ad7746.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-16 21:28:55 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-16 21:28:55 -0700
commit5da654541bb3cccaa480e8998f1bb770126341f1 (patch)
treeebdcb499579ea7a723a3b3eb207cb4fe61a5d9b8 /drivers/staging/iio/cdc/ad7746.c
parent26368fd7048f2c26d5263a932614351f04436be7 (diff)
parent801ab33596f3e2a70a3b3599618d966736299014 (diff)
downloadop-kernel-dev-5da654541bb3cccaa480e8998f1bb770126341f1.zip
op-kernel-dev-5da654541bb3cccaa480e8998f1bb770126341f1.tar.gz
Merge tag 'iio-for-4.4b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: Second set of new drivers, functionality and cleanups for IIO in the 4.4 cycle. Core stuff * adjust resistance documentation to allow for output devices. New device support: * bmc150 - split the i2c driver up into a core and i2c_regmap part including regmap conversion. - add spi support. * mcp4531 digitial potentiometer driver. * Measurement Specialties set of drivers with a core library module providing common functionality. Note that the htu21 has a driver in hwmon, but the view from that side was that, given the range of devices the same silicon turns up in are not all typical hwmon material, that driver would be deprecated in favour of this new support. - ms8607 temperature, pressure and humidty sensor - ms5637 temperature and pressure sensor - htu21 temperature and humidity sensor - tsys02d temperature sensor - tsys01 temperature sensor Cleanups * tree wide. - squish cases where irq 0 is still considered valid. * apds9960 - sparse endian warning cleanups by making endianness explicit. * ad5504 - leave group naming to the core. * ad7746 - cleanup comment style. - drop an unnecessary bit of dev_info - add some appropriate uses of the BIT macro. * ad799x - leave group naming to the core. * hdc100x - introduced this cycle,. - fix a wrong offset value. * lidar - add missing MODULE_DEVICE_TABLE for dt. * max1363 - leave sysfs group naming to the core. * m62332 got the Harmut treatment and as ever he found a 'few' bits the rest of us had missed! - Share scale and offset attributes across channels. - Shutdown the device on driver remove - Use ARRAY_SIZE rather than a hard coded count for channels. - Return more directly in the write_raw callback dropping a local variable along the way. - a few style issues - move to reading the regulator voltage for each use allowing for dynamic regulators. This is a common feature across drivers so we might end up with more fixes throughout the tree for this. * mlx96014 - introduced this cycle. - fixed up a spot of error handling. * vz89x - introduced this cycle. - work around a hardware quirk.
Diffstat (limited to 'drivers/staging/iio/cdc/ad7746.c')
-rw-r--r--drivers/staging/iio/cdc/ad7746.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 028b4e8..6cd15e6 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -68,12 +68,12 @@
#define AD7746_VTSETUP_VTCHOP (1 << 0)
/* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
-#define AD7746_EXCSETUP_CLKCTRL (1 << 7)
-#define AD7746_EXCSETUP_EXCON (1 << 6)
-#define AD7746_EXCSETUP_EXCB (1 << 5)
-#define AD7746_EXCSETUP_NEXCB (1 << 4)
-#define AD7746_EXCSETUP_EXCA (1 << 3)
-#define AD7746_EXCSETUP_NEXCA (1 << 2)
+#define AD7746_EXCSETUP_CLKCTRL BIT(7)
+#define AD7746_EXCSETUP_EXCON BIT(6)
+#define AD7746_EXCSETUP_EXCB BIT(5)
+#define AD7746_EXCSETUP_NEXCB BIT(4)
+#define AD7746_EXCSETUP_EXCA BIT(3)
+#define AD7746_EXCSETUP_NEXCA BIT(2)
#define AD7746_EXCSETUP_EXCLVL(x) (((x) & 0x3) << 0)
/* Config Register Bit Designations (AD7746_REG_CFG) */
@@ -528,7 +528,8 @@ static int ad7746_write_raw(struct iio_dev *indio_dev,
goto out;
}
- /* CAPDAC Scale = 21pF_typ / 127
+ /*
+ * CAPDAC Scale = 21pF_typ / 127
* CIN Scale = 8.192pF / 2^24
* Offset Scale = CAPDAC Scale / CIN Scale = 338646
*/
@@ -600,7 +601,8 @@ static int ad7746_read_raw(struct iio_dev *indio_dev,
switch (chan->type) {
case IIO_TEMP:
- /* temperature in milli degrees Celsius
+ /*
+ * temperature in milli degrees Celsius
* T = ((*val / 2048) - 4096) * 1000
*/
*val = (*val * 125) / 256;
@@ -753,8 +755,6 @@ static int ad7746_probe(struct i2c_client *client,
if (ret)
return ret;
- dev_info(&client->dev, "%s capacitive sensor registered\n", id->name);
-
return 0;
}
OpenPOWER on IntegriCloud