Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292235
b: refs/heads/master
c: 312869e
h: refs/heads/master
i:
  292233: c0a32be
  292231: a4a6af9
v: v3
  • Loading branch information
Hans de Goede authored and Guenter Roeck committed Mar 20, 2012
1 parent 7a89f31 commit a19e489
Show file tree
Hide file tree
Showing 8 changed files with 559 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 840e191dba36f51ae52db8a93849191af9e89098
refs/heads/master: 312869ec935ab3bb67b7ba641a7d11230555aff5
5 changes: 5 additions & 0 deletions trunk/Documentation/hwmon/sch5627
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Description
SMSC SCH5627 Super I/O chips include complete hardware monitoring
capabilities. They can monitor up to 5 voltages, 4 fans and 8 temperatures.

The SMSC SCH5627 hardware monitoring part also contains an integrated
watchdog. In order for this watchdog to function some motherboard specific
initialization most be done by the BIOS, so if the watchdog is not enabled
by the BIOS the sch5627 driver will not register a watchdog device.

The hardware monitoring part of the SMSC SCH5627 is accessed by talking
through an embedded microcontroller. An application note describing the
protocol for communicating with the microcontroller is available upon
Expand Down
3 changes: 3 additions & 0 deletions trunk/Documentation/hwmon/sch5636
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ temperatures. Note that the driver detects how many fan headers /
temperature sensors are actually implemented on the motherboard, so you will
likely see fewer temperature and fan inputs.

The Fujitsu Theseus hwmon solution also contains an integrated watchdog.
This watchdog is fully supported by the sch5636 driver.

An application note describing the Theseus' registers, as well as an
application note describing the protocol for communicating with the
microcontroller is available upon request. Please mail me if you want a copy.
6 changes: 4 additions & 2 deletions trunk/drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,8 @@ config SENSORS_SCH5627
select SENSORS_SCH56XX_COMMON
help
If you say yes here you get support for the hardware monitoring
features of the SMSC SCH5627 Super-I/O chip.
features of the SMSC SCH5627 Super-I/O chip including support for
the integrated watchdog.

This driver can also be built as a module. If so, the module
will be called sch5627.
Expand All @@ -1044,7 +1045,8 @@ config SENSORS_SCH5636

Currently this driver only supports the Fujitsu Theseus SCH5636 based
hwmon solution. Say yes here if you want support for the Fujitsu
Theseus' hardware monitoring features.
Theseus' hardware monitoring features including support for the
integrated watchdog.

This driver can also be built as a module. If so, the module
will be called sch5636.
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/hwmon/sch5627.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.com> *
* Copyright (C) 2010-2012 Hans de Goede <hdegoede@redhat.com> *
* *
* 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 *
Expand Down Expand Up @@ -79,6 +79,7 @@ static const char * const SCH5627_IN_LABELS[SCH5627_NO_IN] = {
struct sch5627_data {
unsigned short addr;
struct device *hwmon_dev;
struct sch56xx_watchdog_data *watchdog;
u8 control;
u8 temp_max[SCH5627_NO_TEMPS];
u8 temp_crit[SCH5627_NO_TEMPS];
Expand Down Expand Up @@ -453,6 +454,9 @@ static int sch5627_remove(struct platform_device *pdev)
{
struct sch5627_data *data = platform_get_drvdata(pdev);

if (data->watchdog)
sch56xx_watchdog_unregister(data->watchdog);

if (data->hwmon_dev)
hwmon_device_unregister(data->hwmon_dev);

Expand Down Expand Up @@ -574,6 +578,11 @@ static int __devinit sch5627_probe(struct platform_device *pdev)
goto error;
}

/* Note failing to register the watchdog is not a fatal error */
data->watchdog = sch56xx_watchdog_register(data->addr,
(build_code << 24) | (build_id << 8) | hwmon_rev,
&data->update_lock, 1);

return 0;

error:
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/hwmon/sch5636.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2011 Hans de Goede <hdegoede@redhat.com> *
* Copyright (C) 2011-2012 Hans de Goede <hdegoede@redhat.com> *
* *
* 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 *
Expand Down Expand Up @@ -67,6 +67,7 @@ static const u16 SCH5636_REG_FAN_VAL[SCH5636_NO_FANS] = {
struct sch5636_data {
unsigned short addr;
struct device *hwmon_dev;
struct sch56xx_watchdog_data *watchdog;

struct mutex update_lock;
char valid; /* !=0 if following fields are valid */
Expand Down Expand Up @@ -384,6 +385,9 @@ static int sch5636_remove(struct platform_device *pdev)
struct sch5636_data *data = platform_get_drvdata(pdev);
int i;

if (data->watchdog)
sch56xx_watchdog_unregister(data->watchdog);

if (data->hwmon_dev)
hwmon_device_unregister(data->hwmon_dev);

Expand Down Expand Up @@ -505,6 +509,11 @@ static int __devinit sch5636_probe(struct platform_device *pdev)
goto error;
}

/* Note failing to register the watchdog is not a fatal error */
data->watchdog = sch56xx_watchdog_register(data->addr,
(revision[0] << 8) | revision[1],
&data->update_lock, 0);

return 0;

error:
Expand Down
Loading

0 comments on commit a19e489

Please sign in to comment.