Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1483211ybv; Thu, 6 Feb 2020 05:00:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzwoDbjO0U7nlcOET9yiGJddB1lQVSi75btDOe+9nId+ymtl3sLflVwnPqKnmrgWyktjYhy X-Received: by 2002:aca:3f54:: with SMTP id m81mr6517262oia.73.1580994037085; Thu, 06 Feb 2020 05:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580994037; cv=none; d=google.com; s=arc-20160816; b=a6eDXf1psZSwo4czbsxTJ5TE7V3lPkS3MnHYtVq+G7vW8EHqprg/B4fB4PQETXpA13 xb+uD9NR8NYSuyv2FEPMCQF4Li6A99GNUO1r35YZh2AlKI+n8vWl9+cGuxxQ0E3o1j2+ izfAEib7e2aRBCr5CKZe4Tp5N98dMSo7VPLfS6kqhOgJhWtc8ibVj/FEqZbip3VlOXyY Zk2wYNEuuTe/lwr1NuStppRyRkEtmbnyN0BGMcqM9VqsNSoKfpoIZUFVnkpjCGVVYZBn WTBT86pkgFwwKUvOdtbaUcbzKt5QBGYgp3QAS4vkhMn4w9LPnBcPUhsRhdk6x4bvyyPV RBbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NXcVSONSIjpWjvkmio9pr1+Iw6UBup0YHvSTK6KiGHE=; b=SdWenTcokaRno/FAnD+6DhLTUOB/BqIsYvAVCbV0BBjtgF1e8Xzhu1iP/hy6eaHdQZ 5TvCCfYwEynmedXbqCUe43RLc0nCqgq7LIRMDnDXKoIZ7OCr55P/KN1g4KrQAYHF070m 04us4HLWIVHQxHSnqcLcBIvDgJg2fpWCO4bpkJuEs0Y+UlaPEDbA3DkrqrY3jAZ6f9YC wW793esQ1YSc79FDT0/EEYpGrasB9qJ1lCNFw+UXg/W1qJFL7w9lz8Dls/Vau5H6mcbJ jWJyMYMVRCnHiGab4MBCHZ5zgtbXi8VAaswnqQ4D/qpINX66duc4U1GnlqsO9otL9N8K N8EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XLWUkzua; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si1725352otp.129.2020.02.06.05.00.24; Thu, 06 Feb 2020 05:00:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XLWUkzua; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728129AbgBFMmJ (ORCPT + 99 others); Thu, 6 Feb 2020 07:42:09 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45076 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726538AbgBFMmJ (ORCPT ); Thu, 6 Feb 2020 07:42:09 -0500 Received: by mail-lf1-f66.google.com with SMTP id 203so3988062lfa.12; Thu, 06 Feb 2020 04:42:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NXcVSONSIjpWjvkmio9pr1+Iw6UBup0YHvSTK6KiGHE=; b=XLWUkzuadKKQtkp4j7n+1wwZuef6tmuW0MyzJuykCOgeKBbJUm7ae5bUSf6TTPc+Ho MbGNmsXdCmt3V2/3s5EN07O0WaKN1PTGoDvFVoALiJidSX8tdXxGwt6FVbZ9CzeuTsPp sG+Z7ws93utYpcmTHiQz3Xdrxg9M+RFz/VGOyNOqNyPdJgH1XG/SggabP0o4c2M/fixH +zA+Ru50ac/6zc69h0Y80bRlrTtPtlblxaPq+5sMFVU/9SF75wOrQTrlxIrjUogAZeZa SBPTR+prH//684PGpnZIXputynBnWKB3sc8yxGrDDnBmS9cn4NITjMqJFFTNt3da5312 bWAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NXcVSONSIjpWjvkmio9pr1+Iw6UBup0YHvSTK6KiGHE=; b=qv0gUgMkG0GPiyNrmXJ4XyfmVeeweIz9PGuOu/OZ6Wfx2r8a5fnmltcabVsjukL/8O 5UmlyhgZZwqsswVG21EUg7uxPkmIuF5Lihqs2gqeK0ivSuVgqCQivMwl3XtXqitAEIgG fde/f3RAyi2zvF/Pzv18iVhRdyDBFeBjSSWkDLekrlCtSihy6S1zHKQmylNoZL9dXDyq tbsw2SVSVPnIOowewoK47b28c8smkXZrNmR8T0kbeEgKhIVSfmQzGkCw0dWA323LgwdI hjgG+PCqHs5dxgSQeKjPICjAoD4jeVHPsj3h1vqtImDC0l7oY+sbwq4Mxb/oqTpPBWol N3hg== X-Gm-Message-State: APjAAAVsch0T8+2L/vBvnk5eP2T5qBt8PwgUZHtFbQElLm3146ItvLZU ilk166vJ9AklBOmBybvXn5S8a/UPy88BCu1xLOY= X-Received: by 2002:a19:c014:: with SMTP id q20mr1746757lff.209.1580992926731; Thu, 06 Feb 2020 04:42:06 -0800 (PST) MIME-Version: 1.0 References: <1580640419-6703-1-git-send-email-avi.shchislowski@wdc.com> <20200202192105.GA20107@roeck-us.net> <94cb1e97-18ed-ebec-23c2-b4d87434726a@roeck-us.net> <20200203214733.GA30898@roeck-us.net> In-Reply-To: From: Julian Calaby Date: Thu, 6 Feb 2020 23:41:55 +1100 Message-ID: Subject: Re: [PATCH 0/5] scsi: ufs: ufs device as a temperature sensor To: Avri Altman Cc: Avi Shchislowski , Guenter Roeck , Alim Akhtar , "James E.J. Bottomley" , "Martin K. Petersen" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, On Thu, Feb 6, 2020 at 11:08 PM Avri Altman wrote: > > > > > > Hi Avi, > > > > On Thu, Feb 6, 2020 at 9:48 PM Avi Shchislowski > > wrote: > > > > > > As it become evident that the hwmon is not a viable option to implement > > ufs thermal notification, I would appreciate some concrete comments of this > > series. > > > > That isn't my reading of this thread. > > > > You have two options: > > 1. extend drivetemp if that makes sense for this particular application. > > 2. follow the model of other devices that happen to have a built-in > > temperature sensor and expose the hwmon compatible attributes as a > > subdevice > > > > It appears that option 1 isn't viable, so what about option 2? > This will require to export the ufs device management commands, > Which is privet to the ufs driver. > > This is not a viable option as well, because it will allow unrestricted access > (Including format etc.) to the storage device. > > Sorry for not making it clearer before. I should have clarified further: I meant having the UFS device register a HWMON driver using this API: https://www.kernel.org/doc/html/latest/hwmon/hwmon-kernel-api.html *Not* writing a separate HWMON driver that uses some private interface. Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/