16 Apr, 2019

1 commit

  • If CONFIG_OF is not enabled, the following build warning is observed.

    drivers/hwmon/adt7475.c:171:34: warning:
    ‘adt7475_of_match’ defined but not used

    Mark adt7475_of_match as __maybe_unused to fix the problem.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

17 Dec, 2018

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/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
     

27 Aug, 2018

2 commits


11 Aug, 2018

4 commits


13 Aug, 2017

1 commit

  • attribute_groups are not supposed to change at runtime. All functions
    working with attribute_groups provided by work with const
    attribute_group. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    10055 7032 0 17087 42bf drivers/hwmon/adt7475.o

    File size After adding 'const':
    text data bss dec hex filename
    10567 6520 0 17087 42bf drivers/hwmon/adt7475.o

    Signed-off-by: Arvind Yadav
    Signed-off-by: Guenter Roeck

    Arvind Yadav
     

12 Jun, 2017

4 commits

  • When enabled temperature smoothing allows ramping the fan speed over a
    configurable period of time instead of jumping to the new speed
    instantaneously.

    Signed-off-by: Chris Packham
    Signed-off-by: Guenter Roeck

    Chris Packham
     
  • Systems using 4-wire fans usually require high frequency (22.5kHz)
    output on the pwm. Add 22500 as a valid option in the pwmfreq_table. In
    high frequency mode the low-order bit are ignored so they can safely be
    set to 0.

    Signed-off-by: Chris Packham
    Signed-off-by: Guenter Roeck

    Chris Packham
     
  • By default adt7475 will stop the fans (pwm duty cycle 0%) when the
    temperature drops past Tmin - hysteresis. Some systems want to keep the
    fans moving even when the temperature drops so add new sysfs attributes
    that configure the enhanced acoustics min 1-3 which allows the fans to
    run at the minimum configure pwm duty cycle.

    Signed-off-by: Chris Packham
    Signed-off-by: Guenter Roeck

    Chris Packham
     
  • The adt7475 has had find_nearest() since it's creation in 2009. Since
    then find_closest() has been introduced and several drivers have been
    updated to use it. Update the adt7475 to use find_closest() and remove
    the now unused find_nearest().

    Signed-off-by: Chris Packham
    Signed-off-by: Guenter Roeck

    Chris Packham
     

22 Apr, 2017

1 commit

  • The ADT7475 and ADT7476 have the STRT bit cleared by default[1]. Before any
    monitoring activities the STRT bit needs to be set. Logically this needs
    to happen before any of the sensors are read so the probe() function
    seems the best place for it.

    [1] - https://www.onsemi.com/pub/Collateral/ADT7475-D.PDF

    Signed-off-by: Chris Packham
    Signed-off-by: Guenter Roeck

    Chris Packham
     

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

    Julia Lawall
     

30 Jan, 2014

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
     

10 Oct, 2012

1 commit


22 Jul, 2012

1 commit


19 Mar, 2012

3 commits


06 Jan, 2012

1 commit


29 Oct, 2010

1 commit

  • We can mark normal_i2c const. Almost all drivers do that already, so
    fix the 3 remaining ones before they are used as (bad) examples for
    new drivers.

    Signed-off-by: Jean Delvare
    Cc: George Joseph
    Reviewed-by: Guenter Roeck

    Jean Delvare
     

15 Dec, 2009

3 commits


10 Dec, 2009

12 commits