04 Mar, 2020

1 commit

  • This is only called from adt7462_update_device(). The caller expects it
    to return zero on error. I fixed a similar issue earlier in commit
    a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
    but I missed this one.

    Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Darrick J. Wong
    Link: https://lore.kernel.org/r/20200303101608.kqjwfcazu2ylhi2a@kili.mountain
    Signed-off-by: Guenter Roeck

    Dan Carpenter
     

26 Feb, 2020

1 commit

  • Provide read_word_data() callback for overvoltage and undervoltage
    output readouts conversion. These registers are presented in
    'slinear11' format, while default conversion for 'vout' class for the
    devices is 'vid'. It is resulted in wrong conversion in pmbus_reg2data()
    for in{3-4}_lcrit and in{3-4}_crit attributes.
    )
    Fixes: aaafb7c8eb1c ("hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers")
    Signed-off-by: Vadim Pasternak
    Link: https://lore.kernel.org/r/20200224225202.19576-1-vadimp@mellanox.com
    [gropeck: Adjusted to mainline PMBus API]
    Signed-off-by: Guenter Roeck

    Vadim Pasternak
     

22 Feb, 2020

1 commit

  • Loading the driver on a system with W83627DHG-P crashes as follows.

    w83627ehf: Found W83627DHG-P chip at 0x290
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    PGD 0 P4D 0
    Oops: 0000 [#1] SMP NOPTI
    CPU: 0 PID: 604 Comm: sensors Not tainted 5.6.0-rc2-00055-gca7e1fd1026c #29
    Hardware name: /D425KT, BIOS MWPNT10N.86A.0132.2013.0726.1534 07/26/2013
    RIP: 0010:w83627ehf_read_string+0x27/0x70 [w83627ehf]
    Code: [... ]
    RSP: 0018:ffffb95980657df8 EFLAGS: 00010293
    RAX: 0000000000000000 RBX: ffff96caaa7f5218 RCX: 0000000000000000
    RDX: 0000000000000015 RSI: 0000000000000001 RDI: ffff96caa736ec08
    RBP: 0000000000000000 R08: ffffb95980657e20 R09: 0000000000000001
    R10: ffff96caaa635cc0 R11: 0000000000000000 R12: ffff96caa9f7cf00
    R13: ffff96caa9ec3d00 R14: ffff96caa9ec3d28 R15: ffff96caa9ec3d40
    FS: 00007fbc7c4e2740(0000) GS:ffff96caabc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 0000000129d58000 CR4: 00000000000006f0
    Call Trace:
    ? cp_new_stat+0x12d/0x160
    hwmon_attr_show_string+0x37/0x70 [hwmon]
    dev_attr_show+0x14/0x50
    sysfs_kf_seq_show+0xb5/0x1b0
    seq_read+0xcf/0x460
    vfs_read+0x9b/0x150
    ksys_read+0x5f/0xe0
    do_syscall_64+0x48/0x190
    entry_SYSCALL_64_after_hwframe+0x44/0xa9
    ...

    Temperature labels are not always present. Adjust sysfs attribute
    visibility accordingly.

    Reported-by: Meelis Roos
    Suggested-by: Dr. David Alan Gilbert
    Reviewed-by: Dr. David Alan Gilbert
    Cc: Meelis Roos
    Cc: Dr. David Alan Gilbert
    Fixes: 266cd5835947 ("hwmon: (w83627ehf) convert to with_info interface")
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

20 Feb, 2020

1 commit

  • Damien Le Moal reports a lockdep splat with the acpi_power_meter,
    observed with Linux v5.5 and later.

    ======================================================
    WARNING: possible circular locking dependency detected
    5.6.0-rc2+ #629 Not tainted
    ------------------------------------------------------
    python/1397 is trying to acquire lock:
    ffff888619080070 (&resource->lock){+.+.}, at: show_power+0x3c/0xa0 [acpi_power_meter]

    but task is already holding lock:
    ffff88881643f188 (kn->count#119){++++}, at: kernfs_seq_start+0x6a/0x160

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (kn->count#119){++++}:
    __kernfs_remove+0x626/0x7e0
    kernfs_remove_by_name_ns+0x41/0x80
    remove_attrs+0xcb/0x3c0 [acpi_power_meter]
    acpi_power_meter_notify+0x1f7/0x310 [acpi_power_meter]
    acpi_ev_notify_dispatch+0x198/0x1f3
    acpi_os_execute_deferred+0x4d/0x70
    process_one_work+0x7c8/0x1340
    worker_thread+0x94/0xc70
    kthread+0x2ed/0x3f0
    ret_from_fork+0x24/0x30

    -> #0 (&resource->lock){+.+.}:
    __lock_acquire+0x20be/0x49b0
    lock_acquire+0x127/0x340
    __mutex_lock+0x15b/0x1350
    show_power+0x3c/0xa0 [acpi_power_meter]
    dev_attr_show+0x3f/0x80
    sysfs_kf_seq_show+0x216/0x410
    seq_read+0x407/0xf90
    vfs_read+0x152/0x2c0
    ksys_read+0xf3/0x1d0
    do_syscall_64+0x95/0x1010
    entry_SYSCALL_64_after_hwframe+0x49/0xbe

    other info that might help us debug this:

    Possible unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(kn->count#119);
    lock(&resource->lock);
    lock(kn->count#119);
    lock(&resource->lock);

    *** DEADLOCK ***
    4 locks held by python/1397:
    #0: ffff8890242d64e0 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x9b/0xb0
    #1: ffff889040be74e0 (&p->lock){+.+.}, at: seq_read+0x6b/0xf90
    #2: ffff8890448eb880 (&of->mutex){+.+.}, at: kernfs_seq_start+0x47/0x160
    #3: ffff88881643f188 (kn->count#119){++++}, at: kernfs_seq_start+0x6a/0x160

    stack backtrace:
    CPU: 10 PID: 1397 Comm: python Not tainted 5.6.0-rc2+ #629
    Hardware name: Supermicro Super Server/X11DPL-i, BIOS 3.1 05/21/2019
    Call Trace:
    dump_stack+0x97/0xe0
    check_noncircular+0x32e/0x3e0
    ? print_circular_bug.isra.0+0x1e0/0x1e0
    ? unwind_next_frame+0xb9a/0x1890
    ? entry_SYSCALL_64_after_hwframe+0x49/0xbe
    ? graph_lock+0x79/0x170
    ? __lockdep_reset_lock+0x3c0/0x3c0
    ? mark_lock+0xbc/0x1150
    __lock_acquire+0x20be/0x49b0
    ? mark_held_locks+0xe0/0xe0
    ? stack_trace_save+0x91/0xc0
    lock_acquire+0x127/0x340
    ? show_power+0x3c/0xa0 [acpi_power_meter]
    ? device_remove_bin_file+0x10/0x10
    ? device_remove_bin_file+0x10/0x10
    __mutex_lock+0x15b/0x1350
    ? show_power+0x3c/0xa0 [acpi_power_meter]
    ? show_power+0x3c/0xa0 [acpi_power_meter]
    ? mutex_lock_io_nested+0x11f0/0x11f0
    ? lock_downgrade+0x6a0/0x6a0
    ? kernfs_seq_start+0x47/0x160
    ? lock_acquire+0x127/0x340
    ? kernfs_seq_start+0x6a/0x160
    ? device_remove_bin_file+0x10/0x10
    ? show_power+0x3c/0xa0 [acpi_power_meter]
    show_power+0x3c/0xa0 [acpi_power_meter]
    dev_attr_show+0x3f/0x80
    ? memset+0x20/0x40
    sysfs_kf_seq_show+0x216/0x410
    seq_read+0x407/0xf90
    ? security_file_permission+0x16f/0x2c0
    vfs_read+0x152/0x2c0

    Problem is that reading an attribute takes the kernfs lock in the kernfs
    code, then resource->lock in the driver. During an ACPI notification, the
    opposite happens: The resource lock is taken first, followed by the kernfs
    lock when sysfs attributes are removed and re-created. Presumably this is
    now seen due to some locking related changes in kernfs after v5.4, but it
    was likely always a problem.

    Fix the problem by not blindly acquiring the lock in the notification
    function. It is only needed to protect the various update functions.
    However, those update functions are called anyway when sysfs attributes
    are read. This means that we can just stop calling those functions from
    the notifier, and the resource lock in the notifier function is no longer
    needed.

    That leaves two situations:

    First, METER_NOTIFY_CONFIG removes and re-allocates capability strings.
    While it did so under the resource lock, _displaying_ those strings was not
    protected, creating a race condition. To solve this problem, selectively
    protect both removal/creation and reporting of capability attributes with
    the resource lock.

    Second, removing and re-creating the attribute files is no longer protected
    by the resource lock. That doesn't matter since access to each individual
    attribute is protected by the kernfs lock. Userspace may get messed up if
    attributes disappear and reappear under its nose, but that is not different
    than today, and there is nothing we can do about it without major driver
    restructuring.

    Last but not least, when removing the driver, remove attribute functions
    first, then release capability strings. This avoids yet another race
    condition.

    Reported-by: Damien Le Moal
    Cc: Damien Le Moal
    Cc: stable@vger.kernel.org # v5.5+
    Tested-by: Damien Le Moal
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

13 Feb, 2020

1 commit

  • Make sure that the driver compatible strings matches the binding by
    removing the space between the manufacturer and model.

    Fixes: aaafb7c8eb1c ("hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers")
    Cc: Vadim Pasternak
    Signed-off-by: Johan Hovold
    Link: https://lore.kernel.org/r/20200212092426.24012-1-johan@kernel.org
    Signed-off-by: Guenter Roeck

    Johan Hovold
     

10 Feb, 2020

1 commit

  • Change 21537dc driver PMBus polling of MFR_COMMON from bits 5/4 to
    bits 6/5. This fixs a LTC297X family bug where polling always returns
    not busy even when the part is busy. This fixes a LTC388X and
    LTM467X bug where polling used PEND and NOT_IN_TRANS, and BUSY was
    not polled, which can lead to NACKing of commands. LTC388X and
    LTM467X modules now poll BUSY and PEND, increasing reliability by
    eliminating NACKing of commands.

    Signed-off-by: Mike Jones
    Link: https://lore.kernel.org/r/1580234400-2829-2-git-send-email-michael-a1.jones@analog.com
    Fixes: e04d1ce9bbb49 ("hwmon: (ltc2978) Add polling for chips requiring it")
    Signed-off-by: Guenter Roeck

    Mike Jones
     

09 Feb, 2020

1 commit

  • Pull ARM SoC-related driver updates from Olof Johansson:
    "Various driver updates for platforms:

    - Nvidia: Fuse support for Tegra194, continued memory controller
    pieces for Tegra30

    - NXP/FSL: Refactorings of QuickEngine drivers to support
    ARM/ARM64/PPC

    - NXP/FSL: i.MX8MP SoC driver pieces

    - TI Keystone: ring accelerator driver

    - Qualcomm: SCM driver cleanup/refactoring + support for new SoCs.

    - Xilinx ZynqMP: feature checking interface for firmware. Mailbox
    communication for power management

    - Overall support patch set for cpuidle on more complex hierarchies
    (PSCI-based)

    and misc cleanups, refactorings of Marvell, TI, other platforms"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (166 commits)
    drivers: soc: xilinx: Use mailbox IPI callback
    dt-bindings: power: reset: xilinx: Add bindings for ipi mailbox
    drivers: soc: ti: knav_qmss_queue: Pass lockdep expression to RCU lists
    MAINTAINERS: Add brcmstb PCIe controller entry
    soc/tegra: fuse: Unmap registers once they are not needed anymore
    soc/tegra: fuse: Correct straps' address for older Tegra124 device trees
    soc/tegra: fuse: Warn if straps are not ready
    soc/tegra: fuse: Cache values of straps and Chip ID registers
    memory: tegra30-emc: Correct error message for timed out auto calibration
    memory: tegra30-emc: Firm up hardware programming sequence
    memory: tegra30-emc: Firm up suspend/resume sequence
    soc/tegra: regulators: Do nothing if voltage is unchanged
    memory: tegra: Correct reset value of xusb_hostr
    soc/tegra: fuse: Add APB DMA dependency for Tegra20
    bus: tegra-aconnect: Remove PM_CLK dependency
    dt-bindings: mediatek: add MT6765 power dt-bindings
    soc: mediatek: cmdq: delete not used define
    memory: tegra: Add support for the Tegra194 memory controller
    memory: tegra: Only include support for enabled SoCs
    memory: tegra: Support DVFS on Tegra186 and later
    ...

    Linus Torvalds
     

04 Feb, 2020

1 commit

  • The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in
    seq_file.h.

    Conversion rule is:

    llseek => proc_lseek
    unlocked_ioctl => proc_ioctl

    xxx => proc_xxx

    delete ".owner = THIS_MODULE" line

    [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c]
    [sfr@canb.auug.org.au: fix kernel/sched/psi.c]
    Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

28 Jan, 2020

1 commit


24 Jan, 2020

31 commits

  • In HWiNFO, we see support for Tccd1, Tccd3, Tccd5, and Tccd7 temperature
    sensors on Zen2 based Threadripper CPUs. Checking register maps on
    Threadripper 3970X confirms SMN register addresses and values for those
    sensors.

    Register values observed in an idle system:

    0x059950: 00000000 00000abc 00000000 00000ad8
    0x059960: 00000000 00000ade 00000000 00000ae4

    Under load:

    0x059950: 00000000 00000c02 00000000 00000c14
    0x059960: 00000000 00000c30 00000000 00000c22

    More analysis shows that EPYC CPUs support up to 8 CCD temperature
    sensors. EPYC 7601 supports three CCD temperature sensors. Unlike
    Zen2 CPUs, the register space in Zen1 CPUs supports a maximum of four
    sensors, so only search for a maximum of four sensors on Zen1 CPUs.

    On top of that, in thm_10_0_sh_mask.h in the Linux kernel, we find
    definitions for THM_DIE{1-3}_TEMP__VALID_MASK, set to 0x00000800, as well
    as matching SMN addresses. This lets us conclude that bit 11 of the
    respective registers is a valid bit. With this assumption, the temperature
    offset is now 49 degrees C. This conveniently matches the documented
    temperature offset for Tdie, again suggesting that above registers indeed
    report temperatures sensor values. Assume that bit 11 is indeed a valid
    bit, and add support for the additional sensors.

    With this patch applied, output from 3970X (idle) looks as follows:

    k10temp-pci-00c3
    Adapter: PCI adapter
    Tdie: +55.9°C
    Tctl: +55.9°C
    Tccd1: +39.8°C
    Tccd3: +43.8°C
    Tccd5: +43.8°C
    Tccd7: +44.8°C

    Tested-by: Michael Larabel
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Show thermal and SVI registers for Family 17h CPUs.

    Tested-by: Sebastian Reichel
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The maximum Tdie or Tctl is not published for Ryzen CPUs. What is
    known, however, is that the traditional value of 70 degrees C is no
    longer correct. On top of that, the limit applies to Tctl, not to Tdie.
    Displaying it in either context is meaningless, confusing, and wrong.
    Stop doing it.

    Tested-by: Brad Campbell
    Tested-by: Holger Kiehl
    Tested-by: Michael Larabel
    Tested-by: Jonathan McDowell
    Tested-by: Ken Moffat
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Ryzen CPUs report core and SoC voltages and currents. Add support
    for it to the k10temp driver.

    For the time being, only report voltages and currents for Ryzen
    CPUs. Threadripper and EPYC appear to use a different mechanism.

    Tested-by: Brad Campbell
    Tested-by: Bernhard Gebetsberger
    Tested-by: Holger Kiehl
    Tested-by: Michael Larabel
    Tested-by: Jonathan McDowell
    Tested-by: Ken Moffat
    Tested-by: Darren Salt
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Zen2 reports reporting temperatures per CPU die (called Core Complex Dies,
    or CCD, by AMD). Add support for it to the k10temp driver.

    Tested-by: Brad Campbell
    Tested-by: Bernhard Gebetsberger
    Tested-by: Holger Kiehl
    Tested-by: Michael Larabel
    Tested-by: Jonathan McDowell
    Tested-by: Ken Moffat
    Tested-by: Darren Salt
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Convert driver to use devm_hwmon_device_register_with_info to simplify
    the code and to reduce its size.

    Old size (x86_64):
    text data bss dec hex filename
    8247 4488 64 12799 31ff drivers/hwmon/k10temp.o
    New size:
    text data bss dec hex filename
    6778 2792 64 9634 25a2 drivers/hwmon/k10temp.o

    Tested-by: Brad Campbell
    Tested-by: Bernhard Gebetsberger
    Tested-by: Holger Kiehl
    Tested-by: Michael Larabel
    Tested-by: Jonathan McDowell
    Tested-by: Ken Moffat
    Tested-by: Darren Salt
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Using bitops makes bit masks and shifts easier to read.

    Tested-by: Brad Campbell
    Tested-by: Bernhard Gebetsberger
    Tested-by: Holger Kiehl
    Tested-by: Michael Larabel
    Tested-by: Jonathan McDowell
    Tested-by: Ken Moffat
    Tested-by: Darren Salt
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The pwm-fan driver stops the fan in suspend but leaves the fan on in
    shutdown. It seems strange to leave the fan on in shutdown because there
    is no use case in my mind and the gpio-fan driver on the other hand stops
    in shutdown.

    This change turns off the fan in shutdown. If anyone complains then we'll
    add an optional property to switch the behavior.

    Cc: Rob Herring
    Cc: Mark Rutland
    Cc: Kamil Debski
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Guenter Roeck
    Cc: Thierry Reding
    Cc: Uwe Kleine-König
    Signed-off-by: Akinobu Mita
    Link: https://lore.kernel.org/r/1579534344-11694-1-git-send-email-akinobu.mita@gmail.com
    Signed-off-by: Guenter Roeck

    Akinobu Mita
     
  • ADM1177 is a Hot Swap Controller and Digital Power Monitor with
    Soft Start Pin.

    Datasheet:
    Link: https://www.analog.com/media/en/technical-documentation/data-sheets/ADM1177.pdf

    Signed-off-by: Beniamin Bia
    Link: https://lore.kernel.org/r/20200114112159.25998-1-beniamin.bia@analog.com
    Signed-off-by: Guenter Roeck

    Beniamin Bia
     
  • Add support for devices XDPE12254, XDPE12284.

    All these device support two pages.
    The below lists of VOUT_MODE command readout with their related VID
    protocols, Digital to Analog Converter steps, supported by these
    devices:
    VR12.0 mode, 5-mV DAC - 0x01;
    VR12.5 mode, 10-mV DAC - 0x02;
    IMVP9 mode, 5-mV DAC - 0x03;
    AMD mode 6.25mV - 0x10.

    Signed-off-by: Vadim Pasternak
    Link: https://lore.kernel.org/r/20200113150841.17670-5-vadimp@mellanox.com
    [groeck: Added missing break statement]
    Signed-off-by: Guenter Roeck

    Vadim Pasternak
     
  • Extends driver with support of the additional devices:
    Texas Instruments Dual channel DCAP+ multiphase controllers: TPS53688.

    Extend Kconfig with added device.

    Signed-off-by: Vadim Pasternak
    Link: https://lore.kernel.org/r/20200113150841.17670-4-vadimp@mellanox.com
    Signed-off-by: Guenter Roeck

    Vadim Pasternak
     
  • Extend "vrm_version" with the type for Intel IMVP9 and AMD 6.25mV VID
    modes.
    Add calculation for those types.

    Signed-off-by: Vadim Pasternak
    Link: https://lore.kernel.org/r/20200113150841.17670-3-vadimp@mellanox.com
    Signed-off-by: Guenter Roeck

    Vadim Pasternak
     
  • Add support for VID protocol detection per page bases, instead of
    detecting it based on "PMBU_VOUT" readout from page 0 for all the pages
    supported by particular device.
    The reason that some devices allows to configure different VID modes
    per page within the same device.
    Patch modifies the field "vrm_version" within the structure
    "pmbus_driver_info" to be per page array.

    Signed-off-by: Vadim Pasternak
    Link: https://lore.kernel.org/r/20200113150841.17670-2-vadimp@mellanox.com
    Signed-off-by: Guenter Roeck

    Vadim Pasternak
     
  • If the user write parameters resulted in no bytes being written to the
    temporary buffer, then ON_OFF_CONFIG will be written with uninitialized
    data. Prevent this by bailing out in this case.

    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/1578411640-16929-1-git-send-email-eajames@linux.ibm.com
    Signed-off-by: Guenter Roeck

    Eddie James
     
  • Fixes gcc '-Wunused-but-set-variable' warning:

    drivers/hwmon/w83627ehf.c: In function 'w83627ehf_check_fan_inputs':
    drivers/hwmon/w83627ehf.c:1296:24: warning:
    variable 'fan4min' set but not used [-Wunused-but-set-variable]

    commit 62000264cfa8 ("hwmon: (w83627ehf) remove nct6775 and nct6776 support")
    left behind this unused variable.

    Reported-by: Hulk Robot
    Signed-off-by: YueHaibing
    Link: https://lore.kernel.org/r/20200108034514.50130-1-yuehaibing@huawei.com
    Signed-off-by: Guenter Roeck

    YueHaibing
     
  • Reading the temperature of ATA drives has been supported for years
    by userspace tools such as smarttools or hddtemp. The downside of
    such tools is that they need to run with super-user privilege, that
    the temperatures are not reported by standard tools such as 'sensors'
    or 'libsensors', and that drive temperatures are not available for use
    in the kernel's thermal subsystem.

    This driver solves this problem by adding support for reading the
    temperature of ATA drives from the kernel using the hwmon API and
    by adding a temperature zone for each drive.

    With this driver, the hard disk temperature can be read using the
    unprivileged 'sensors' application:

    $ sensors drivetemp-scsi-1-0
    drivetemp-scsi-1-0
    Adapter: SCSI adapter
    temp1: +23.0°C

    or directly from sysfs:

    $ grep . /sys/class/hwmon/hwmon9/{name,temp1_input}
    /sys/class/hwmon/hwmon9/name:drivetemp
    /sys/class/hwmon/hwmon9/temp1_input:23000

    If the drive supports SCT transport and reports temperature limits,
    those are reported as well.

    drivetemp-scsi-0-0
    Adapter: SCSI adapter
    temp1: +27.0°C (low = +0.0°C, high = +60.0°C)
    (crit low = -41.0°C, crit = +85.0°C)
    (lowest = +23.0°C, highest = +34.0°C)

    The driver attempts to use SCT Command Transport to read the drive
    temperature. If the SCT Command Transport feature set is not available,
    or if it does not report the drive temperature, drive temperatures may
    be readable through SMART attributes. Since SMART attributes are not well
    defined, this method is only used as fallback mechanism.

    Cc: Chris Healy
    Cc: Linus Walleij
    Cc: Martin K. Petersen
    Cc: Bart Van Assche
    Reviewed-by: Linus Walleij
    Tested-by: Linus Walleij
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The driver should remain in control of the LED on the PSU, even while
    off, not the PSU firmware as previously indicated.

    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/1576788607-13567-4-git-send-email-eajames@linux.ibm.com
    Signed-off-by: Guenter Roeck

    Eddie James
     
  • Version 2 of the PSU supports reading an auxiliary voltage. Use the
    pmbus VMON property and associated virtual register to read it.

    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/1576788607-13567-3-git-send-email-eajames@linux.ibm.com
    Signed-off-by: Guenter Roeck

    Eddie James
     
  • Add support for a number of manufacturer-specific registers in the
    debugfs entries, as well as support to read and write the
    PMBUS_ON_OFF_CONFIG register through debugfs.

    Signed-off-by: Eddie James
    Link: https://lore.kernel.org/r/1576788607-13567-2-git-send-email-eajames@linux.ibm.com
    Signed-off-by: Guenter Roeck

    Eddie James
     
  • Add support for Maxim MAX20730, MAX20734, MAX20743 Integrated,
    Step-Down Switching Regulators with PMBus support.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The 2nd intrusion channel was only used on the nct6776

    Signed-off-by: Dr. David Alan Gilbert
    Link: https://lore.kernel.org/r/20191225023225.2785-4-linux@treblig.org
    Signed-off-by: Guenter Roeck

    Dr. David Alan Gilbert
     
  • Now the nct677* are gone, we can clean up some flags that are
    always the same now and simplify some code.

    Signed-off-by: Dr. David Alan Gilbert
    Link: https://lore.kernel.org/r/20191225023225.2785-3-linux@treblig.org
    Signed-off-by: Guenter Roeck

    Dr. David Alan Gilbert
     
  • The nct6775 and nct6776 are supported by the separate nct6775.c driver,
    so remove the code from the w83627ehf driver.

    Suggested-by: Guenter Roeck
    Signed-off-by: Dr. David Alan Gilbert
    Link: https://lore.kernel.org/r/20191225023225.2785-2-linux@treblig.org
    Signed-off-by: Guenter Roeck

    Dr. David Alan Gilbert
     
  • MAX20796 is a dual-phase scalable integrated voltage regulator with
    PMBus interface.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Fix sparse warning:

    drivers/hwmon/w83627ehf.c:1202:1: warning:
    symbol 'sensor_dev_attr_pwm1_target' was not declared. Should it be static?

    and many more similar messages.

    Reported-by: Hulk Robot
    Signed-off-by: Chen Zhou
    Link: https://lore.kernel.org/r/20191213015605.172472-1-chenzhou10@huawei.com
    [groeck: Dropped all but one log message from description]
    Signed-off-by: Guenter Roeck

    Chen Zhou
     
  • If a chip is write protected, we can not change any limits, and we can
    not clear status flags. This may be the reason why clearing status flags
    is reported to not work for some chips. Detect the condition in the pmbus
    core. If the chip is write protected, set limit attributes as read-only,
    and set the flag indicating that the status flag should be ignored.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • MAX31730 is a 3-Channel Remote Temperature Sensor.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The hwmon ABI supports enable attributes since commit fb41a710f84e
    ("hwmon: Document the sensor enable attribute"), but did not
    add support for those attributes to the hwmon core. Do that now.

    Since the enable attributes are logically the most important attributes,
    they are added as first attribute to the attribute list. Move
    hwmon_in_enable from last to first place for consistency.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Convert the old hwmon_device_register code to
    devm_hwmon_device_register_with_info.

    Signed-off-by: Dr. David Alan Gilbert
    Link: https://lore.kernel.org/r/20191124202030.45360-3-linux@treblig.org
    Signed-off-by: Guenter Roeck

    Dr. David Alan Gilbert
     
  • Add support for the UCD90320 chip and its expanded set of GPIO pins.

    Signed-off-by: Jim Wright
    Link: https://lore.kernel.org/r/20191205232411.21492-3-wrightj@linux.vnet.ibm.com
    Signed-off-by: Guenter Roeck

    Jim Wright
     
  • Add templates for intrusion%d_alarm and intrusion%d_beep.
    Note, these start at 0.

    Signed-off-by: Dr. David Alan Gilbert
    Link: https://lore.kernel.org/r/20191124202030.45360-2-linux@treblig.org
    Signed-off-by: Guenter Roeck

    Dr. David Alan Gilbert