24 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
675 mass ave cambridge ma 02139 usaextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 441 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Michael Ellerman (powerpc)
Reviewed-by: Richard Fontana
Reviewed-by: Allison Randal
Reviewed-by: Kate Stewart
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman
16 Apr, 2019
2 commits
-
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
to improve readbility, and to reduce the chance of inconsistencies.Also replace any remaining S_ in the driver with octal values.
The conversion was done automatically with coccinelle. The semantic patches
and the scripts used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches/.This patch does not introduce functional changes. It was verified by
compiling the old and new files and comparing text and data sizes.Signed-off-by: Guenter Roeck
-
The following build warning is seen if CONFIG_OF is disabled.
drivers/hwmon/lm85.c:1645:34: warning:
‘lm85_of_match’ defined but not usedMark lm85_of_match as __maybe_unused to ix the problem.
Signed-off-by: Guenter Roeck
19 Feb, 2019
3 commits
-
The LM96000 expands the freqency field from 3 to 4 bits, to
add more frequencies in the 22.5 to 30 kHz ranges.Signed-off-by: Jeremy Gebben
Signed-off-by: Guenter Roeck -
It has been supported as a generic lm85 for quite some time.
Signed-off-by: Jeremy Gebben
Signed-off-by: Guenter Roeck -
Allow support for chips that support more than 8 frequencies.
Signed-off-by: Jeremy Gebben
Signed-off-by: Guenter Roeck
02 Apr, 2017
1 commit
-
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:.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
Signed-off-by: Guenter Roeck
03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for
read/write attributes. This simplifies the source code, improves
readbility, and reduces the chance of inconsistencies.The conversion was done automatically using coccinelle. It was validated
by compiling both the old and the new source code and comparing its text,
data, and bss size.Signed-off-by: Julia Lawall
[groeck: Update description]
Signed-off-by: Guenter Roeck
13 Dec, 2016
1 commit
-
Writes into voltage limit attributes can overflow due to an unbound
multiplication.Reviewed-by: Jean Delvare
Signed-off-by: Guenter Roeck
17 Apr, 2015
1 commit
-
Replace RANGE_TO_REG() and FREQ_TO_REG() implementations with
calls to find_closest().Signed-off-by: Bartosz Golaszewski
Cc: Guenter Roeck
Cc: Steven Rostedt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Aug, 2014
2 commits
-
Use devm_hwmon_device_register_with_groups() to simplify the code a bit.
Signed-off-by: Axel Lin
Signed-off-by: Guenter Roeck -
Reorder functions to avoid forward declaration.
Signed-off-by: Axel Lin
Signed-off-by: Guenter Roeck
31 Jul, 2014
1 commit
-
Temperature limit register writes did not account for negative numbers.
As a result, writing -127000 resulted in -126000 written into the
temperature limit register. This problem affected temp[1-3]_min,
temp[1-3]_max, temp[1-3]_auto_temp_crit, and temp[1-3]_auto_temp_min.When writing pwm[1-3]_freq, a long variable was auto-converted into an int
without range check. Wiring values larger than MAXINT resulted in unexpected
register values.When writing temp[1-3]_auto_temp_max, an unsigned long variable was
auto-converted into an int without range check. Writing values larger than
MAXINT resulted in unexpected register values.vrm is an u8, so the written value needs to be limited to [0, 255].
Cc: Axel Lin
Cc: stable@vger.kernel.org
Reviewed-by: Axel Lin
Signed-off-by: Guenter Roeck
12 Jun, 2014
1 commit
-
Generic detection leads to too many false positives, so drop it. FWIW
sensors-detect does not have such generic detection. If the user wants
to force the driver to bind to a not yet supported chip, he/she can
still do so using sysfs attribute new_device.Signed-off-by: Jean Delvare
Signed-off-by: Guenter Roeck
30 Jan, 2014
1 commit
-
Signed-off-by: Jean Delvare
08 Apr, 2013
1 commit
-
Cc: Corentin Labbe
Cc: Mark M. Hoffman
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: Roger Lucas
Cc: Marc Hulsman
Signed-off-by: Guenter Roeck
26 Jan, 2013
1 commit
-
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.Signed-off-by: Guenter Roeck
Acked-by: George Joseph
Acked-by: Jean Delvare
22 Jul, 2012
1 commit
-
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
19 Mar, 2012
2 commits
-
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul insteadModify multi-line comments to follow Documentation/CodingStyle.
Also: s/#define^I/#define /
Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loopCc: Jean Delvare
Signed-off-by: Guenter Roeck -
This patch converts the drivers in drivers/hwmon/* to use the
module_i2c_driver() macro which makes the code smaller and a bit simpler.Signed-off-by: Axel Lin
Cc: Corentin Labbe
Cc: Dirk Eibach
Cc: "Mark M. Hoffman"
Cc: Steve Glendinning
Cc: Riku Voipio
Cc: Guillaume Ligneul
Cc: David George
Cc: "Hans J. Koch"
Cc: Marc Hulsman
Cc: Rudolf Marek
Signed-off-by: Guenter Roeck
29 Apr, 2011
2 commits
-
We must remove all files we created, even in error cases.
Fixes second part of kernel bug #34072:
https://bugzilla.kernel.org/show_bug.cgi?id=34072Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck -
Fixes kernel bug #34072:
https://bugzilla.kernel.org/show_bug.cgi?id=34072Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
15 Mar, 2011
4 commits
-
EMC6D103S is similar to EMC6D103, only it does not support registers 62[5:7],
6D[0:7], and 6E[0:7]. Register respective sysfs attributes and update affected
registers for all other chips only.Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare -
So far, the driver updates temp_auto_hyst and temp_auto_off if temp_auto_min changes.
This may cause problems if temp_auto_off was not configured before configuring
temp_auto_min, because one of the variables used (off_desired) is not initialized
in this case.To simplify the code, and for consistency with other drivers, no longer update the delta
between "min" and "off" until the user sets the "off" value again.Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare -
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare -
ADT7463 and ADT7468 optionally support VID5 instead of the standard +12V
measurement input. Use a boolean to identify the chip configuration instead of
hardcoding it several times.Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
19 Feb, 2011
1 commit
-
The interface is identical EMC6D102, so all that needs to be added are
some definitions and their uses.Registers apparently missing in EMC6D103S/EMC6D103:A2 compared to EMC6D103:A0,
EMC6D103:A1, and EMC6D102 (according to the data sheets), but used
unconditionally in the driver: 62[5:7], 6D[0:7], and 6E[0:7]. For that
reason, EMC6D103S chips don't get enabled for the time being.Signed-off-by: Jan Beulich
(Guenter Roeck: Replaced EMC6D103_A2 with EMC6D103S per EMC6D103S datasheet)
Signed-off-by: Guenter Roeck
Cc: stable@kernel.org
29 Oct, 2010
2 commits
-
The ADT7468 supports a high-frequency PWM output mode where all PWM
outputs are driven by a 22.5 kHz clock. Add support for this mode, and
document it, as it may surprise the user that setting one PWM output
frequency also affects the other PWM outputs.Signed-off-by: Jean Delvare
Cc: Darrick J. Wong
Acked-by: Guenter Roeck -
The ADT7468 uses the same frequency table as the ADT7463.
Signed-off-by: Jean Delvare
Cc: stable@kernel.org
Cc: Darrick J. Wong
Acked-by: Guenter Roeck
15 Dec, 2009
3 commits
-
These macros simply declare an enum, so drivers might as well declare
it themselves. This puts an end to the arbitrary limit of 8 chip types
per i2c driver.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang -
Struct i2c_client_address_data only contains one field at this point,
which makes its usefulness questionable. Get rid of it and pass simple
address lists around instead.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang -
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang
10 Dec, 2009
1 commit
-
As kind is now hard-coded to -1, there is room for code clean-ups.
Signed-off-by: Jean Delvare
15 Sep, 2009
1 commit
-
The Winbond/Nuvoton WPCD377I is the reduced version of a Super-I/O
which emulates the National Semiconductor LM96000 hardware monitoring
chips, but without the hardware monitoring part. Instead of plain
disabling the emulation, the vendor left the emulated chip visible,
but all monitored values are always zero. This is rather confusing for
the users. So detect this case and refuse to bind to such fake chips.This fixes lm-sensors ticket #2182:
http://www.lm-sensors.org/ticket/2182Signed-off-by: Jean Delvare
11 Mar, 2009
2 commits
-
The adt7468 chip supports VRM10 sensors just like the adt7463; add a
missing check for it.Signed-off-by: Darrick J. Wong
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The verstep check in the lm85 driver fails because the upper nibble of
the version register is 0x7, not 0x6, on the adt7468 chip. Probing of
all adt7468s was broken by 69fc1feba2d5856ff74dedb6ae9d8c490210825c
("hwmon: (lm85) Rework the device detection"), and this patch fixes
that. Also add in a missing i2c_device_id that accidentally got dropped
from the original patch.Signed-off-by: Darrick J. Wong
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Nov, 2008
1 commit
-
The adt7468 is a follow-on to the adt7463, so plumb in adt7468 support
along the same code paths.Signed-off-by: Darrick J. Wong
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Oct, 2008
2 commits
-
Label names ERROR1 and ERROR3 aren't exactly explicit. Change them for
better names that indicate what we are up to.Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl -
Function RANGE_TO_REG can easily be simplified. Credits go to Herbert
Poetzl for indirectly suggesting this to me. I tested that the new
implementation returns the same result as the original implementation
for all input values.Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl