sfc: Add hwmon driver for boards using SFC9000-family controllers

The SFC9000-family controllers have firmware to manage all board
peripherals including temperature, heat sink continuity and voltage
sensors.  The firmware reports sensor alarms, which we log, and
will shut down the board if necessary.

Some users may want to monitor their boards more closely, so add an
hwmon driver that exposes all sensors reported by the firmware.  Move
efx_mcdi_sensor_event() into the new file so it can share the array of
sensor labels with the hwmon driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
Ben Hutchings
2012-01-06 20:25:39 +00:00
parent 1646a6f352
commit 55c5e0f85d
7 changed files with 471 additions and 44 deletions

View File

@@ -300,6 +300,10 @@ static int siena_probe_nic(struct efx_nic *efx)
goto fail5;
}
rc = efx_mcdi_mon_probe(efx);
if (rc)
goto fail5;
return 0;
fail5:
@@ -387,6 +391,8 @@ static int siena_init_nic(struct efx_nic *efx)
static void siena_remove_nic(struct efx_nic *efx)
{
efx_mcdi_mon_remove(efx);
efx_nic_free_buffer(efx, &efx->irq_status);
siena_reset_hw(efx, RESET_TYPE_ALL);