All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [RFC v2] Support of chassis intrusion detection
Date: Tue, 10 Mar 2009 16:03:40 +0000	[thread overview]
Message-ID: <20090310170340.4c63de39@hyperion.delvare> (raw)

Hi all,

A number of users have asked us to support the chassis intrusion
detection feature which some hardware monitoring chip have. I've
created a ticket for this:
http://www.lm-sensors.org/ticket/2370

I have made a first proposal 3 weeks ago, and got a number of
interesting comments about it. Here comes a second version hopefully
addressing all the concerns that had been raised. Changes include:
* Handle multiple intrusion detection switches.
* Let the user control whether chassis intrusion should result in
  system beeping or not. At least the Winbond W83793G supports this, and
  probably other chips as well.


sysfs interface
=======
intrusion[0-*]_alarm
		Chassis intrusion detection
		0: OK
		1: intrusion detected
		RW
		Contrary to regular alarm flags which clear themselves
		automatically when read, this one sticks until cleared by
		the user. This is done by writing 0 to the file. Writing
		other values is unsupported.

intrusion[0-*]_beep
		Chassis intrusion beep
		0: disable
		1: enable
		RW

drivers
===
Drivers adm9240, w83792d and w83793 implement this feature in
non-standard ways. They should be converted to the new, standard
interface.

libsensors
=====

SENSORS_FEATURE_INTRUSION = 0x19
SENSORS_SUBFEATURE_INTRUSION_ALARM = (SENSORS_FEATURE_INTRUSION << 8) | 0x80
SENSORS_SUBFEATURE_INTRUSION_BEEP = SENSORS_SUBFEATURE_INTRUSION_ALARM + 1 

sensors
===
Reading the value of the chassis intrusion alarm and beep subfeatures
is done like for any other subfeature. Likewise for writing to the beep
subfeature.

Writing to the alarm subfeature, OTOH, can't be handled the same as
writing limits, because we certainly don't want to clear the flag
automatically at lm_sensors start or restart time. So we could add a
dedicated flag to clear the intrusion detection flag (e.g. "sensors
--clear-intrusion").


If anyone has objections or comments, please speak up.

-- 
Jean Delvare

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

             reply	other threads:[~2009-03-10 16:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10 16:03 Jean Delvare [this message]
2009-03-10 22:52 ` [lm-sensors] [RFC v2] Support of chassis intrusion detection Fred .
2009-03-13 13:44 ` Hans de Goede
2009-03-13 22:48 ` Matt Roberds
2010-10-07 12:55 ` Fred .
2010-10-07 14:33 ` Guenter Roeck
2010-10-10 22:42 ` Fred .
2010-10-10 22:59 ` Guenter Roeck
2010-10-12  7:15 ` Fred .
2010-11-02 13:21 ` Jean Delvare
2010-11-02 14:04 ` Guenter Roeck
2010-11-02 14:29 ` Jean Delvare
2010-11-02 15:18 ` Guenter Roeck
2010-11-02 16:24 ` Jean Delvare
2010-11-03 21:37 ` Fred .

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=20090310170340.4c63de39@hyperion.delvare \
    --to=khali@linux-fr.org \
    --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.