summaryrefslogtreecommitdiff
path: root/drivers/hwmon/sch56xx-common.c
AgeCommit message (Collapse)Author
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner
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 59 temple place suite 330 boston ma 02111 1307 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 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-02hwmon: (sch56xx) Remove unneeded linux/miscdevice.h includeCorentin LABBE
drivers/hwmon/sch56xx-common.c does not contain any miscdevice so the inclusion of linux/miscdevice.h is uncessary. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-29hwmon: (sch56xx) Drop watchdog driver data reference count callbacksGuenter Roeck
Reference counting is now implemented in the watchdog core and no longer required in watchdog drivers. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2013-04-07hwmon: Fix checkpatch warning 'quoted string split across lines'Guenter Roeck
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23hwmon: (sch56xx-common) Fix build warningsGuenter Roeck
Fix: warning: 'address' may be used uninitialized in this function warning: 'name' may be used uninitialized in this function While those are false warnings, the patch reduces module size on x86_64 by approximately 110 bytes, so it is still worth the effort. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Hans de Goede <hdegoede@redhat.com>
2012-05-30watchdog: sch56xx-common: set correct bits in register()Dan Carpenter
WDOG_NO_WAY_OUT (3) and WDOG_ACTIVE (0) are the bit numbers, not a mask. So "data->wddev.status |= WDOG_ACTIVE;" was intended to set bit zero but it is a no-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-05-30watchdog: sch56xx-common: Add proper ref-counting of watchdog dataHans de Goede
This fixes referencing free-ed memory in the corner case where /dev/watchdog is open when the platform driver gets unbound from the platform device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-05-30watchdog: sch56xx: Remove unnecessary checks for register changesHans de Goede
Since the watchdog core keeps track of the watchdog's active state, start/stop will never get called when no changes are necessary. So we can remove the check for the output_enable register changing before writing it (which is an expensive operation). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-05-30watchdog: sch56xx: Use watchdog coreHans de Goede
Convert sch56xx drivers to the generic watchdog core. Note this patch depends on the "watchdog: Add multiple device support" patch from Alan Cox. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-03-20hwmon: (sch56xx) Add support for the integrated watchdog (v2)Hans de Goede
Add support for the watchdog integrated into the SMSC SCH5627 and SCH5636 superio-s. Since the watchdog is part of the hwmon logical device and thus shares ioports with it, the watchdog driver is integrated into the existing hwmon drivers for these. Note that this version of the watchdog support for sch56xx superio-s implements the watchdog chardev interface itself, rather then relying on the recently added watchdog core / watchdog_dev. This is done because currently some needed functionality is missing from watchdog_dev, as soon as this functionality is added (which is being discussed on the linux-watchdog mailinglist), I'll convert this driver over to using watchdog_dev. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [guenter.roeck@ericsson.com: Added missing linux/slab.h include] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-07-25hwmon: New driver sch5636Hans de Goede
This patch adds a new driver for SMSC SCH5636 Super I/O chips. The chips include an embedded microcontroller for hardware monitoring solutions, allowing motherboard manufacturers to create their own custom hwmon solution based upon the SCH5636. Currently the sch5636 driver only supports the Fujitsu Theseus SCH5636 based hwmon solution. The sch5636 driver runs a sanity check on loading to ensure it is dealing with a Fujitsu Theseus and not with another custom SCH5636 based hwmon solution. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-25hwmon: (sch5627) Factor out some code shared with sch5636 driverHans de Goede
This patch adds a new sch56xx-common.ko which contains code which will also be used in the new sch5636 driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>