summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adt7310.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (adt7310) Use spi_w8r16be() instead spi_w8r16()Lars-Peter Clausen2013-10-031-6/+1Star
| | | | | | | | | Using spi_w8r16be() instead of spi_w8r16() in this driver makes a code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@linaro.org>
* hwmon: (adt7310) Fix sparse warningGuenter Roeck2013-04-081-1/+1
| | | | | | | Fix: drivers/hwmon/adt7310.c:51:16: sparse: cast to restricted __be16 Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adt7x10) Add alarm interrupt supportLars-Peter Clausen2013-04-081-2/+2
| | | | | | | | | This allows an userspace application to poll() on the alarm files to get notified in case of a temperature threshold event. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adt7410) Add support for the adt7310/adt7320Lars-Peter Clausen2013-04-081-0/+123
The adt7310/adt7320 is the SPI version of the adt7410/adt7420. The register map layout is a bit different, i.e. the register addresses differ between the two variants, but the bit layouts of the individual registers are identical. So both chip variants can easily be supported by the same driver. The issue of non matching register address layouts is solved by a simple look-up table which translates the I2C addresses to the SPI addresses. The patch moves the bulk of the adt7410 driver to a common module that will be shared by the adt7410 and adt7310 drivers. This common module implements the driver logic and uses a set of virtual functions to perform IO access. The adt7410 and adt7310 driver modules provide proper implementations of these IO accessor functions for I2C respective SPI. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>