Commit Graph

3147 Commits

Author SHA1 Message Date
Guenter Roeck 1009ccdc64 hwmon: (applesmc) Avoid buffer overruns
gcc 7.1 complains that the driver uses sprintf() and thus does not validate
the length of output buffers.

drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position':
drivers/hwmon/applesmc.c:82:21: warning:
	'%d' directive writing between 1 and 5 bytes into a region of size 4

Fix the problem by using scnprintf() instead of sprintf() throughout the
driver. Also explicitly limit the number of supported fans to avoid actual
buffer overruns and thus invalid keys.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-07-15 16:38:56 -07:00
Patrick Venture 44b413661b hwmon: (aspeed-pwm-tacho) Poll with short sleeps.
The reference driver polled but mentioned it was possible to sleep
for a computed period to know when it's ready to read.  However, polling
with minimal sleeps is quick and works.  This also improves responsiveness
from the driver.

Testing: tested on ast2400 on quanta-q71l

Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-24 08:58:06 -07:00
Patrick Venture ece0c03a9e hwmon: (aspeed-pwm-tacho) reduce fan_tach period
Reduce the fan_tach period such that the fan controller uses a shorter
period to measure the rpm.

The original period of 0x1000 was chosen as a conversative value from the
reference implementation.  Through experimentation on the quanta-q71l
board, I was able to drive the number down which ultimately reduced the
time the controller would use to determine the fan_tach.  This value was
recently tested and accepted downstream on the IBM Zaius board which uses
the ast2500.

Future work: It may be worthwhile as this is a tunable parameter to the
system, to allow overriding it through the device tree.

Testing: Tested on an ast2400 sitting on a quanta-q71l and ast2500 on
power9.

Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-24 08:57:42 -07:00
Shilpasri G Bhat 3a2b3d37e1 hwmon: (ibmpowernv) Add current(A) sensor
This patch exports current(A) sensors in inband sensors copied to
main memory by OCC.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-20 13:52:19 -07:00
Cédric Le Goater 3ab521601d hwmon: (ibmpowernv) introduce a legacy_compatibles array
Today, the type of a PowerNV sensor system is determined with the
"compatible" property for legacy Firmwares and with the "sensor-type"
for newer ones. The same array of strings is used for both to do the
matching and this raises some issue to introduce new sensor types.

Let's introduce two different arrays (legacy and current) to make
things easier for new sensor types.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-20 13:51:45 -07:00
Bartlomiej Zolnierkiewicz 677252a185 hwmon: (pwm-fan) Switch to new atomic PWM API
Switch pwm-fan driver to new atomic PWM API.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Carlo Caione ccc9b8263d hwmon: (scpi) Fix the scale of SCP sensor readings
The implementation details for SCPI seems to suggest that the sensor
readings must be reported by SCP using a well defined scale
(millidegree Celsius for temperature, millivolts for voltage,
milliamperes for current, microwatts for power and microjoules for
energy).

This is also important for the interaction with other subsystems: for
example both the thermal sub-system and the hwmon sysfs interface expect
the temperature expressed in millidegree Celsius.

Unfortunately since this behaviour is dependent on the firmware
implementation there are cases where the sensor readings are reported
using a different scale. For example in the Amlogic SoCs the
temperature is reported in degree and not millidegree Celsius.

To take into account this discrepancy and fixup the values reported by
SCP a new compatible 'amlogic,meson-gxbb-scpi-sensors' is introduced and
used in this patch by the scpi-hwmon driver to convert the sensor
readings to the expected scale.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Patrick Venture 1e276292bf hwmon: (aspeed-pwm-tacho) Enable both edge measurement.
The aspeed-pwm-tacho controller supports measuring the fan tach by using
leading, falling, or both edges.  This change allows the driver to
support either of the three configurations and will appropriately modify
the returned tach data.

If the controller is measuring with both edges it can return a value more
quickly to the requestor.  This version of the driver should still take ~1s
to return with an RPM value per fan, however, it can be tuned faster with
double edge counting enabled than without.

I tested this and found the number returned matched what I expected.

Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Shilpasri G Bhat 996cf5a5e9 hwmon: (ibmpowernv) Add highest/lowest attributes to sensors
OCC provides historical minimum and maximum value for the sensor
readings. This patch exports them as highest and lowest attributes
for the inband sensors copied by OCC to main memory.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Wolfram Sang 4ba1bb12cf hwmon: (pmbus) move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Wolfram Sang 0c9fe16141 hwmon: (max6639) move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Wolfram Sang 8116e8dd56 hwmon: (ltc4245) move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Wolfram Sang 570999f306 hwmon: (ds620) move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Wolfram Sang 9010624cc5 hwmon: (ads1015) move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Chris Packham 8f05bcc33e hwmon: (adt7475) temperature smoothing
When enabled temperature smoothing allows ramping the fan speed over a
configurable period of time instead of jumping to the new speed
instantaneously.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Chris Packham 3490c92a09 hwmon: (adt7475) add high frequency support
Systems using 4-wire fans usually require high frequency (22.5kHz)
output on the pwm. Add 22500 as a valid option in the pwmfreq_table. In
high frequency mode the low-order bit are ignored so they can safely be
set to 0.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Chris Packham 1d58f5efbf hwmon: (adt7475) fan stall prevention
By default adt7475 will stop the fans (pwm duty cycle 0%) when the
temperature drops past Tmin - hysteresis. Some systems want to keep the
fans moving even when the temperature drops so add new sysfs attributes
that configure the enhanced acoustics min 1-3 which allows the fans to
run at the minimum configure pwm duty cycle.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Chris Packham e465164040 hwmon: (adt7475) replace find_nearest() with find_closest()
The adt7475 has had find_nearest() since it's creation in 2009. Since
then find_closest() has been introduced and several drivers have been
updated to use it. Update the adt7475 to use find_closest() and remove
the now unused find_nearest().

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Samuel Mendoza-Jonas 8991ebd9c9 hwmon: (pmbus) Add client driver for IR35221
IR35221 is a Digital DC-DC Multiphase Converter

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
[groeck: Preserve alphabetic order in Kconfig;
	add missing break statements (from Dan Carpenter);
	add missing error checks]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Guenter Roeck 419220dc48 hwmon: (nct6775) Add support for NCT6795D
NCT6795D is mostly compatible to NCT6793D with a few minor differences.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Guenter Roeck e5c8522110 hwmon: (nct6775) Improve fan detection
Recent chips support multiple pins for fan speed inputs and fan control
outputs. Examine all of them to determine supported fan controls.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Guenter Roeck cc66b30382 hwmon: (nct6775) Rework temperature source and label handling
Instead of checking if a temperature source has a label, use a bit mask
to determine if a temperature source is valid for a given chip.
This simplifies the code and, if necessary, lets us support chips with
unknown or incomplete labels.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Guenter Roeck d1bb218687 hwmon: (nct6775) Use bitops
Using bitops instead of shift operations makes the code easier to read.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11 17:08:19 -07:00
Stefan Schaeckeler 5f348fa35a hwmon: (aspeed-pwm-tacho) make fan/pwm names start with index 1
Make fan and pwm names in sysfs start with index 1 in accordance to
Documentation/hwmon/sysfs-interface conventions.

Current implementation starts with index 0, making tools such as
sensors(1) skip the first fan.

Signed-off-by: Stefan Schaeckeler <sschaeck@cisco.com>
Fixes: 2d7a548a3e ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-03 03:55:43 -07:00
Stefan Schaeckeler 4d58e7329f hwmon: (aspeed-pwm-tacho) Call of_node_put() on a node not claimed
Call of_node_put() on a node claimed with of_node_get() or by any other
means such as for_each_child_of_node().

Signed-off-by: Stefan Schaeckeler <sschaeck@cisco.com>
Fixes: 2d7a548a3e ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-03 03:54:00 -07:00
Patrick Venture 7ed1c5e5dd hwmon: (aspeed-pwm-tacho) On read failure return -ETIMEDOUT
When the controller fails to provide an RPM reading within the alloted
time; the driver returns -ETIMEDOUT and no file contents.

Signed-off-by: Patrick Venture <venture@google.com>
Fixes: 2d7a548a3e ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-05-30 15:15:40 -07:00
Guenter Roeck 08fd5e76c2 hwmon: (aspeed-pwm-tacho) Select REGMAP
The driver uses regmap and thus has to select it to avoid build
errors such as the following.

drivers/hwmon/aspeed-pwm-tacho.c:337:21: error: variable
	'aspeed_pwm_tacho_regmap_config' has initializer but incomplete type

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Joel Stanley <joel@jms.id.au>
Fixes: 2d7a548a3e ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-05-30 15:15:19 -07:00
Thomas Gleixner 90b4f30b6d hwmon: (coretemp) Handle frozen hotplug state correctly
The recent conversion to the hotplug state machine missed that the original
hotplug notifiers did not execute in the frozen state, which is used on
suspend on resume.

This does not matter on single socket machines, but on multi socket systems
this breaks when the device for a non-boot socket is removed when the last
CPU of that socket is brought offline. The device removal locks up the
machine hard w/o any debug output.

Prevent executing the hotplug callbacks when cpuhp_tasks_frozen is true.

Thanks to Tommi for providing debug information patiently while I failed to
spot the obvious.

Fixes: e00ca5df37 ("hwmon: (coretemp) Convert to hotplug state machine")
Reported-by: Tommi Rantala <tt.rantala@gmail.com>
Tested-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-05-14 07:49:32 -07:00
Sebastian Reichel 09d9d82745 hwmon: (twl4030-madc) drop driver
This driver is no longer needed:

 * It has no mainline users
 * It has no DT support and OMAP is DT only
 * iio-hwmon can be used for madc, which also works with DT

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-30 11:45:31 -07:00
Rahul Bedarkar 39c382a310 hwmon: (tmp103) Use SIMPLE_DEV_PM_OPS helper macro
Replace ifdefs with SIMPLE_DEV_PM_OPS helper macro.

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-24 06:30:41 -07:00
Chris Packham 4abdf38d20 hwmon: (adt7475) set start bit in probe
The ADT7475 and ADT7476 have the STRT bit cleared by default[1]. Before any
monitoring activities the STRT bit needs to be set. Logically this needs
to happen before any of the sensors are read so the probe() function
seems the best place for it.

[1] - https://www.onsemi.com/pub/Collateral/ADT7475-D.PDF

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-21 12:33:57 -07:00
Joe Schaack bdaf9c40b2 hwmon: (ina209) Handled signed registers
The shunt voltage and current registers are signed 16-bit values so
handle them as such.

Signed-off-by: Joe Schaack <jschaack@xes-inc.com>
Reviewed-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-21 12:30:09 -07:00
Javier Martinez Canillas a02c24a321 hwmon: (lm87) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-13 06:09:26 -07:00
Javier Martinez Canillas 0439bf71c3 hwmon: (lm87) Remove unused I2C devices driver_data
The I2C device ID entries set a .driver_data but this data is never
looked up by the driver. So don't set it and also remove the enum.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-13 06:07:34 -07:00
Jaghathiswari Rankappagounder Natarajan 2d7a548a3e drivers: hwmon: Support for ASPEED PWM/Fan tach
The ASPEED AST2400/2500 PWM controller supports 8 PWM output ports.
The ASPEED AST2400/2500 Fan tach controller supports 16 tachometer
inputs.
The device driver matches on the device tree node. The configuration
values are read from the device tree and written to the respective
registers.
The driver provides a sysfs entries through which the user can
configure the duty-cycle value (ranging from 0 to 100 percent) and read
the fan tach rpm value.

Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-10 13:12:18 -07:00
Mahoda Ratnayaka 67043d1853 hwmon: (lm87) Allow channel data to be set from dts file
Currently there is no method for setting the channel
value from the DTS file. When, the driver uses a dts
file to initialize the driver platform_data is not set.
As a result channel variable may not be set correctly.

Without the channel variable set correctly, some of the
sensors will not be initialized correctly. For example
temp3 sensor sysfs entries.

This implements the schema agreed with the device tree
binding document.

Signed-off-by: Mahoda Ratnayaka <mahoda.ratnayaka@alliedtelesis.co.nz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Sam Povilus a8ddfea095 hwmon: (ads7828) Accept optional parameters from device tree
Adding the ability for the ads7828 and ads7830 to use device tree to
get optional parameters instead of using platform devices. This allows
people using custom boards to also use the ads7828 in a non-default manner.

Signed-off-by: Sam Povilus <kernel.development@povil.us>
[groeck: Fixed whitespace errors in ads7828.txt]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Pali Rohár a4811b6cb4 hwmon: (dell-smm) Add Dell XPS 15 9560 into DMI list
It was reported that dell-smm-hwmon is working fine on Dell XPS 15 9560.

Link: http://www.spinics.net/lists/platform-driver-x86/msg10751.html
Reported-by: Vasile Dumitrescu <vasile.dumitrescu@undeva.eu>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Jean Delvare 5ba6bcbc33 hwmon: Constify str parameter of hwmon_ops->read_string
The read_string callback is supposed to retrieve a pointer to a
constant string.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas a1253027b7 hwmon: (tmp421) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 72fc64c68d hwmon: (tmp103) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 15390c610f hwmon: (tmp102) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 1c1a7b75bf hwmon: (stts751) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 02331c3a1a hwmon: (ucd9200) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 8881a19187 hwmon: (ucd9000) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 9e427083c3 hwmon: (max6697) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 5ada7055f2 hwmon: (lm95245) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas df8d57bf8a hwmon: (lm90) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas 00c0f9d3ae hwmon: (lm85) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00
Javier Martinez Canillas e97a45f1b4 hwmon: (lm75) Add OF device ID table
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02 07:01:53 -07:00