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
1 commit
-
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
13 Apr, 2017
2 commits
-
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:.But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.Signed-off-by: Javier Martinez Canillas
Signed-off-by: Guenter Roeck -
The I2C device ID entries set a .driver_data but this data is never
looked up by the driver. So don't set it and also remove the enum.Signed-off-by: Javier Martinez Canillas
Signed-off-by: Guenter Roeck
02 Apr, 2017
1 commit
-
Currently there is no method for setting the channel
value from the DTS file. When, the driver uses a dts
file to initialize the driver platform_data is not set.
As a result channel variable may not be set correctly.Without the channel variable set correctly, some of the
sensors will not be initialized correctly. For example
temp3 sensor sysfs entries.This implements the schema agreed with the device tree
binding document.Signed-off-by: Mahoda Ratnayaka
Tested-by: Chris Packham
Signed-off-by: Chris Packham
Signed-off-by: Guenter Roeck
03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RO for read only attributes and 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
[groeck: Updated description]
Signed-off-by: Guenter Roeck
13 Dec, 2016
1 commit
-
Writes into voltage limit attributes can overflow due to an unbound
multiplication.Reviewed-by: Jean Delvare
Signed-off-by: Guenter Roeck
03 Dec, 2016
1 commit
-
This is the expected thing for a hwmon driver to do, this changes
the sysfs paths from, say:/sys/bus/i2c/devices/0-002c/temp1_input
to:
/sys/bus/i2c/devices/0-002c/hwmon/hwmon0/temp1_input
Signed-off-by: Jason Gunthorpe
Signed-off-by: Guenter Roeck
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
05 Apr, 2014
1 commit
-
All hwmon drivers allocate their data structure with some form of
kzalloc, so setting data fields to zero explicitly is a waste of time.Signed-off-by: Jean Delvare
Reviewed-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
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
5 commits
-
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
Signed-off-by: Guenter Roeck -
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
Signed-off-by: Guenter Roeck -
Fix checkpatch issue:
ERROR: do not use assignment in if conditionReplace repeated calls to device_create_file() with calls to sysfs_create_group.
Cc: Jean Delvare
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare -
Fixed:
ERROR: do not use assignment in if condition
ERROR: space required after that close brace '}'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare -
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
Cc: Corentin Labbe
Cc: Dirk Eibach
Cc: "Mark M. Hoffman"
Cc: Steve Glendinning
Cc: Riku Voipio
Cc: Guillaume Ligneul
Cc: David George
Cc: "Hans J. Koch"
Cc: Marc Hulsman
Cc: Rudolf Marek
Signed-off-by: Guenter Roeck
15 Dec, 2009
3 commits
-
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
Tested-by: Wolfram Sang -
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
Tested-by: Wolfram Sang -
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang
10 Dec, 2009
1 commit
-
As kind is now hard-coded to -1, there is room for code clean-ups.
Signed-off-by: Jean Delvare
Acked-by: Corentin Labbe
Cc: "Mark M. Hoffman"
Cc: Juerg Haefliger
Cc: Riku Voipio
Acked-by: "Hans J. Koch"
Cc: Rudolf Marek
17 Oct, 2008
3 commits
-
The lm87 driver normally assumes that firmware configured the chip
correctly. Since this is not always the case, alllow platform code to
set the channel register value via platform_data. All other
configuration registers can be changed after driver initialisation.Signed-off-by: Ben Hutchings
Signed-off-by: Jean Delvare -
This means that if we have to start the monitor when probed, we also
stop it on removal.Signed-off-by: Ben Hutchings
Signed-off-by: Jean Delvare -
lm87_init_client() conditionally sets the Start bit and clears the
INT#_Clear bit in the Config 1 register. The condition should be that
either of these bits needs changing, but currently it checks the
(self-clearing) Initialization bit instead of INT#_Clear.Fix the condition and also ensure we never set the Initialization bit.
Signed-off-by: Ben Hutchings
Signed-off-by: Jean Delvare
17 Jul, 2008
1 commit
-
The new-style lm87 driver implements the optional detect() callback
to cover the use cases of the legacy driver.Signed-off-by: Jean Delvare
Cc: Ben Hutchings
19 Feb, 2008
1 commit
-
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
3 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 -
It happens that the Analog Devices ADM1024 is fully compatible with
the National Semiconductor LM87, so support for the former can easily
be added to the lm87 driver.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
5 commits
-
A stupid bit shifting bug caused the VID value to be always exported
even when the hardware is configured for something different.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
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 -
Add individual alarm files to the lm87 driver. The new libsensors
needs this.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Signed-off-by: Mark M. Hoffman -
Missing parentheses in the definition of FAN_FROM_REG cause a division
by zero for a specific register value.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
08 May, 2007
1 commit
-
Some hardware monitoring drivers create the VID/VRM interface files
conditionally depending on the chip model or configuration. We should
only call vid_which_vrm() when we are actually going to create the
files. Not only it is more logical and efficient that way, but it also
prevents printing unnecessary warnings such as the one reported here:
http://lists.lm-sensors.org/pipermail/lm-sensors/2007-February/018954.htmlSigned-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
27 Jun, 2006
1 commit
-
acquired (aquired)
contiguous (contigious)
successful (succesful, succesfull)
surprise (suprise)
whether (weather)
some other misspellingsSigned-off-by: Andreas Mohr
Signed-off-by: Adrian Bunk
24 Mar, 2006
1 commit
-
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
1 commit
-
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