Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5821410ybl; Tue, 10 Dec 2019 12:03:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxYYclXL1mlFE4EenorOVrVxqCMQ+sSvoR0sx7xmp4vi/RblPWIP7vXoXkVZ+NYkCghc9vy X-Received: by 2002:a54:4805:: with SMTP id j5mr516891oij.165.1576008233719; Tue, 10 Dec 2019 12:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576008233; cv=none; d=google.com; s=arc-20160816; b=ipAfuo3Inim1HczGm7iMsQBQyTDIQeVtsKs4ZyLQbh6lpXQRVzQhVF0izT5ygg5Icw /vQFGg4wRAC+jKeJ0u03e73TWDqebJGtk02BwcGjqiWCzwyWkbNrFoHWQh25cxJtw1S6 O/t7U79TBzcZ4D4WnrbtkbQ19my5vqnW9Ycz1eHbqICHONoXB+vmdo9QdM9p1nZ7N5pM nmoS3BZDifQsesbJbpzGSRVIV3ueRLo87l5LvcLbCMMyyKM8PHcip1cNWQFuL/ovfMJJ hL5azjjw9hCk3wcvndqnAiDKoeXICAIxlNpgkKnDZ01SuLWOyeTrX3o18OyfjmjE/DJd CmMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/R0DvHO32Ps1xRQleCzKMKFqLHiFsSU0YTem1kX0McY=; b=EKgPGCnSieInz4SZ+v2ptMsKOUwPOqYMVIfbH8UY6c26CRHU3T676tY+7Cwl6X1VfM nc4QLmz+jZRrlTYDhIE3doXHojqXK4sx0oRynfxpkDkQE3V481V5t5X5/o/3ptqNR1r/ c3UB+Rb/0tjwkSwGMzmM73828GR9R+patiIsVZqQwWCLZS2yd/n4tWdOqcoTP2tHzQto JvyC4GRYq+ff1AhovhJj5AywHphlLKYd6i32a+gu/YK8eWStEiMvtd5cdFt88QzPRQQt bvKNc4vnfbyanGdbsB9MY4lBpxVAfC1lh9SjWoC+1no4mtMeI/v7KNyTu2fmMLqi9OXF dZ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=R7H1U1qR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si2633268otl.243.2019.12.10.12.03.40; Tue, 10 Dec 2019 12:03:53 -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=@google.com header.s=20161025 header.b=R7H1U1qR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727181AbfLJUBs (ORCPT + 99 others); Tue, 10 Dec 2019 15:01:48 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:35818 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbfLJUBr (ORCPT ); Tue, 10 Dec 2019 15:01:47 -0500 Received: by mail-ed1-f65.google.com with SMTP id f8so17123283edv.2 for ; Tue, 10 Dec 2019 12:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/R0DvHO32Ps1xRQleCzKMKFqLHiFsSU0YTem1kX0McY=; b=R7H1U1qRykpKlz90guDfnfMLQu+EzMsrV2O6YkM4xhmZeMcLM57ApewNRgw7I3oxKI 2aAD35/rc6ipU1JVj4R7fnWWDXdfU60Ru7OkIh/gvKcGZOMCsZoTifF7aVmY87MT6hgE dD5ngP3bxwvgxaUKGXlHDjhdzIOD2MYqyaZAQ0zNBWoe41+9R24H9mu0HoZ73/j1dZHO 1e1NADmg1PX1InTdZK26A9BHbzzbv9g+wwZC320VhTgoMhgDSR7ws8a9GUG3L9eiWd/C XjXyLoPqpEfT9KeiRzpCp3r467r5KBUq+K4z3zpDpkHtZFXjE071oLAqXrPbaYl//h7O M3GQ== 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=/R0DvHO32Ps1xRQleCzKMKFqLHiFsSU0YTem1kX0McY=; b=T1t3WOAkbgVp3rVItQ+GX0U1aFutpUNP6juvSJ+DfN2DKifmxfSbUvaxi+HsZWJnpP 6P8/Egah14TC6hnOZv17XrWS5uevBGnH3h4ZxEHYo8Ia/hZmxJKpIsXmf4lqmCsIgxRZ WjjHrVyuqrA2qtNA969FfzJ7U4+C3OR00a2h3TYUx37TKZUYJI4Xsw7P2H6eXnoIa9xu uBof0DH7gK+fx7jYyFArg3Jjijj+1IpPCdVmlII2cHrHoAWsC7y1PJPwayNSJvYGufY+ 9gGU83IRNhNRVpAaq6jPNAsDKYesO3F/dhEAthyM2za1mmRbP/lgICsQSRDpkQBpR5wX qreQ== X-Gm-Message-State: APjAAAXxIsOSefTsF8HLcIBYih5IfSfxeLpifQ4cSGl1R0EENftEl4dj UZCZIXor0o4xBjEAoK9rBUEsIaUjAiSLs6F9rdR3bg== X-Received: by 2002:a17:906:4881:: with SMTP id v1mr5729193ejq.329.1576008104565; Tue, 10 Dec 2019 12:01:44 -0800 (PST) MIME-Version: 1.0 References: <20191205071953.121511-1-wvw@google.com> <69dd3a7a-c5fe-3ae7-8a4d-c3939870eed8@linaro.org> In-Reply-To: <69dd3a7a-c5fe-3ae7-8a4d-c3939870eed8@linaro.org> From: Wei Wang Date: Tue, 10 Dec 2019 12:01:32 -0800 Message-ID: Subject: Re: [PATCH v3 0/3] thermal: introduce by-name softlink To: Daniel Lezcano Cc: Wei Wang , Zhang Rui , Eduardo Valentin , Amit Kucheria , Linux PM list , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 6:36 AM Daniel Lezcano wrote: > > On 05/12/2019 08:19, Wei Wang wrote: > > The paths thermal_zone%d and cooling_device%d are not intuitive and the > > numbers are subject to change due to device tree change. This usually > > leads to tree traversal in userspace code. > > The patch creates `tz-by-name' and `cdev-by-name' for thermal zone and > > cooling_device respectively. > > Instead of adding another ABI, I suggest we put the current one > deprecated with a warning in the dmesg, update the documentation and > change the name the next version. > > IMHO, we should keep the existing path which is a common pattern for sysfs interface. There are reasons we need couple thermal zone and cooling device in one class, but might be worth considering split as the latter might be used for other purposes e.g. battery current limit for preventive vdrop prevention. By nature, thermal zone are sensors, and cooling devices are usually components with potential high power use. > > Changes since v1 [1]: > > * Split cooling device registration into a seperate patch > > Changes since v2 [2]: > > * Split improve error message in thermal zone registration > > > > [1]: v1: https://lore.kernel.org/patchwork/patch/1139450/ > > [2]: v2: https://lkml.org/lkml/2019/12/4/1291 > > > > Wei Wang (3): > > thermal: prevent cooling device with no type to be registered > > thermal: improve error message in thermal zone registration > > thermal: create softlink by name for thermal_zone and cooling_device > > > > drivers/thermal/thermal_core.c | 55 +++++++++++++++++++++++++++------- > > 1 file changed, 44 insertions(+), 11 deletions(-) > > > > > -- > Linaro.org =E2=94=82 Open source software for A= RM SoCs > > Follow Linaro: Facebook | > Twitter | > Blog >