Messages in this thread | | | Subject | Re: [PATCH 0/5] scsi: ufs: ufs device as a temperature sensor | From | Guenter Roeck <> | Date | Mon, 3 Feb 2020 06:47:54 -0800 |
| |
On 2/3/20 3:57 AM, Avi Shchislowski wrote: > > >> -----Original Message----- >> From: Guenter Roeck <groeck7@gmail.com> On Behalf Of Guenter Roeck >> Sent: Sunday, February 2, 2020 9:21 PM >> To: Avi Shchislowski <Avi.Shchislowski@wdc.com> >> Cc: Alim Akhtar <alim.akhtar@samsung.com>; Avri Altman >> <Avri.Altman@wdc.com>; James E.J. Bottomley <jejb@linux.ibm.com>; >> Martin K. Petersen <martin.petersen@oracle.com>; linux- >> kernel@vger.kernel.org; linux-scsi@vger.kernel.org >> Subject: Re: [PATCH 0/5] scsi: ufs: ufs device as a temperature sensor >> > >> On Sun, Feb 02, 2020 at 12:46:54PM +0200, Avi Shchislowski wrote: >>> 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. >>> >> >> Can you add an explanation why this can't be added to the just-introduced >> 'drivetemp' driver in the hwmon subsystem, and why it make sense to have >> proprietary attributes for temperature and temperature limits ? >> >> Thanks, >> Guenter >> > Hi Guenter > > Thank you for your comment > > The ufs device is not a temperature sensor per-se. It is, first and foremost, a storage device.
Huh ? Many non-temperature-sensor devices in the kernel report their temperature through the hardware monitoring subsystem.
> Reporting the device case temperature is a feature added in a recently released UFS spec (UFS3.0). > Therefore, adding a thermal-core module, in opposed to hwmon module, seemed more appropriate. > Registering a hwmon device look excessive, as no other hw-monitoring attribute is available - aside temperature. > Really ? Interesting position. Are you saying that instantiating a thermal core module, plus providing non-standard sysfs attributes to report the temperature, is less complex ? Are you sure ? Can you provide evidence that this is indeed the case ?
> Using Martin's tree, I wasn't able to locate the 'drivetemp' module, nor any reference to it in the hwmon documentation. >
You might want to consider looking in the mainline kernel.
Guenter
| |