02 May, 2020

1 commit

  • [ Upstream commit c843b382e61b5f28a3d917712c69a344f632387c ]

    The jc42 driver passes I2C client's name as hwmon device name. In case
    of device tree probed devices this ends up being part of the compatible
    string, "jc-42.4-temp". This name contains hyphens and the hwmon core
    doesn't like this:

    jc42 2-0018: hwmon: 'jc-42.4-temp' is not a valid name attribute, please fix

    This changes the name to "jc42" which doesn't have any illegal
    characters.

    Signed-off-by: Sascha Hauer
    Link: https://lore.kernel.org/r/20200417092853.31206-1-s.hauer@pengutronix.de
    Signed-off-by: Guenter Roeck
    Signed-off-by: Sasha Levin

    Sascha Hauer
     

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

1 commit

  • The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood
    of errors, and makes the code easier to read.

    The conversion was done automatically with coccinelle. The semantic patch
    used to make this change is as follows.

    @r@
    initializer list elements;
    identifier i;
    @@

    -u32 i[] = {
    - elements,
    - 0
    -};

    @s@
    identifier r.i,j,ty;
    @@

    -struct hwmon_channel_info j = {
    - .type = ty,
    - .config = i,
    -};

    @script:ocaml t@
    ty << s.ty;
    elements << r.elements;
    shorter;
    elems;
    @@

    shorter :=
    make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty)));
    elems :=
    make_ident
    (String.concat ","
    (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x)
    (Str.split (Str.regexp " , ") elements)))

    @@
    identifier s.j,t.shorter;
    identifier t.elems;
    @@

    - &j
    + HWMON_CHANNEL_INFO(shorter,elems)

    This patch does not introduce functional changes. Many thanks to
    Julia Lawall for providing the semantic patch.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

19 Feb, 2019

1 commit

  • Replace S_ 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
     

01 Dec, 2017

1 commit

  • With a nxp,se97 chip on an atmel sama5d31 board, the I2C adapter driver
    is not always capable of avoiding the 25-35 ms timeout as specified by
    the SMBUS protocol. This may cause silent corruption of the last bit of
    any transfer, e.g. a one is read instead of a zero if the sensor chip
    times out. This also affects the eeprom half of the nxp-se97 chip, where
    this silent corruption was originally noticed. Other I2C adapters probably
    suffer similar issues, e.g. bit-banging comes to mind as risky...

    The SMBUS register in the nxp chip is not a standard Jedec register, but
    it is not special to the nxp chips either, at least the atmel chips
    have the same mechanism. Therefore, do not special case this on the
    manufacturer, it is opt-in via the device property anyway.

    Cc: stable@vger.kernel.org # 4.9+
    Signed-off-by: Peter Rosin
    Acked-by: Rob Herring
    Signed-off-by: Guenter Roeck

    Peter Rosin
     

13 Aug, 2017

2 commits


09 Sep, 2016

1 commit


13 Jul, 2016

1 commit


05 Jul, 2016

1 commit

  • In 2011, commit 774466add7c ("hwmon: (jc42) Change detection class")
    changed the detection class of these chips to I2C_CLASS_SPD based
    on this premise: "makes more sense because these chips always live on
    memory modules"

    Today these chips have applications beyond memory modules. Examples are
    JC42.4 compatible chips such as MCP9804 and MCP9808, but also MCP9805,
    which is marked as JC42.4 compliant and suggested for use not only for
    DIMMS, but also as generic temperature sensor.

    Add I2C_CLASS_HWMON as an additional detection class to allow detection
    by hwmon class i2c adapters.

    Signed-off-by: Alison Schofield
    Cc: Daniel Baluta
    [groeck: Updated description]
    Signed-off-by: Guenter Roeck

    Alison Schofield
     

28 Jun, 2016

1 commit


10 Mar, 2015

1 commit

  • TS3000GB0 has a new device ID (0x2913). Since IDT's datasheets suggest
    that the upper 8 bit of the device ID reflect the chip ID and the lower
    8 bit reflect the version number, modify the code to accept all chips
    with ID 0x29xx.

    Also add support for TS3001 and TSE2004.

    Some of the datasheets for older chips are no longer available from
    the IDT web site, so replace explicit links in the documentation with
    a generic note.

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

    Guenter Roeck
     

26 Jan, 2015

4 commits


22 May, 2014

3 commits


19 Oct, 2013

2 commits


07 Feb, 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
     

28 Jul, 2012

2 commits

  • Restoring the configuration register on device removal has the side
    effect of also resetting the hysteresis value. This is inconsistent as
    the other limits are not reset, only hysteresis. So, following the
    principle of least surprise, preserve the hysteresis value when
    restoring the configuration register.

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

    Jean Delvare
     
  • Define JC42_CFG_HYST_MASK as the mask _before_ shifting instead of
    after shifting. This simplifies the current code slightly, and will
    simplify the code to come even more.

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

    Jean Delvare
     

25 Jun, 2012

1 commit


19 Mar, 2012

4 commits


08 Mar, 2012

2 commits


09 Jan, 2012

1 commit

  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    max1111.c: fix checkpatch warning
    hwmon: (lm75) fix checkpatch warnings
    hwmon: (lm80) fix checkpatch messages
    hwmon: replaced strict_str* with kstr*
    hwmon: (lm75) fix checkpatch warning
    hwmon: (lm75) added error handling
    hwmon: (ltc4261) set data->valid to 0 if error
    hwmon: (f75375s) Add support for F75387SG/RG
    hwmon: (f75375s) Disable setting DC fan control mode for F75373
    hwmon: (f75375s) Initialize pwmX_mode and pwmX_enable if there is no platform data
    hwmon: (f75375s) Fix value range for PWM modes
    hwmon: (f75375s) Use standard sysfs attribute names
    hwmon: (f75375s) Fix checkpatch errors and warnings
    hwmon: (pmbus/zl6100) Only instantiate external temperature sensor if enabled
    hwmon: (pmbus/zl6100) Add support for Ericsson BMR45[0,1] and BMR46[2,3,4]
    hwmon: (pmbus/zl6100) Add support for ZL2005
    hwmon: (pmbus/adm1275) Validate device ID

    Linus Torvalds
     

06 Jan, 2012

1 commit


04 Jan, 2012

1 commit


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
     

26 May, 2011

1 commit


17 Feb, 2011

2 commits

  • On systems where the temperature sensor is actually used, the BIOS is
    likely to have locked the alarm registers. In that case, all writes
    through the corresponding sysfs files would be silently ignored.

    To prevent this, detect the locks and make the affected sysfs files
    read-only.

    Signed-off-by: Clemens Ladisch
    Cc: stable@kernel.org
    Signed-off-by: Guenter Roeck

    Clemens Ladisch
     
  • In set_temp_crit_hyst(), make the variable 'val' have the correct
    type for strict_strtoul().

    Signed-off-by: Clemens Ladisch
    Cc: stable@kernel.org
    Signed-off-by: Guenter Roeck

    Clemens Ladisch
     

10 Aug, 2010

1 commit