linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Serge Semin <fancer.lancer@gmail.com>
To: jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com
Cc: Sergey.Semin@t-platforms.ru, linux-ntb@googlegroups.com,
	linux-kernel@vger.kernel.org,
	Serge Semin <fancer.lancer@gmail.com>
Subject: [PATCH 0/4] ntb: idt: Add hwmon temperature sensor interface
Date: Sat, 14 Jul 2018 14:58:30 +0300	[thread overview]
Message-ID: <20180714115834.3350-1-fancer.lancer@gmail.com> (raw)

IDT PCIe-switches are equipped with an embedded temperature sensor. It
works within the range [0; 127.5]C with a resolution of 0.5C. It can
be used to monitor the chip core temperature so to have prevent it from
possible overheating. It might be very topical for the chip, since it
gets heated like in hell especially if ASPM isn't enabled.

Other than the current sampled temperatur, the sensor interface exposes
history registors with lowest and highest measured temperature, thresholds
and alarm IRQs enabled/disable bits, ADC/filter settings. The device manual
states that the switch is able to generate a msi interrupt on PCIe upstreams
if the temperature crosses one of three configurable thresholds. But in
practice we discovered that the enable/disable threshold IRQs bits interface
is very broken (see the third patch commit message), so it can't be used
to create the hwmon alarm interface. As the result we had to remove the
already available temperature sensor IRQ handler and disable the corresponding
interrupt.

Current version of the driver provides following standard hwmon sysfs
files: temperature input, lowest and highest measured temperature
with possibility to reset the history, temperature offset. The rest of the
nodes can't be safely implemented for the chip due to the described issues.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>

Serge Semin (4):
  ntb: idt: Alter temperature read method
  ntb: idt: Add basic hwmon sysfs interface
  ntb: idt: Discard temperature sensor IRQ handler
  ntb: idt: Alter the driver info comments

 drivers/ntb/hw/idt/Kconfig      |   4 +-
 drivers/ntb/hw/idt/ntb_hw_idt.c | 317 ++++++++++++++++++++++++++++++++++------
 drivers/ntb/hw/idt/ntb_hw_idt.h |  87 ++++++++++-
 3 files changed, 353 insertions(+), 55 deletions(-)

-- 
2.12.0


             reply	other threads:[~2018-07-14 11:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 11:58 Serge Semin [this message]
2018-07-14 11:58 ` [PATCH 1/4] ntb: idt: Alter temperature read method Serge Semin
2018-07-14 11:58 ` [PATCH 2/4] ntb: idt: Add basic hwmon sysfs interface Serge Semin
2018-07-17  1:28   ` kbuild test robot
2018-07-17  1:28   ` kbuild test robot
2018-07-14 11:58 ` [PATCH 3/4] ntb: idt: Discard temperature sensor IRQ handler Serge Semin
2018-07-14 11:58 ` [PATCH 4/4] ntb: idt: Alter the driver info comments Serge Semin
2018-07-17  9:24 ` [PATCH v2 0/4] ntb: idt: Add hwmon temperature sensor interface Serge Semin
2018-07-17  9:24   ` [PATCH v2 1/4] ntb: idt: Alter temperature read method Serge Semin
2018-07-17  9:24   ` [PATCH v2 2/4] ntb: idt: Add basic hwmon sysfs interface Serge Semin
2018-07-17  9:24   ` [PATCH v2 3/4] ntb: idt: Discard temperature sensor IRQ handler Serge Semin
2018-07-17  9:24   ` [PATCH v2 4/4] ntb: idt: Alter the driver info comments Serge Semin
2018-11-01 14:35   ` [PATCH v2 0/4] ntb: idt: Add hwmon temperature sensor interface Jon Mason
2018-10-31 21:27 ` [PATCH " Jon Mason

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=20180714115834.3350-1-fancer.lancer@gmail.com \
    --to=fancer.lancer@gmail.com \
    --cc=Sergey.Semin@t-platforms.ru \
    --cc=allenbh@gmail.com \
    --cc=dave.jiang@intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntb@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).