From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 875B0C48BD3 for ; Wed, 26 Jun 2019 15:52:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CB882086D for ; Wed, 26 Jun 2019 15:52:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rK/Kjgnm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726320AbfFZPwf (ORCPT ); Wed, 26 Jun 2019 11:52:35 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44516 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfFZPwe (ORCPT ); Wed, 26 Jun 2019 11:52:34 -0400 Received: by mail-pf1-f196.google.com with SMTP id t16so1563069pfe.11 for ; Wed, 26 Jun 2019 08:52:34 -0700 (PDT) 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:content-transfer-encoding; bh=HkPZhKVnh+qdvDEc8DXxUejx1F5VL/Izq9TwqeEZ6EE=; b=rK/KjgnmCgBGSBy0AAJEVwtKInDV12WaxjxIzJJuc0WS+kblwMGxrjo8mKJ2LDLZIX XxX6T8+vkFhiImxx2OfOg9L8lWQqciYeFdoncUglDaW6ygbYvnOHMLemQKC1y7dKdhmc HfQjP56WhrxzTgyiGPZieCDUT0GGeKHkrpGfST+9BcE53HI/rDmj+1cOTQnLoUlfYcq5 Ix7/SbcZUkUWKDNK2kzjdPgo668IY2KJLLGlEFYuPCwPoWKqTezzFSUKay5V2BnVlKFP CDoD2XTqN/Ng2FDFEksAKBOy2MWKmxwTW3a/IqYdzf1Pl7VkF22ogGLyGcK++m3tLr94 yEtw== 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:content-transfer-encoding; bh=HkPZhKVnh+qdvDEc8DXxUejx1F5VL/Izq9TwqeEZ6EE=; b=BuePrxzHjGJ0pFhiX4bNCDIySKug8CPSrDDEihFnecvHtKiPQA+Owor08AEW8Uh8No nJ4vDtyqeFi1VCv24OSfttB5pOVbgIvu51kvrAsaqvCxK3uh9kWkuMB9GtEXfEZbi2vD YlZhxPbMfAbnP8X89vutmTs6ju7TnCiJsznXJ3UTcHup+Vg/yiJ2sowLzwLffQvfhbDH CqblUWRR7Ur2276eVfdXp2oKe94Lt55BmtogO7Ld6/ilr3xy+ciXW3Dbw6jbPtI2LAaa HlKCoXttqSPlQ2GZe99RmLkUJOno+LpyfxIGmJeL7sY02iuOfQu99YKFT2+cNmiNp33K SVEA== X-Gm-Message-State: APjAAAWjPrK0R538Yr9qgRCFkWkSXm6rWvBUtdJxN0Ouu3puaMVk1BYL D9r58VkJCIzAKXRQqfcXbdx9PusJlwQl9do/qsk= X-Google-Smtp-Source: APXvYqz9+ULgvtedXAWfTd7GPHpvJKUfRSirjlPpCRI4Ppfvy+USfi3IAFz2Yd0ASafWfSWTKCoTJkpjZmiWE/tIyjI= X-Received: by 2002:a17:90a:d681:: with SMTP id x1mr5460230pju.13.1561564354050; Wed, 26 Jun 2019 08:52:34 -0700 (PDT) MIME-Version: 1.0 References: <1560439238-4054-1-git-send-email-akinobu.mita@gmail.com> <1560439238-4054-3-git-send-email-akinobu.mita@gmail.com> <1561474998.19713.13.camel@intel.com> In-Reply-To: <1561474998.19713.13.camel@intel.com> From: Akinobu Mita Date: Thu, 27 Jun 2019 00:52:22 +0900 Message-ID: Subject: Re: [PATCH v4 2/3] nvme: add thermal zone devices To: Zhang Rui Cc: linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org, Eduardo Valentin , Daniel Lezcano , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Minwoo Im , Kenneth Heitke , Chaitanya Kulkarni Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 2019=E5=B9=B46=E6=9C=8826=E6=97=A5(=E6=B0=B4) 0:03 Zhang Rui : > > On =E4=BA=94, 2019-06-14 at 00:20 +0900, Akinobu Mita wrote: > > The NVMe controller reports up to nine temperature values in the > > SMART / > > Health log page (the composite temperature and temperature sensor 1 > > through > > temperature sensor 8). > > > > This provides these temperatures via thermal zone devices. > > > > Once the controller is identified, the thermal zone devices are > > created for > > all implemented temperature sensors including the composite > > temperature. > > > > /sys/class/thermal/thermal_zone[0-*]: > > |---type: 'nvme-temp' > > |---temp: Temperature > > |---trip_point_0_temp: Over temperature threshold > > > > The thermal_zone[0-*] contains a 'device' symlink to the > > corresponding nvme > > device. > > > > On the other hand, the following symlinks to the thermal zone devices > > are > > created in the nvme device sysfs directory. > > > > - temp0: Composite temperature > > - temp1: Temperature sensor 1 > > ... > > - temp8: Temperature sensor 8 > > > > In addition to the standard thermal zone device, this also adds > > support for > > registering the DT thermal zone device. > > > I don't see standard thermal zone device and DT thermal zone device are > registered at the same time very often, especially if they represent > the same sensor. Good point. It is pointless to register both standard and DT thermal zone devices for the same sensor. We should register either one. (i.e. firstly try to register DT thermal zone. If no thermal zones found for the sensor in device tree, then try to register standard one)