Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1044035imm; Thu, 5 Jul 2018 13:38:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdmYd48B67yab0evhH3GDZNWLOgY9oooQcLpzf1k/FBhKn9E8OL0HLuVtIjOY/TYQ8gc0AO X-Received: by 2002:a17:902:f83:: with SMTP id 3-v6mr7553014plz.282.1530823090530; Thu, 05 Jul 2018 13:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530823090; cv=none; d=google.com; s=arc-20160816; b=T+JMhUh6akMaCQtOm/GOL0/IFd+o+8Iojh0qco890TE/euuT475IUHbqxtu1c7/rJ0 dFGI9elH/QP3J4ePUYuqBZkD19niQqrsCTv00myhblKKNaozH7PCGAP1pMHxoLb3CFlr ygtrxas9rVDJ4yX1oaifFwED7C6J6WncZVtB4AU4tp7dergD3ICWJpom8DeCET0sXsig YgSAAvTm3M/N2CYiNMa3kwUxHkEE2vnsDcZIYaqqlFbmjnLnuVzcBJ718tcvpaL7Vv2g AgCCreJixSnbPNvlBXMHlFudJnIzmDfHkShnQmg5E8lvoNWcn9WMw8OQMKgInuBpqbo0 zL2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fvif1klA0QBxw1fpV3aVxT2hIN5tPjxaHzsjQ9QTFr8=; b=Hkmzt4rJ6UX3m6gqdw/NrVvxBVLxKlNl/dIhEkuc4q83XMjawzKFgBWoQrxS2+Gf3d vepZPwPNna1iqY7Amu+wg1SvjMYiCBHr6mMKGu0IBb7k+xB/2/L3Q+SF9h3yH1MkgFeg V8FgjtHuiRGTbxHCeKMJWiH44q6mhAmdFjmCVppjbYmdBuA+Nj/e2mYrtf1jH0+QzUIr jK8ebChqIPbtynXi2D3+4TfrSIwaeN0Ij7+okTqO+AFulRczRjAuvXdE1NFxpBoPiavq i8JA8S0MXV9ZpUknteEt7qgYer/0fznbJxQF/ygibouuim/5LINIrFnGM1z6vku1C5Ph XsZA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6-v6si6368800pgm.647.2018.07.05.13.37.55; Thu, 05 Jul 2018 13:38:10 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754120AbeGEUhR (ORCPT + 99 others); Thu, 5 Jul 2018 16:37:17 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:34622 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753950AbeGEUhP (ORCPT ); Thu, 5 Jul 2018 16:37:15 -0400 Received: by mail-oi0-f66.google.com with SMTP id 13-v6so19405389ois.1; Thu, 05 Jul 2018 13:37:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fvif1klA0QBxw1fpV3aVxT2hIN5tPjxaHzsjQ9QTFr8=; b=NNNa5U0UyvYMANGXLK3unJjzapicg3S334VruCuKZjFYgsDGIN8xyqOeVuh/cv9EWB RH8AIXKHw9iRbKo85HDxgmaIcv40o218Q/c2UPh7XGPk/uDOnSyzOACPnp1vA7V2LVkl snOi+M6q/yXV57tisyOa/c4eUCU7AM8FjuNqzP0OK0eeWaGKg/KjfZspUhVHrWhaOnYo k6pu3CYdLT5A6/KY7pBtscVHBEwzFCA2AoFkQH8i06ZY2ka5/TvA4szb7dDgyjcgFlPm Vub/h1BmpNUhJkAVv02b/HrHSRmJow1otyYEZMNSCUzqrNHGabj4mRTD6PknrNAEeKyc wN9Q== X-Gm-Message-State: APt69E3bg6QMgskSSpuL6sah8pMpMbR/ouimvEQ9WqGtCudPZ/d4GExA VsAKr/bHqHLP6dU7g/7/pA== X-Received: by 2002:aca:dfc1:: with SMTP id w184-v6mr8718782oig.237.1530823034306; Thu, 05 Jul 2018 13:37:14 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id x64-v6sm4168238oig.44.2018.07.05.13.37.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 13:37:13 -0700 (PDT) Date: Thu, 5 Jul 2018 14:37:12 -0600 From: Rob Herring To: Amit Kucheria Cc: LKML , Rajendra Nayak , linux-arm-msm , Bjorn Andersson , Eduardo Valentin , smohanad@codeaurora.org, Vivek Gautam , Andy Gross , Zhang Rui , Mark Rutland , Kees Cook , Linux PM list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Subject: Re: [PATCH v4 4/6] thermal: tsens: Add support for SDM845 Message-ID: <20180705203712.GA29531@rob-hp-laptop> References: <43e3ae530334efab3fa0151430879f03731e9daa.1530533998.git.amit.kucheria@linaro.org> <20180703162619.GA17238@rob-hp-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 04, 2018 at 10:56:26PM +0530, Amit Kucheria wrote: > On Tue, Jul 3, 2018 at 9:56 PM, Rob Herring wrote: > > On Mon, Jul 02, 2018 at 06:14:07PM +0530, Amit Kucheria wrote: > >> SDM845 uses v2.4.0 of the TSENS IP block but the get_temp() function > >> appears to be identical across v2.x.y in code seen so far. We use the > >> generic get_temp() function. > >> > >> Signed-off-by: Amit Kucheria > >> --- > >> Documentation/devicetree/bindings/thermal/qcom-tsens.txt | 2 ++ > >> drivers/thermal/qcom/tsens-v2.c | 6 +++++- > >> drivers/thermal/qcom/tsens.c | 6 ++++++ > >> drivers/thermal/qcom/tsens.h | 5 ++++- > >> 4 files changed, 17 insertions(+), 2 deletions(-) > >> > >> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt > >> index 06195e8..075182e 100644 > >> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt > >> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt > >> @@ -5,6 +5,8 @@ Required properties: > >> - "qcom,msm8916-tsens" : For 8916 Family of SoCs > >> - "qcom,msm8974-tsens" : For 8974 Family of SoCs > >> - "qcom,msm8996-tsens" : For 8996 Family of SoCs > >> + - "qcom,tsens-v2.4.0" : For SDM845 Family of SoCs > >> + - "qcom,tsens-v2" : Generic fallback binding for any Soc using 2.x.y version of the tsens IP > > > > You need to show what are valid combinations of compatibles. Does v2 > > apply to 8996? One valid combination per line. > > I've restructured qcom-tsens.txt to look like this: > > -----%<------- > > * QCOM SoC Temperature Sensor (TSENS) > > Required properties: > - compatible: must be one of the following: > - "qcom,msm8916-tsens" (MSM8916) > - "qcom,msm8974-tsens" (MSM8974) > - "qcom,msm8996-tsens" (MSM8996) > - "qcom,tsens-", "qcom,tsens-v2" (TSENS IP version and a > generic v2 property as fallback except for MSM8996) > > Examples with ip_version are: > - "qcom,tsens-v2.4.0", "qcom,tsens-v2" (SDM845) > - "qcom,tsens-v2.2.1", "qcom,tsens-v2" (MSM8998) > > -----%<------- > > 8996 would end up being something like this if needed, though we're > stuck with "qcom,msm8996-tsens": > "qcom,msm8996-tsens", "qcom,tsens-v2.1.0", "qcom,tsens-v2" (MSM8996) 3 versions here for 3 SoCs. I'm not getting that convinced version numbers really are better. I would assume that other QCom IP blocks have versions too, but pretty much *every* *other* binding uses SoC names. Why is this one special? The other problem with versions is the mapping of versions to SoCs most likely can't be validated outside of QCom unless there's a version register. So, sorry to go in circles, but can you go back to qcom,-tsens. You can keep qcom,tsens-v2 as a fallback. Yes, it's annoying to have to update bindings for new SoCs. But it's trivial one line patches. Look at Renesas bindings. Maybe adding new ones will be scriptable once we move to json-schema binding docs. Rob