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
7 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 -
The new-style lm85 driver implements the optional detect() callback
to cover the use cases of the legacy driver.Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl -
The Analog Devices and SMSC devices supported by the lm85 driver do
not have the same PWM frequency table as the National Semiconductor
devices. Add support for per-device frequency tables.Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl -
The LM85 and compatible chips only support 8 arbitrary PWM frequencies.
The algorithm to pick one of them based on the user input is not
optimum. Improve it to always pick the closest supported frequency.Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl -
Implement the standard PWM frequency interface: pwm[1-*]_freq in
units of 1 Hz, instead of the non-standard pwm[1-*]_auto_pwm_freq
in units of 0.1 Hz. The old naming was not only non-standard, it was
also confusing, because it suggested that the frequency value only
applied in automatic fan speed mode, which isn't true.Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl -
Rework the device detection to make it clearer and faster in the
general case (when a known device is found.)Signed-off-by: Jean Delvare
Acked-by: Herbert Poetzl
01 Aug, 2008
5 commits
-
Clean up and simplify the device initialization function:
* Degrade error messages to warnings - what they really are.
* Stop warning about VxI mode, we don't really care.
* Drop comment about lack of limit initialization - that's the standard
way, all hardware monitoring drivers do that.
* Only read the configuration register once.
* Only write back to the configuration register if needed.
* Don't attempt to clear the lock bit, it locks itself to 1.
* Move the function to before it's called, so that we no longer need to
forware declare it.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
Misc cleanups to the lm85 hardware monitoring driver:
* Mark constant arrays as const.
* Remove useless masks.
* Have lm85_write_value return void - nobody is checking the returned
value anyway and in some cases it was plain wrong.
* Remove useless initializations.
* Rename new_client to client in lm85_detect.
* Replace cascaded if/else with a switch/case in lm85_detect.
* Group similar loops in lm85_update_device.
* Remove legacy comments.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
In set_pwm_auto_pwm_minctl, we write cached register bits back to the
chip. This is a bad idea as we have no guarantee that the cache is
up-to-date. Better read a fresh register value from the chip, it's
safer and in fact it is also more simple.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
Drop a lot of useless register defines, conversion macros, data structure
members and update code. All these register values were read from the
device but nothing is done out of them, so this is all dead code in
practice.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
Fix most style issues reported by checkpatch, including:
* Trailing, missing and extra whitespace
* Extra parentheses, curly braces and semi-colons
* Broken indentation
* Lines too longI verified that the generated code is the same before and after
these changes.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman
19 Jun, 2008
1 commit
-
Function RANGE_TO_REG() is broken. For a requested range of 2000 (2
degrees C), it will return an index value of 15, i.e. 80.0 degrees C,
instead of the expected index value of 0. All other values are handled
properly, just 2000 isn't.The bug was introduced back in November 2004 by this patch:
http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commit;h=1c28d80f1992240373099d863e4996cdd5d646d0While this can be fixed easily with the current code, I'd rather
rewrite the whole function in a way which is more obviously correct.Signed-off-by: Jean Delvare
Cc: Justin Thiessen
Signed-off-by: Mark M. Hoffman
19 Feb, 2008
1 commit
-
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
4 commits
-
What was true of reading the VRM value is also true of writing it: not
being a register value, it doesn't need hardware access, so we don't
need a reference to the i2c client. This allows for a minor code
cleanup. As gcc appears to be smart enough to simplify the generated
code by itself, this cleanup only affects the source code, the
generated binaries are unchanged.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
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 -
Make the pwmN_enable files writable. This makes it possible to use
standard fan speed control tools (pwmconfig, fancontrol) with the lm85
driver.I left the non-standard pwmN_auto_channels files in place, as they
give additional control for the automatic mode, and some users might
be used to them by now.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
The values returned by the lm85 driver in pwmN_enable sysfs files do
not match the standard. Fix that.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
7 commits
-
The VRM value is not read from chip registers, so there's no need
to update the device data cache before exporting the VRM value to
user-space.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Signed-off-by: Mark M. Hoffman -
Trying to set the fan min limit to 0 currently writes 0 to the
register, which is an invalid value. It's read back as -1 and the
alarm flag is raised. Instead we should write 0xffff (maximum
value), which reads back as 0 and no alarm flag is raised.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
The way the lm85 driver currently handles the additional resolution
bits some chips have for the voltage and temperature measurements is
quite complex. This is my attempt to make it simpler.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
The future libsensors needs these individual alarm and fault files.
Also delete old and unused alarm defines.
Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
The SMSC EMC6D100 supports 3 additional voltage channels. The lm85
driver reads the register values for these, but doesn't create the
corresponding sysfs files, so the user can't read the values nor write
the limits. Create the missing sysfs files.Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman -
This lets us get rid of macro-generated functions and shrinks the
driver size by about 10%. I used a new style suggested by Mark M.
Hoffman to retrieve the channel number. Instead of:struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
int nr = sda->index;I do:
int nr = to_sensor_dev_attr(attr)->index;
This looks better, and even allows the compiler to do some minor
optimizations.Signed-off-by: Jean Delvare
Acked-by: Krzysztof Helt
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
15 Feb, 2007
2 commits
-
Cleanup a bogus legacy comment that has been replicated to many
hardware monitoring drivers.Signed-off-by: Jean Delvare
-
Signed-off-by: Jean Delvare
29 Sep, 2006
1 commit
-
hwmon: Fix unchecked return status, batch 2
Fix up some hwmon drivers so that they no longer ignore return status
from device_create_file().Signed-off-by: Mark M. Hoffman
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
24 Mar, 2006
2 commits
-
"register" is a reserved keyword so using it as a parameter name
can confuse some compilers, most notably ICC.The patch below just renames all occurences to reg which fits the actual
function declarations.Signed-off-by: Darren Jenkins
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
convert drivers/hwmon/*.c semaphore use to mutexes.
the conversion was generated via scripts, and the result was validated
automatically via a script as well.all affected hwmon drivers were build-tested.
Signed-off-by: Ingo Molnar
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
06 Jan, 2006
4 commits
-
Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers. This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)Signed-off-by: Greg Kroah-Hartman
Cc: Jean Delvare -
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.This patch updates the hwmon drivers.
Signed-off-by: Laurent Riffard
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Support the VRM 10 mode of the ADT7463.
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
29 Oct, 2005
2 commits
-
lm78.c and lm85.c have a number of items declared static
then implemented without the static on them. The following
patch fixes these sparse errors.Signed-off-by: Ben Dooks
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Use kzalloc instead of kmalloc+memset in all hardware monitoring
drivers.Signed-off-by: Deepak Saxena
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
06 Sep, 2005
3 commits
-
The only part left in i2c-sensor is the VRM/VRD/VID handling code.
This is in no way related to i2c, so it doesn't belong there. Move
the code to hwmon, where it belongs.Note that not all hardware monitoring drivers do VRM/VRD/VID
operations, so less drivers depend on hwmon-vid than there were
depending on i2c-sensor.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
The only thing left in i2c-sensor.h are module parameter definition
macros. It's only an extension of what i2c.h offers, and this extension
is not sensors-specific. As a matter of fact, a few non-sensors drivers
use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
altogether.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
i2c_probe and i2c_detect now do the exact same thing and operate on
the same data structure, so we can have everyone call i2c_probe.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman