|
|
Log in / Subscribe / Register

Add temperature notification support

From:  Avri Altman <avri.altman-AT-wdc.com>
To:  "James E . J . Bottomley" <jejb-AT-linux.vnet.ibm.com>, "Martin K . Petersen" <martin.petersen-AT-oracle.com>
Subject:  [PATCH v7 0/2] Add temperature notification support
Date:  Wed, 15 Sep 2021 09:04:05 +0300
Message-ID:  <20210915060407.40-1-avri.altman@wdc.com>
Cc:  linux-scsi-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Bart Van Assche <bvanassche-AT-acm.org>, Adrian Hunter <adrian.hunter-AT-intel.com>, Bean Huo <beanhuo-AT-micron.com>, Guenter Roeck <linux-AT-roeck-us.net>, Avri Altman <avri.altman-AT-wdc.com>
Archive-link:  Article

v6 -> v7:
 - some more useless initializations
 
v5 -> v6:
 - remove useless initializations
 
v4 - > v5:
 - Fix improper return error values
 
v3 -> v4:
 - Attend Guenter's comments

v2 -> v3:
 - Attend Bart's & Guenter's comments

v1 -> v2:
 - Add a hw monitor device if both the platform & the device support it
 - Remove the sysfs patch: no need to duplicate /sys/class/hwmon

UFS3.0 allows using the ufs device as a temperature sensor. The purpose
of this optional feature is to provide notification to the host of the
UFS device case temperature. It allows reading of a rough estimate
(+-10 degrees centigrade) of the current case temperature, and setting a
lower and upper temperature bounds, in which the device will trigger an
applicable exception event.

A previous attempt [1] tried a comprehensive approach.  Still, it was
unsuccessful. Here is a more modest approach that introduces just the
bare minimum to support temperature notification.

Thanks,
Avri

[1] https://lore.kernel.org/lkml/1582450522-13256-1-git-send-...


Avri Altman (2):
  scsi: ufs: Probe for temperature notification support
  scsi: ufs: Add temperature notification exception handling

 drivers/scsi/ufs/Kconfig     |   9 ++
 drivers/scsi/ufs/Makefile    |   1 +
 drivers/scsi/ufs/ufs-hwmon.c | 210 +++++++++++++++++++++++++++++++++++
 drivers/scsi/ufs/ufs.h       |   7 ++
 drivers/scsi/ufs/ufshcd.c    |  47 ++++++++
 drivers/scsi/ufs/ufshcd.h    |  20 ++++
 6 files changed, 294 insertions(+)
 create mode 100644 drivers/scsi/ufs/ufs-hwmon.c

-- 
2.17.1



Copyright © 2021, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds