24 Aug, 2020
1 commit
-
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
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
2 commits
-
Super-IO accesses may fail on a system with no or unmapped LPC bus.
Also, other drivers may attempt to access the LPC bus at the same time,
resulting in undefined behavior.Use request_muxed_region() to ensure that IO access on the requested
address space is supported, and to ensure that access by multiple drivers
is synchronized.Fixes: b72656dbc491 ("hwmon: (w83627hf) Stop using globals for I/O port numbers")
Signed-off-by: Guenter Roeck -
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. 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
06 Aug, 2014
1 commit
-
vrm is an u8, so the written value needs to be limited to [0, 255].
Signed-off-by: Axel Lin
Signed-off-by: Guenter Roeck
30 Jan, 2014
1 commit
-
Signed-off-by: Jean Delvare
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
20 Dec, 2012
2 commits
-
Only the W83627HF could be accessed through I2C. All other supported
chips are LPC-only, so they do not have I2C address registers. Don't
write to nonexistent or reserved registers on these chips.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck -
On suspend some register values are lost, most notably the Value RAM
areas but also other limits. Restore them on resume. On top of that,
some fixups are needed to work around BIOS bugs, in particular when
the BIOS omits running the same initialization sequence on resume
that it does after boot. In that case we have to carry initialization
over suspend.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
Tested-by: Guenter Roeck
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
06 Nov, 2012
1 commit
-
These got broken by recent patches fixing checkpatch warnings in these
drivers. The trick is that the patches themselves looked good, but the
source files after applying them do not. That's why I am not a big fan
of using tabs inside comments.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
19 Aug, 2012
1 commit
-
Signed-off-by: Andi Kleen
Signed-off-by: Guenter Roeck
22 Jul, 2012
1 commit
-
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
19 Mar, 2012
2 commits
-
Fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
ERROR: do not use assignment in if conditionModify 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
-
fix checkpatch ERROR:
return is not a function, parentheses are not requiredSigned-off-by: Frans Meulenbroeks
Signed-off-by: Guenter Roeck
13 Jan, 2012
1 commit
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Acked-by: Mauro Carvalho Chehab
Signed-off-by: Rusty Russell
09 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: Guenter Roeck
17 Dec, 2009
1 commit
-
The commit b72656dbc491484765776a16eeb55ef2e90efea6 introduced
a bug leading to the w83627hf_find function no longer finding
any chips.Signed-off-by: Christian Schulte
Signed-off-by: Jean Delvare
10 Dec, 2009
2 commits
-
Stop using global variables REG and VAL for I/O port numbers. This is
ugly and unsafe.Signed-off-by: Jean Delvare
Cc: Rodolfo Giometti -
This module parameter is there to workaround broken BIOS. I'm not even
sure if it was used in the past 5 years, and it gets in the way of
converting the driver to the MFD infrastructure. So tell the users how
they can do the same from user-space.Signed-off-by: Jean Delvare
Cc: Rodolfo Giometti
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
07 Jan, 2009
1 commit
-
Check for ACPI resource conflicts in hwmon drivers. I've included
all Super-I/O and PCI drivers.I've voluntarily left out:
* Vendor-specific drivers: if they conflicted on any system, this would
pretty much mean that they conflict on all systems, and we would know
by now.
* Legacy ISA drivers (lm78 and w83781d): they only support chips found
on old designs were ACPI either wasn't supported or didn't deal with
thermal management.
* Drivers accessing the I/O resources indirectly (e.g. through SMBus):
the checks are already done where they belong, i.e. in the bus drivers.Signed-off-by: Jean Delvare
Acked-by: David Hubbard
07 Aug, 2008
2 commits
-
Drop the reset parameter of the w83627hf driver. It seems it wasn't
that useful. It was dropped from the Linux 2.4 version of this driver
back in July 2004.The only users who have reported that they were still using this
parameter, needed it to switch the chip from automatic fan speed
control back to manual mode. Now that the driver creates pwmN_enable
sysfs files, users will be able to use these files instead, which is
way less agressive.Signed-off-by: Jean Delvare
Acked-by: Dominik Geyer -
Adds support for pwm_enable sysfs interface for the w83627hf driver.
Signed-off-by: Dominik Geyer
Signed-off-by: Jean Delvare
08 Feb, 2008
4 commits
-
We can handle the beep enable bit as any other beep mask bit for
slightly smaller code.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
The new libsensors needs these individual alarm and beep files. The
code was copied from the w83781d driver. I've tested the alarm files
on a W83627THF. I couldn't test the beep files as the system in
question doesn't have a speaker.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
If VBAT monitoring is disabled, enable it. Bug reported on the
lm-sensors trac system:
http://lm-sensors.org/ticket/2282
This is the exact same patch that was applied to the w83627ehf driver
6 months ago.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
While it is possible to force SMBus-based hardware monitoring chip
drivers to drive a not officially supported device, we do not have this
possibility for Super-I/O-based drivers. That's unfortunate because
sometimes newer chips are fully compatible and just forcing the driver
to load would work. Instead of that we have to tell the users to
recompile the kernel driver, which isn't an easy task for everyone.So, I propose that we add a module parameter to all Super-I/O based
hardware monitoring drivers, letting advanced users force the driver
to load on their machine. The user has to provide the device ID of a
supposedly compatible device. This requires looking at the source code or
a datasheet, so I am confident that users can't randomly force a driver
without knowing what they are doing. Thus this should be relatively safe.As you can see from the code, the implementation is pretty simple and
unintrusive.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Signed-off-by: Mark M. Hoffman
08 Nov, 2007
2 commits
-
patch changes 2 macros to incorporate the +1, and drops the +1 from all the
callers. This also allows a 'reroll' of an expanded loop, and adjusting
indexes and loop limits on another.Signed-off-by: Jim Cromie
Acked-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
This hoists nr-1 offset out of (show|store)_temp_*(.*) callbacks, and into
SENSOR_DEVICE_ATTRs for sysfs tempN_X files. It also combines
temp[1] and temp_add[2] (array) fields in w83627hf_data into 3 elem arrays,
which simplifies special-case handling of nr, allowing simplification
of callback bodies and rerolling a flattened loop in
w83627hf_update_device(struct device *dev).The array conversion changes temp[1] from u8 to u16, but this was
happening implicitly via the helper functions anyway.Signed-off-by: Jim Cromie
Acked-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
14 Oct, 2007
3 commits
-
The bank switching code assumes that the bank selector is set to 0
when the driver is loaded. This might not be the case. This is exactly
the same bug as was fixed in the w83627ehf driver two months ago:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0956895aa6f8dc6a33210967252fd7787652537dIn practice, this bug was causing the sensor thermal types to be
improperly reported for my W83627THF the first time I was loading the
w83627hf driver. From the driver history, I'd say that it has been
broken since September 2005 (when we stopped resetting the chip by
default at driver load.)Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
We need to read the fan clock dividers at initialization time,
otherwise the code in store_fan_min() may use uninitialized values.
That's pretty much the same bug and same fix as for the w83627ehf
driver last month.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
This patch to drivers/hwmon/w83627hf converts many sysfs items from DEVICE_ATTRs
to SENSOR_DEVICE_ATTRs, and replaces macros which expand to define redundant
callbacks, with callbacks which use the SENSOR_DEV.nr to know what to do.Signed-off-by: Jim Cromie
Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
2 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 -
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