|
|
Subscribe / Log in / New account

scsi: ufs: ufs device as a temperature sensor

From:  Avi Shchislowski <avi.shchislowski-AT-wdc.com>
To:  Alim Akhtar <alim.akhtar-AT-samsung.com>, Avri Altman <avri.altman-AT-wdc.com>, "James E.J. Bottomley" <jejb-AT-linux.ibm.com>, "Martin K. Petersen" <martin.petersen-AT-oracle.com>
Subject:  [PATCH 0/5] scsi: ufs: ufs device as a temperature sensor
Date:  Sun, 2 Feb 2020 09:41:48 +0200
Message-ID:  <1580629313-20078-1-git-send-email-avi.shchislowski@wdc.com>
Cc:  linux-kernel-AT-vger.kernel.org, linux-scsi-AT-vger.kernel.org, Avi Shchislowski <avi.shchislowski-AT-sandisk.com>
Archive-link:  Article

From: Avi Shchislowski <avi.shchislowski@sandisk.com>

UFS3.0 allows using the ufs device as a temperature sensor. The
purpose of this 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.

We added the capability of responding to such notifications, while
notifying the kernel's thermal core, which further exposes the thermal
zone attributes to user space. UFS temperature attributes are all
read-only, so only thermal read ops (.get_xxx) can be implemented.

Avi Shchislowski (5):
  scsi: ufs: Add ufs thermal support
  scsi: ufs: export ufshcd_enable_ee
  scsi: ufs: enable thermal exception event
  scsi: ufs-thermal: implement thermal file ops
  scsi: ufs: temperature atrributes add to ufs_sysfs

 drivers/scsi/ufs/Kconfig       |  11 ++
 drivers/scsi/ufs/Makefile      |   1 +
 drivers/scsi/ufs/ufs-sysfs.c   |   6 +
 drivers/scsi/ufs/ufs-thermal.c | 247 +++++++++++++++++++++++++++++++++++++++++
 drivers/scsi/ufs/ufs-thermal.h |  25 +++++
 drivers/scsi/ufs/ufs.h         |  20 +++-
 drivers/scsi/ufs/ufshcd.c      |   9 +-
 drivers/scsi/ufs/ufshcd.h      |  12 ++
 8 files changed, 329 insertions(+), 2 deletions(-)
 create mode 100644 drivers/scsi/ufs/ufs-thermal.c
 create mode 100644 drivers/scsi/ufs/ufs-thermal.h

-- 
1.9.1



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