The err_eeprom and err_sw_init tags both go to the same location. So
instead of maintaining two tags this patch combines them so we only use
err_sw_init.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This change relocates the ixgbe_poll routine so it is right next to the
interrupt routine that schedules and calls it.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This change just cleans up some of the logic in the service_timer function
so that we can avoid unnecessary swapping of the ready value between true to
false and back to true.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This change makes it so that only the 2nd cache line in the ring structure
should see frequent updates. The advantage to this is that it should
reduce the amount of cross CPU cache bouncing since only the 2nd cache line
will be changing between most network transactions.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This change makes it so that we store the tx_flags and protocol information
to the tx_buffer_info structure sooner. This allows us to avoid unnecessary
read/write transactions since we are placing the data in the final location
earlier.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Add support for temperature offset registers for CPUTIN, SYSTIN,
and AUXTIN temperatures.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
We don't really use or need separate device IDs for the various JC42.4 compliant
chips, so remove them and just stick with jc42.
Also update a datasheet references for SE98A, STTS424, and STTS424E02.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
ZL9101M and ZL9117M are compatible to ZL6100. Add support to the zl6100 driver.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Add PMBUS_VIRT_READ_TEMP_AVG, PMBUS_VIRT_READ_TEMP2_AVG,
PMBUS_VIRT_READ_POUT_AVG, PMBUS_VIRT_READ_POUT_MAX,
and PMBUS_VIRT_RESET_POUT_HISTORY.
We'll need those for MAX34446.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
MDT040 is supported by the generic PMBus driver. Add device ID and reference to
datasheet. Also mention Lineage Power device support in Kconfig.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
TPS40400 and TPS40422 are supported by the generic PMBus driver.
Add device IDs and data sheet references.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
MAX34440 and compatibles support reporting the lowest measured output voltage.
Add support for it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Marginally less code and eliminate the possibility of memory leaks.
Also replace new_client variable with client and introduce dev variable to make
the code a bit easier to read.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Since devm_kzalloc() is now used to allocate driver memory, the client
driver remove function has no purpose other than to call pmbus_do_remove().
This means we can get rid of it by redefining pmbus_do_remove() to use the
same prototype, and pointing to it directly.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
Not fixed (url):
WARNING: line over 80 characters
Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
The VRM model table was missing several Intel CPUs, resulting in wrong VRM table
entries to be used for many recent CPUs. Update it. Also, use values from
struct cpuinfo_x86 to retrieve CPU model information instead of re-calculating
it locally.
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Add detection of the National Semiconductor (now Texas Instruments)
LM96080. It is functionally compatible with the LM80 but detection is
completely different.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Use SENSORS_DEVICE_ATTR instead of DEVICE_ATTR for most attributes,
so that the attribute number can be retrieved and it is no longer
necessary to generate functions using macros.
This shaves about 2 kB on the binary module size.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reorder functions and driver declaration to no longer need to
forward-declare functions. Also rename new_client to just client
everywhere for readability.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Some error paths do not set a result, leading to the (false)
assumption that the value may be used uninitialized. Set results for
those paths as well.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Register hwmon device as last operation in the probe function to ensure that all
attribute files exist when accessed from user applications. Otherwise, there
is a short time frame where the device is registered as hwmon device but
sysfs attributes do not yet exist. This could result in applications erroneously
not detecting attributes.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fix checkpatch issue:
ERROR: do not use assignment in if condition
Replace repeated calls to device_create_file() with calls to sysfs_create_group.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
ERROR: do not use assignment in if condition
Modify multi-line comments to follow Documentation/CodingStyle.
Other checkpatch issues not fixed to reduce number of conflicts with pending
rewrite as mfd driver.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
WARNING: braces {} are not necessary for single statement blocks
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
WARNING: space prohibited between function name and open parenthesis '('
Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
Modify multi-line comments to follow Documentation/CodingStyle.
Also replaced "<constant> == <variable>" with "<variable> == <constant>".
Translation was done with the following coccinelle script to limit risk.
@@
identifier i;
constant C;
@@
<...
- C == i
+ i == C
...>
Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that ',' (ctx:WxV)
ERROR: spaces required around that ':' (ctx:VxE)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '||' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
WARNING: space prohibited between function name and open parenthesis '('
Modify multi-line comments to follow Documentation/CodingStyle.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fix checkpatch issue:
ERROR: do not use assignment in if condition
Replace repeated calls to device_create_file() with calls to sysfs_create_group.
Cc: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: do not use assignment in if condition
ERROR: switch and case should be at the same indent
ERROR: trailing statements should be on next line
WARNING: braces {} are not necessary for single statement blocks
WARNING: simple_strtol is obsolete, use kstrtol instead
Modify multi-line comments to follow Documentation/CodingStyle.
Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis
Not all fixed (code complexity):
ERROR: do not use assignment in if condition
Cc: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: do not use assignment in if condition
ERROR: open brace '{' following function declarations go on the next line
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
ERROR: that open brace { should be on the previous line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
Modify multi-line comments to follow Documentation/CodingStyle.
Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fix checkpatch issue:
ERROR: do not use assignment in if condition
Replace repeated calls to device_create_file() with calls to sysfs_create_group.
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: "foo * bar" should be "foo *bar"
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxE)
ERROR: spaces required around that '==' (ctx:VxV)
WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
Not or not all fixed (code complexity):
ERROR: Macros with complex values should be enclosed in parenthesis
ERROR: do not use assignment in if condition
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>