From: Hans de Goede Date: Wed, 7 Jan 2009 15:37:29 +0000 (+0100) Subject: hwmon: (f71882fg) Check for hwmon powerdown state X-Git-Tag: v2.6.29-rc1~190^2~19 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=12d66e840b605265d6adf4b800cc3fc5fb410903;p=linux-2.6-omap-h63xx.git hwmon: (f71882fg) Check for hwmon powerdown state More F8000 prep work. Take over the checking if the hwmon part is not powered down from the standalone f8000 driver. This check is valid for all supported models. Signed-off-by: Hans de Goede Signed-off-by: Jean Delvare --- diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index de559923454..03a4f84b4e5 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -1500,6 +1500,11 @@ static int __devinit f71882fg_probe(struct platform_device *pdev) platform_set_drvdata(pdev, data); start_reg = f71882fg_read8(data, F71882FG_REG_START); + if (start_reg & 0x04) { + dev_warn(&pdev->dev, "Hardware monitor is powered down\n"); + err = -ENODEV; + goto exit_free; + } if (!(start_reg & 0x03)) { dev_warn(&pdev->dev, "Hardware monitoring not activated\n"); err = -ENODEV;