Age | Commit message (Collapse) | Author | Files | Lines |
|
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 usa
extracted 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 <[email protected]>
Reviewed-by: Michael Ellerman <[email protected]> (powerpc)
Reviewed-by: Richard Fontana <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Reviewed-by: Kate Stewart <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci
Signed-off-by: Guenter Roeck <[email protected]>
|
|
tmp401 separately read/wrote high and low bytes of temperature values while
the hardware supports reading/writing those values in one operation. Driver
has been modified to use word operations where possible.
Tested with a tmp432 sensor on a mips64 platform.
Signed-off-by: Jeroen De Wachter <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Use 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 <[email protected]>
[groeck: Updated description]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Andrew F. Davis <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
I2C address 0x37 may be used by EEPROMs, which can result in false
positives. Do not attempt to detect a chip at this address.
Reviewed-by: Jean Delvare <[email protected]>
Cc: [email protected] # v4.0+
Signed-off-by: Guenter Roeck <[email protected]>
|
|
TMP435 supports a range of I2C addresses, not just 0x4c.
Cc: Patrick Titiano <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The return value of i2c_smbus_read_byte_data() is checked in
tmp401_init_client(), but only a warning is printed and the device is
registered anyway. This leads to devices being registered even if they
cannot be physically detected.
Bail out from probe in case of write errors and notify the user.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Patrick Titiano <[email protected]>
[Bartosz Golaszewski: prepared for submission, code review fixes]
Signed-off-by: Bartosz Golaszewski <[email protected]>
[Guenter Roeck: Merged two patches into one]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Guenter Roeck <[email protected]>
|
|
time_after (as opposed to time_after_equal) already ensures that the
cache lifetime is at least as much as requested. There is no point in
manually adding another jiffy to that value, and this can confuse the
reader into wrong interpretation.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
TMP432 is similar to TMP431 with a second external temperature sensor.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Cached data is no longer valid after resetting the temperature history.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Use two-dimensional array pointing to registers
Merge temperature and limit access functions into a single function
Return error codes from I2C reads
Use DIV_ROUND_CLOSEST for rounding operations and improve rounding
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
instead of creating and removing sysfs attribute files individually.
Acked-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Turns out that TMP411B and TMP411C have different and unique device IDs.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
TMP431 is compatible to TMP401.
Also add support for additional I2C addresses supported by TMP411B
and TMP411C.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Cc: Corentin Labbe <[email protected]>
Cc: Mark M. Hoffman <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: Roger Lucas <[email protected]>
Cc: Marc Hulsman <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Acked-by: George Joseph <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon changes for v3.4 from Guenter Roeck:
"Mostly cleanup. No new drivers this time around, but support for
several chips added to existing drivers: TPS40400, TPS40422, MTD040,
MAX34446, ZL9101M, ZL9117M, and LM96080. Also, added watchdog support
for SCH56xx, and additional attributes for a couple of drivers."
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (137 commits)
hwmon: (sch56xx) Add support for the integrated watchdog (v2)
hwmon: (w83627ehf) Add support for temperature offset registers
hwmon: (jc42) Remove unnecessary device IDs
hwmon: (zl6100) Add support for ZL9101M and ZL9117M
hwmon: (adm1275) Add support for ADM1075
hwmon: (max34440) Add support for MAX34446
hwmon: (pmbus) Add more virtual registers
hwmon: (pmbus) Add support for Lineage Power MDT040
hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
hwmon: (max34440) Add support for 'lowest' output voltage attribute
hwmon: (jc42) Convert to use devm_kzalloc
hwmon: (max16065) Convert to use devm_kzalloc
hwmon: (smm665) Convert to use devm_kzalloc
hwmon: (ltc4261) Convert to use devm_kzalloc
hwmon: (pmbus) Simplify remove functions
hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
hwmon: (lineage-pem) Convert to use devm_kzalloc
hwmon: (hwmon-vid) Fix checkpatch issues
hwmon: (hwmon-vid) Add new entries to VRM model table
hwmon: (lm80) Add detection of NatSemi/TI LM96080
...
|
|
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 <[email protected]>
Cc: Corentin Labbe <[email protected]>
Cc: Dirk Eibach <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Steve Glendinning <[email protected]>
Cc: Riku Voipio <[email protected]>
Cc: Guillaume Ligneul <[email protected]>
Cc: David George <[email protected]>
Cc: "Hans J. Koch" <[email protected]>
Cc: Marc Hulsman <[email protected]>
Cc: Rudolf Marek <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
The below patch fixes some typos "aditional" to "additional", and also fixes
a comment with another word mispelled.
Signed-off-by: Justin P. Mattock <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuol
This satisfies checkpatch -f
Compile tested only: no warnings or errors given
Signed-off-by: Frans Meulenbroeks <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Signed-off-by: Andre Prendel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
Replace octal representation of file permissions by the corresponding
constants.
Signed-off-by: Andre Prendel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
Recent changes on the I2C front have left off-by-one array indexes in
3 hwmon drivers. Fix them.
Faulty commit:
e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Andre Prendel <[email protected]>
Cc: [email protected]
|
|
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 <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
|
|
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 <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
|
|
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.
Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
|
|
As kind is now hard-coded to -1, there is room for code clean-ups.
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Andre Prendel <[email protected]>
|
|
This adds support for TI's TMP411 sensor chip.
Preliminary support were done by Gabriel Konat, Sander Leget and
Wouter Willems. The chip is compatible with TI's TMP401 sensor
chip. It has additional support for historical minimun/maximum
measurements.
Signed-off-by: Andre Prendel <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
This is a new hwmon driver for TI's TMP401 temperature sensor IC. This driver
was written on behalf of an embedded systems vendor under the
Linux driver project.
It has been tested using a TI TMP401 sample attached to a i2c-tiny-usb adapter.
Which was provided by Till Harbaum, many thanks to him for this!
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|