All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 6/7] hwmon: (w83795) Clear intrusion alarm
Date: Sun, 07 Nov 2010 17:24:59 +0000	[thread overview]
Message-ID: <20101107172459.GF18730@ericsson.com> (raw)
In-Reply-To: <20101107164719.7a29aedb@endymion.delvare>

On Sun, Nov 07, 2010 at 10:47:19AM -0500, Jean Delvare wrote:
> When asked to clear the intrusion alarm, do so immediately. We have to
> invalidate the cache to make sure the new status will be read. But we
> also have to read from the status register once to clear the pending
> alarm, as writing to CLR_CHS surprising won't clear it automatically.
> 
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> ---
>  w83795.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- a/drivers/hwmon/w83795.c	2010-11-06 22:37:55.000000000 +0100
> +++ b/drivers/hwmon/w83795.c	2010-11-06 22:40:03.000000000 +0100
> @@ -755,6 +755,10 @@ store_chassis_clear(struct device *dev,
>  	val = w83795_read(client, W83795_REG_CLR_CHASSIS);
>  	val |= 0x80;
>  	w83795_write(client, W83795_REG_CLR_CHASSIS, val);
> +
> +	/* Clear status and force cache refresh */
> +	w83795_read(client, W83795_REG_ALARM(5));

Won't that clear other (possibly unreported) alarms as well ?

If that is not a problem, 
	Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2010-11-07 17:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-07 15:47 [lm-sensors] [PATCH 6/7] hwmon: (w83795) Clear intrusion alarm Jean Delvare
2010-11-07 17:24 ` Guenter Roeck [this message]
2010-11-07 21:05 ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101107172459.GF18730@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.