19 Feb, 2019
1 commit
-
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.This patch fixes the following warnings:
drivers/hwmon/f71882fg.c: In function ‘f71882fg_probe’:
drivers/hwmon/f71882fg.c:2457:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
data->auto_point_temp_signed = 1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/hwmon/f71882fg.c:2459:3: note: here
case f71889fg:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified
in accordance with what GCC is expecting to find.This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Guenter Roeck
03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RO for read-only 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
10 Aug, 2015
4 commits
-
Add f81768d (id 0x1210) currently found on Jetway motherboards.
It has 11 voltages but otherwise needed no special handling
in this driver.Signed-off-by: George Joseph
Signed-off-by: Guenter Roeck -
The f81866a voltage-1 protector(VIN1) address
is differ from f71882.f71882 status:12H, beep:13H, v-high:32H
f81866a status:16H, beep:17H, v-high:3aHSigned-off-by: Peter Hung
Signed-off-by: Guenter Roeck -
The temperature value of Fintek F81866 is the same with
f71882fg. It located with 0x6c + 2*(nr), others located
with 0x6c + 2*(nr+1). We change the rule in f71882fg_probe(),
If type = f71858fg/f8000/f81866a. the temp_start will set to 0,
others are 1.The F81866 over-temperature beep setting is not the same with
f71882fg too. They are using the same address 63H, but F81866 is
using bit 0/1/2 & 4/5/6, others are using bit 1/2/3 & 5/6/7,
So we copy from fxxxx_temp_beep_attr[] to f81866_temp_beep_attr
and change bit setting.Signed-off-by: Peter Hung
Signed-off-by: Guenter Roeck -
Add New Fintek SuperIO F81866(0x1010) & F71868(0x1106)
with H/W Monitor functions.We increased F71882FG_MAX_INS from 9 to 10 to read
F71868 10 voltage sets.Signed-off-by: Peter Hung
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
14 Oct, 2013
1 commit
-
Leftover from commit 33cd66e3 (hwmon: (f71882fg) Convert to use
devm_ functions).Signed-off-by: Guenter Roeck
12 Aug, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
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
1 commit
-
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
24 Sep, 2012
2 commits
-
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck
-
Fix:
warning: 'address' may be used uninitialized in this function [-Wuninitialized]
While this is a false warning, the patch reduces module size on x86_64 by
approximately 175 bytes, so it is still worth the effort.Signed-off-by: Guenter Roeck
Acked-by: Hans de Goede
19 Mar, 2012
2 commits
-
Cc: Hans de Goede
Signed-off-by: Guenter Roeck -
fixed:
WARNING: static const char * array should probably be static const char * const
+static const char *f71882fg_names[] = {Signed-off-by: Frans Meulenbroeks
Signed-off-by: Guenter Roeck
06 Jan, 2012
1 commit
-
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuolThis satisfies checkpatch -f
Compile tested only: no warnings or errors givenSigned-off-by: Frans Meulenbroeks
Signed-off-by: Guenter Roeck
25 Oct, 2011
3 commits
-
Before this patch the f71882fg driver completely fails to initialize
on systems which have reserved settings in the pwm enable register, and
it disables all auto pwm sysfs attributes if any fan is controlled by
a digital sensor reading.This patch changes the fail to initialize into don't register any attributes
for the fan for which there are reserved settings in the pwm enable register
and also makes the not registering of auto pwm sysfs attributes a per fan
thing.Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
This is a preparation patch for not registering fan/pwm attributes for
some fans (rather then register them for all or for none).Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
This is a preparation patch for not registering fan/pwm attributes for
some fans (rather then register them for all or for none).Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck
03 Jul, 2011
2 commits
-
The F71869A is almost the same as the F71869F/E, except that it has
the normal number of temp and pwm zones for a F71882FG derived chip,
rather then the limited number of the F71869F/E.Signed-off-by: Hans de Goede
Tested-by: Max Baldwin
Acked-by: Guenter Roeck
Signed-off-by: Jean Delvare -
Signed-off-by: Hans de Goede
Signed-off-by: Jean Delvare
26 May, 2011
2 commits
-
Signed-off-by: Hans de Goede
Signed-off-by: Jean Delvare -
Needed for upcoming support of the F71808A.
Signed-off-by: Hans de Goede
Signed-off-by: Jean Delvare
26 Mar, 2011
5 commits
-
Signed-off-by: Hans de Goede
Acked-by: Guenter Roeck
Signed-off-by: Jean Delvare -
Add support for the Fintek F81865F. It's essentially compatible with
the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan
inputs only.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Acked-by: Guenter Roeck -
The list of supported devices was not always well documented in all
places. Clarify and list all devices in documentation, Kconfig and
the driver itself.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Acked-by: Guenter Roeck -
Use tables to list the count of fan and temperature inputs for all
supported chips, almost similar to (but more simple than) what is
already done for voltage inputs. This avoids repeating the same tests
in different functions, and will make it easier to add support for
chips with a different count of fan or temperature inputs.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Acked-by: Guenter Roeck -
Using C99-style array initialization will ensure definitions won't
drift if the chips enum gets new values added.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Acked-by: Guenter Roeck
15 Mar, 2011
10 commits
-
Signed-off-by: Hans de Goede
Tested-by: Jonathan Michalon
Signed-off-by: Guenter Roeck -
Note that these 2 are register compatible and report the same superio id,
but they are 2 distinct chips / models!Signed-off-by: Hans de Goede
Tested-by: Thomas Faber
Tested-by: Alexey Sychev
Tested-by: Dieter Bloms
Signed-off-by: Guenter Roeck -
Note that this patch also makes 2 changes to the code paths for the f71889fg
to keep the code unified between the 2 (for simplicities sake). Both of these
are harmless for then f71889fg:1) The first change is to always set the FAN_PROG_SEL bit to 0. This influences
accesses to some banked fan / pwm registers. On the f71889fg no registers
which we use are banked. On the f71889ed however some more fan registers
have been banked including one which we use, by making the FAN_PROG_SEL bit
0, address 0x96 will point to the right register.
2) The second change is to see a FANx_TEMP_SEL value of 0 as pointing to
a PECI / AMDSI value, and thus disable our pwm related sysfs attr.
This is correct for the f71889ed and on the f71889fg 0 is a reserved
value, so we should never see it and if we do, disabling the pwm related
sysfs attr is a sane thing to do.Signed-off-by: Hans de Goede
Tested-by: Thomas Greve
Tested-by: Sander Eikelenboom
Signed-off-by: Guenter Roeck -
Putting this check in its own switch case rather then in the switch case
for adding pwm auto point sysfs attr is cleaner. This is a preparation patch
for adding support for more different models.Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
This is a preparation patch for adding support for more different models.
Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
Remove the temp2_type sysfs files for f8000 / f71858fg models,
this got in accidentally and is wrong as these models don't have a
Temperature Sensor Type Register at all.Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
Make the temp sysattr array for the standard models a 2d array, which allows
to use it for models with less temperatures too. This is a preparation
patch for adding support for more different models.Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
This is a preparation patch for adding support for more different models,
some of which have a sparse list of used voltage pins.Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck -
The code for determining a sensort type for temp1 was based on me misreading
the datasheet, the tested registers do not determine what kind of sensor
is actually reported as temp1. Instead the enable / disable certain additional
digital sensor readouts throug PECI / AMDSI, etc. Independent of these settings
temp1 is still reading an external BJT or thermistor as configured by the
Temperature Sensor Type Register (0x6b).Signed-off-by: Hans de Goede
Signed-off-by: Guenter Roeck
13 Mar, 2011
2 commits
-
This avoids a possible race leading to trying to dereference NULL.
Signed-off-by: Hans de Goede
Acked-by: Jean Delvare
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck -
Signed-off-by: Hans de Goede
Acked-by: Jean Delvare
Signed-off-by: Guenter Roeck