From patchwork Tue Oct 18 09:10:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 4723 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2FCAC23E03 for ; Tue, 18 Oct 2011 09:11:28 +0000 (UTC) Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id F3FF0A18613 for ; Tue, 18 Oct 2011 09:11:27 +0000 (UTC) Received: by gyf1 with SMTP id 1so520072gyf.11 for ; Tue, 18 Oct 2011 02:11:27 -0700 (PDT) Received: by 10.223.92.144 with SMTP id r16mr2800719fam.23.1318929087239; Tue, 18 Oct 2011 02:11:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.1.71 with SMTP id 7cs36704lak; Tue, 18 Oct 2011 02:11:27 -0700 (PDT) Received: by 10.14.9.165 with SMTP id 37mr136532eet.51.1318929086748; Tue, 18 Oct 2011 02:11:26 -0700 (PDT) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com. [207.126.144.149]) by mx.google.com with SMTP id 13si305150eem.116.2011.10.18.02.11.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Oct 2011 02:11:26 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.149; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP; Tue, 18 Oct 2011 09:11:26 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6C8E7A3; Tue, 18 Oct 2011 09:02:29 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id E4AE9CE6; Tue, 18 Oct 2011 09:10:57 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 2A9DDA8081; Tue, 18 Oct 2011 11:10:53 +0200 (CEST) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 18 Oct 2011 11:10:56 +0200 From: Linus Walleij To: Guenter Roeck , Cc: Lee Jones , Martin Persson , Daniel Willerud , Linus Walleij Subject: [PATCH 3/3] hwmon/abx500: add hwmon notifications Date: Tue, 18 Oct 2011 11:10:51 +0200 Message-ID: <1318929051-15880-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 From: Daniel Willerud We have drivers that need to be notified about critical temperatures, so add notifiers using the hwmon notification mechanism. Signed-off-by: Daniel Willerud Signed-off-by: Linus Walleij --- drivers/hwmon/ab8500.c | 1 + drivers/hwmon/abx500.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/hwmon/ab8500.c b/drivers/hwmon/ab8500.c index e0b1f48..03be29e 100644 --- a/drivers/hwmon/ab8500.c +++ b/drivers/hwmon/ab8500.c @@ -127,6 +127,7 @@ static int ab8500_temp_irq_handler(int irq, struct abx500_temp *data) data->crit_alarm[4] = 1; mutex_unlock(&data->lock); + hwmon_notify(data->crit_alarm[4], NULL); sysfs_notify(&data->pdev->dev.kobj, NULL, "temp5_crit_alarm"); dev_info(&data->pdev->dev, "AB8500 thermal warning," " power off in %lu s\n", data->power_off_delay); diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c index b9c8810..b26a13e 100644 --- a/drivers/hwmon/abx500.c +++ b/drivers/hwmon/abx500.c @@ -163,6 +163,7 @@ static void gpadc_monitor(struct work_struct *work) ret); break; } + hwmon_notify(data->max_alarm[i], NULL); sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node); } if (updated_max_hyst_alarm) {