24 Sep, 2020
1 commit
-
Many hwmon drivers don't use the id information provided by the old
i2c probe function, and the remainder can easily be adapted to the new
form ("probe_new") by calling i2c_match_id explicitly.This avoids scanning the identifier tables during probes.
Drivers which didn't use the id are converted as-is; drivers which did
are modified as follows:* if the information in i2c_client is sufficient, that's used instead
(client->name);
* anything else is handled by calling i2c_match_id() with the same
level of error-handling (if any) as before.A few drivers aren't included in this patch because they have a
different set of maintainers. They will be covered by other patches.Signed-off-by: Stephen Kitt
Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
Signed-off-by: Guenter Roeck
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
1 commit
-
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
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: Updated description]
Signed-off-by: Guenter Roeck
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
04 Aug, 2014
1 commit
-
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to
simplify the code a bit.Signed-off-by: Axel Lin
Signed-off-by: Guenter Roeck
31 Jul, 2014
1 commit
-
On platforms with sizeof(int) < sizeof(long), writing a temperature
limit larger than MAXINT will result in unpredictable limit values
written to the chip. Avoid auto-conversion from long to int to fix
the problem.Cc: Axel Lin
Cc: stable@vger.kernel.org
Reviewed-by: Axel Lin
Signed-off-by: Guenter Roeck
30 Jan, 2014
1 commit
-
Signed-off-by: Jean Delvare
12 Dec, 2013
1 commit
-
The "rpm * div" operations can overflow here, so this patch adds an
upper limit to rpm to prevent that. Jean Delvare helped me with this
patch.Signed-off-by: Dan Carpenter
Acked-by: Roger Lucas
Cc: stable@vger.kernel.org
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
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Hans de Goede
Cc: Jean Delvare
Cc: Alistair John Strachan
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Clemens Ladisch
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Acked-by: Guenter Roeck
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Hans de Goede
Cc: Jean Delvare
Cc: Alistair John Strachan
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Clemens Ladisch
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Acked-by: Guenter Roeck
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Hans de Goede
Cc: Jean Delvare
Cc: Alistair John Strachan
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Clemens Ladisch
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Acked-by: Guenter Roeck
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
22 Jul, 2012
1 commit
-
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Jean Delvare
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
19 Mar, 2012
1 commit
-
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
26 Jul, 2011
3 commits
-
Declare myself the maintainer of the lm78 driver. I still have a
running system with one of these chips.Also count myself as a co-author of the driver. With 34 commits over
6 years, it seems fair.Signed-off-by: Jean Delvare
-
We should only include support for the ISA interface of the LM78/LM79
if CONFIG_ISA is set. Not only this makes the driver somewhat smaller
on most architectures, but this also avoids poking at random I/O
ports on these architectures.This is very similiar to what was done for the w83781d driver in
October 2008.Signed-off-by: Jean Delvare
Cc: Dean Nelson -
Move code around to avoid several forward declarations. Also group
ISA-related functions together, to make future changes easier.Signed-off-by: Jean Delvare
Cc: Dean Nelson
13 Jan, 2011
1 commit
-
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_
Coalesced any long formats
Removed prefixes from formatsSigned-off-by: Joe Perches
Signed-off-by: Jean Delvare
06 Feb, 2010
1 commit
-
Different motherboards have different PNP declarations for LM78/LM79
chips. Some declare the whole range of I/O ports (8 ports), some
declare only the useful ports (2 ports at offset 5) and some declare
fancy ranges, for example 4 ports at offset 4. To properly handle all
cases, request all ports individually for probing. After we have
determined that we really have an LM78 or LM79 chip, the useful port
range will be requested again, as a single block.This fixes the driver on the Olivetti M3000 DT 540, at least.
Signed-off-by: Jean Delvare
Cc: stable@kernel.org
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
Acked-by: Corentin Labbe
Cc: "Mark M. Hoffman"
Cc: Juerg Haefliger
Cc: Riku Voipio
Acked-by: "Hans J. Koch"
Cc: Rudolf Marek
15 Sep, 2009
1 commit
-
Drivers should be including instead of .
Signed-off-by: H Hartley Sweeten
Cc: Alistair John Strachan
Cc: Nicolas Boichat
Cc: Juerg Haefliger
Cc: Frank Seidel
Acked-by: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Signed-off-by: Jean Delvare
01 Jun, 2009
1 commit
-
The remove function uses __devexit, so the .remove assignment needs
__devexit_p() to fix a build error with hotplug disabled.Signed-off-by: Mike Frysinger
Signed-off-by: Jean Delvare
17 Oct, 2008
5 commits
-
The new-style lm78 driver implements the optional detect() callback
to cover the use cases of the legacy driver.Signed-off-by: Jean Delvare
-
Upcoming changes to the I2C part of the lm78 driver will cause ISA
devices to no longer have a struct i2c_client at hand. So, we must
stop (ab)using it now.Signed-off-by: Jean Delvare
-
The LM78 detection is relatively weak, and sometimes recent Winbond
chips can be misdetected as an LM78. We have had repeated reports of
this happening. We have an explicit check against this for the ISA
access, do the same for I2C access now.Signed-off-by: Jean Delvare
-
The LM78 and LM79 can be accessed either on the I2C bus or the ISA
bus. We must not access the same chip through both interfaces. So far
we were relying on the user passing the correct ignore parameter to
skip the registration of the I2C interface as suggested by
sensors-detect, but this is fragile: the user may load the lm78
driver without running sensors-detect, and the i2c bus numbers are
not stable across reboots and hardware changes.So, better detect alias chips in the driver directly, and skip any
I2C chip which is obviously an alias of the ISA chip. This is done
by comparing the value of 26 selected registers.Signed-off-by: Jean Delvare
-
Only request I/O ports 0x295-0x296 instead of the full I/O address
range. This solves a conflict with PNP resources on a few motherboards.Also request the I/O ports in two parts (4 low ports, 4 high ports)
during device detection, otherwise the PNP resource make the request
(and thus the detection) fail.This is the exact same fix that was applied to driver w83781d in
March 2008 to address the same problem:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2961cb22ef02850d90e7a12c28a14d74e327df8dSigned-off-by: Jean Delvare
19 Feb, 2008
1 commit
-
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
2 commits
-
Many I2C hwmon drivers define a driver ID but no other code references
these, meaning that they are useless. Discard them, along with a few
IDs which are defined but never used at all.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
We've never seen any device supported by the lm78 or w83781d driver at
addresses 0x20-0x27, so let's stop probing these addresses. Extra probes cost
time, and have potential for confusing or misdetecting other I2C devices.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
2 commits
-
Add individual alarm files to the lm78 driver, these are needed by
the next version of libsensors.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Signed-off-by: Mark M. Hoffman -
Convert from class_device to device for hwmon_device_register/unregister
Signed-off-by: Tony Jones
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Kay Sievers
Signed-off-by: Mark M. Hoffman
09 Sep, 2007
1 commit
-
Fix an off-by-one error in the I/O region declaration of two
hardware monitoring drivers (lm78 and w83781d.) We were requesting
one extra port at the end of the region.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
31 Jul, 2007
1 commit
-
Here is a small but important bugfix to the lm78 driver. I found out about this
problem because a Fedora user filed a bug that the lm78 driver no longer worked
on his system: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249428The problem is that sometime ago the isa lm78 detection was made more stringent
and this new code now checks the chip-id, but does not accept a chip-id of 20h,
however a chip-id of 20h is valid, and is excepted in the main probe function
of the driver, see line 551. This fixed also makes the isa detection code
accept the chip-id of 0x20 fixing this issue.Signed-off-by: Hans de Goede
Signed-off-by: Mark M. Hoffman
08 May, 2007
1 commit
-
This lets us get rid of macro-generated functions and shrinks the
driver size significantly (about 10%).Signed-off-by: Jean Delvare