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 usa

    extracted 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

    Thomas Gleixner
     

16 Apr, 2019

2 commits

  • 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

    Guenter Roeck
     
  • The following build warning is seen if CONFIG_OF is disabled.

    drivers/hwmon/lm85.c:1645:34: warning:
    ‘lm85_of_match’ defined but not used

    Mark lm85_of_match as __maybe_unused to ix the problem.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

19 Feb, 2019

3 commits


02 Apr, 2017

1 commit

  • 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

    Javier Martinez Canillas
     

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: Update description]
    Signed-off-by: Guenter Roeck

    Julia Lawall
     

13 Dec, 2016

1 commit


17 Apr, 2015

1 commit


04 Aug, 2014

2 commits


31 Jul, 2014

1 commit

  • Temperature limit register writes did not account for negative numbers.
    As a result, writing -127000 resulted in -126000 written into the
    temperature limit register. This problem affected temp[1-3]_min,
    temp[1-3]_max, temp[1-3]_auto_temp_crit, and temp[1-3]_auto_temp_min.

    When writing pwm[1-3]_freq, a long variable was auto-converted into an int
    without range check. Wiring values larger than MAXINT resulted in unexpected
    register values.

    When writing temp[1-3]_auto_temp_max, an unsigned long variable was
    auto-converted into an int without range check. Writing values larger than
    MAXINT resulted in unexpected register values.

    vrm is an u8, so the written value needs to be limited to [0, 255].

    Cc: Axel Lin
    Cc: stable@vger.kernel.org
    Reviewed-by: Axel Lin
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

12 Jun, 2014

1 commit

  • Generic detection leads to too many false positives, so drop it. FWIW
    sensors-detect does not have such generic detection. If the user wants
    to force the driver to bind to a not yet supported chip, he/she can
    still do so using sysfs attribute new_device.

    Signed-off-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Jean Delvare
     

30 Jan, 2014

1 commit


08 Apr, 2013

1 commit


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

    Guenter Roeck
     

22 Jul, 2012

1 commit


19 Mar, 2012

2 commits

  • Fixed:
    ERROR: code indent should use tabs where possible
    ERROR: do not use assignment in if condition
    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: s/#define^I/#define /

    Not fixed (false positive):
    ERROR: Macros with multiple statements should be enclosed in a do - while loop

    Cc: Jean Delvare
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • 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

    Axel Lin
     

29 Apr, 2011

2 commits


31 Mar, 2011

1 commit


15 Mar, 2011

4 commits


19 Feb, 2011

1 commit

  • The interface is identical EMC6D102, so all that needs to be added are
    some definitions and their uses.

    Registers apparently missing in EMC6D103S/EMC6D103:A2 compared to EMC6D103:A0,
    EMC6D103:A1, and EMC6D102 (according to the data sheets), but used
    unconditionally in the driver: 62[5:7], 6D[0:7], and 6E[0:7]. For that
    reason, EMC6D103S chips don't get enabled for the time being.

    Signed-off-by: Jan Beulich
    (Guenter Roeck: Replaced EMC6D103_A2 with EMC6D103S per EMC6D103S datasheet)
    Signed-off-by: Guenter Roeck
    Cc: stable@kernel.org

    Jan Beulich
     

29 Oct, 2010

2 commits


15 Dec, 2009

3 commits


10 Dec, 2009

1 commit


15 Sep, 2009

1 commit

  • The Winbond/Nuvoton WPCD377I is the reduced version of a Super-I/O
    which emulates the National Semiconductor LM96000 hardware monitoring
    chips, but without the hardware monitoring part. Instead of plain
    disabling the emulation, the vendor left the emulated chip visible,
    but all monitored values are always zero. This is rather confusing for
    the users. So detect this case and refuse to bind to such fake chips.

    This fixes lm-sensors ticket #2182:
    http://www.lm-sensors.org/ticket/2182

    Signed-off-by: Jean Delvare

    Jean Delvare
     

11 Mar, 2009

2 commits

  • The adt7468 chip supports VRM10 sensors just like the adt7463; add a
    missing check for it.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     
  • The verstep check in the lm85 driver fails because the upper nibble of
    the version register is 0x7, not 0x6, on the adt7468 chip. Probing of
    all adt7468s was broken by 69fc1feba2d5856ff74dedb6ae9d8c490210825c
    ("hwmon: (lm85) Rework the device detection"), and this patch fixes
    that. Also add in a missing i2c_device_id that accidentally got dropped
    from the original patch.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     

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

    Darrick J. Wong
     

17 Oct, 2008

2 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

    Jean Delvare
     
  • 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

    Jean Delvare