24 Sep, 2020

1 commit

  • Many hwmon drivers don't use the id information provided by the old
    i2c probe function, and the remainder can easily be adapted to the new
    form ("probe_new") by calling i2c_match_id explicitly.

    This avoids scanning the identifier tables during probes.

    Drivers which didn't use the id are converted as-is; drivers which did
    are modified as follows:

    * if the information in i2c_client is sufficient, that's used instead
    (client->name);
    * anything else is handled by calling i2c_match_id() with the same
    level of error-handling (if any) as before.

    A few drivers aren't included in this patch because they have a
    different set of maintainers. They will be covered by other patches.

    Signed-off-by: Stephen Kitt
    Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
    Signed-off-by: Guenter Roeck

    Stephen Kitt
     

31 May, 2019

1 commit

  • Based on 3 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

    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 [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] 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

    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 [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

19 Feb, 2019

1 commit

  • Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
    to improve readability, 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/hwmon/.

    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
     

11 Oct, 2018

1 commit

  • Smatch complains:

    drivers/hwmon/lm92.c:209 set_temp_hyst() warn: inconsistent indenting

    While at it, fix various other whitespace issues reported by checkpatch
    (double empty lines, missing empty lines, whitespace at empty line).

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

23 Mar, 2018

2 commits

  • Since autodetection of this chip was removed, it makes sense to add prefix
    max6635 so that the device can be instantiated by its actual name.

    Signed-off-by: Alvaro Gamez Machado
    Reviewed-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Alvaro G. M
     
  • Maxim MAX663x family are mostly compatible with LM92, but they lack any
    identification register. Weakening the detect function would make it prone
    to false positives, and current one doesn't detect all chips. Therefore,
    the detect function for max6635 devices is removed in favor of explicit
    device instatiation.

    Signed-off-by: Alvaro Gamez Machado
    Reviewed-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Alvaro G. M
     

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

    Julia Lawall
     

06 Aug, 2014

1 commit

  • On platforms with sizeof(int) < sizeof(long), writing a temperature
    limit larger than MAXINT will result in unpredictable limit values
    written to the chip. Avoid auto-conversion from long to int to fix
    the problem.

    The hysteresis temperature range depends on the value of
    data->temp[attr->index], since val is subtracted from it.
    Use a wider clamp, [-120000, 220000] should do to cover the
    possible range. Also add missing TEMP_TO_REG() on writes into
    cached hysteresis value.

    Also uses clamp_val to simplify the code a bit.

    Signed-off-by: Axel Lin
    [Guenter Roeck: Fixed double TEMP_TO_REG on hysteresis updates]
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Axel Lin
     

22 May, 2014

4 commits


05 Apr, 2014

1 commit


30 Jan, 2014

1 commit


10 Oct, 2012

1 commit


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
    ERROR: spaces required around that '
    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
     

04 Nov, 2011

1 commit

  • Make use of the new i2c_smbus_{read,write}_word_swapped functions.
    This makes the driver code more compact and readable. It also ensures
    proper error handling.

    Signed-off-by: Jean Delvare
    Acked-by: Jonathan Cameron
    Acked-by: Guenter Roeck
    Cc: Dirk Eibach
    Cc: "Mark M. Hoffman"
    Cc: Guillaume Ligneul

    Jean Delvare
     

15 Dec, 2009

3 commits


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

    Jean Delvare
     

17 Jul, 2008

1 commit


19 Feb, 2008

1 commit


17 Feb, 2008

1 commit


08 Feb, 2008

1 commit

  • 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

    Jean Delvare
     

10 Oct, 2007

1 commit


29 Sep, 2006

1 commit


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

    Ingo Molnar
     

06 Jan, 2006

3 commits


29 Oct, 2005

1 commit


06 Sep, 2005

5 commits


12 Jul, 2005

1 commit

  • Part 2: Move the driver files themselves.

    Note that the patch "adds trailing whitespace", because it does move the
    files as-is, and some files happen to have trailing whitespace.

    From: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare