Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2606581ybl; Mon, 19 Aug 2019 04:57:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9x+yBdmyENof75mt/8cV+7wAe6cTCqH1Htt1BO2qzaYcHw9tUmlu43qFAo5aVuUErAUrO X-Received: by 2002:aa7:80d7:: with SMTP id a23mr13208458pfn.208.1566215832516; Mon, 19 Aug 2019 04:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566215832; cv=none; d=google.com; s=arc-20160816; b=jBBzbp6H9+5ugFsJTq1w+VJGBzYYJrywEwESsvT/G7o2p6/rlP2e0aD35qnYKX1wSr mg3yb194+9Pz0kDLUxkt6IL5YQFdzG6L2MX1AF/3OM9ome6fnRWTqPI+rt14KZ3nODEh +qdA4kqbzsyH8JBu/y9GPm1Erz/yqnyEw4dVDfWV+gm8rW/PpIwA9PbYb47+KJWDalJ6 q9ij9RBCMTsxICSsTlYg83QeaTLf7P2Y9tJnRC4KPcKqwDquswK5m4qMQzr+JCPHBdCx DdAoVq84ClMCBbjCiBk0VSI+Cv0UCb6tv3caN6io1d85nRtYLGV1jBy9pGZ/ErIrEtqt YDaw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=MeeVHddQ4glE5pzixF7wOIvmBwdUHzXVQouPtTV5sJo=; b=QBNZxgQD328JVr8kpZXl6C4uJhbW9SwBaj55WiwS0UMqf5Pl2KT9DSOlCB6eqkFN9q OSV4embv35oF3TnCEXfMdD76buk7g44tRWG5Lc8od9Uo1GVs2G3PU5lSf2Cxgzf4ovsV rLKP4k0AUPdvVwPSxPYV3ItbRxrTLt7/YZfxZCpQVQxs4fsww0xciy0Tw14N4jRwYyKg jpo9/1G5HZjMxCn4fXYUzm0grcUbi0d0/+dmFBw6KCge3D7aubY6+JeJlrbV/7MiWDjl Bmitdd4CWT3ri+AbAxspsWBMLWat8B/Sz5YoOKvtRU/ixc7SDKhmtMneTinCZoYm7CFX uj/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IXX1HL56; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si5801855plo.8.2019.08.19.04.56.57; Mon, 19 Aug 2019 04:57:12 -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; dkim=pass header.i=@linaro.org header.s=google header.b=IXX1HL56; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbfHSLzq (ORCPT + 99 others); Mon, 19 Aug 2019 07:55:46 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46745 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbfHSLzp (ORCPT ); Mon, 19 Aug 2019 07:55:45 -0400 Received: by mail-wr1-f67.google.com with SMTP id z1so8400468wru.13 for ; Mon, 19 Aug 2019 04:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MeeVHddQ4glE5pzixF7wOIvmBwdUHzXVQouPtTV5sJo=; b=IXX1HL56VxUB10/ZqGD4BT8I2j/IS10PJBIFP7u3fqOVxZTX9UdD4SBs4piQySDv+c 9gon1dabZG0daH8zHi5sFkEGL2wJpy3OzB5jpHFVl4poUT98KDSaQfz77LXdBALvbbVb 5Ft0Y+0xCvqkAC09i+mntS7o83tVODBE/szQJYm9bYJvFarjNHLAlnDeo0vauUQXIx99 PYpcMOxXTl54mwVfKS9B3As+6WHAq4BqHpO+1TnISv0USEpturBr1sjQOXctoMSIfsN7 S/wL0oKOufe/MHxZLLxWtu6XjbAlwUToHeETbJOT7JvGW2lG8Vn1md0nGa/YgRkU9uWL qGQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=MeeVHddQ4glE5pzixF7wOIvmBwdUHzXVQouPtTV5sJo=; b=sJV0VGmzshp+y3Bm0fgKEjYJIaQqDFb7PUhe8rLw5wB9GoVhOO2896OtYdFl7w1u1H v3Xx8Zk1BXPUgmXrCM7z2Lb9KxMuXLRL7ws8lge7S5AwtVbmmJQ1uh8O/m+745VkZiEs YaMi8M4MKm1lyP1sV4SRIoSJlAzsLEtwLy+rNVamWxhvN0drM72rbKDhYPVbSXgfAK24 o1qD07IsJmHXSQN4mqh7j5Z2IcxgOMmK5dD/yxGpQqUn74Xuiqe3xQLFWCJaDThpeReU KvOVJc1yi8ySr2q3oqX0Bv0vwB7oxT7iyxb4yyNGyFlia3s1LHPNDxGx10aN0Q0JZhPj Rpdg== X-Gm-Message-State: APjAAAXvVaQcC2tmSFwZi7k1jdh+YD9Czj5ZHCj9QXEz4/MhxR4thRGK qWCUJ/6t3l+99XW9rU44hg8BeQ== X-Received: by 2002:adf:f3d1:: with SMTP id g17mr26630404wrp.38.1566215742563; Mon, 19 Aug 2019 04:55:42 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:e064:6ffc:b2bf:7be8? ([2a01:e34:ed2f:f020:e064:6ffc:b2bf:7be8]) by smtp.googlemail.com with ESMTPSA id m23sm24214885wml.41.2019.08.19.04.55.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Aug 2019 04:55:41 -0700 (PDT) Subject: Re: [PATCH 01/15] drivers: thermal: tsens: Get rid of id field in tsens_sensor To: Amit Kucheria , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, Andy Gross , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org References: <9dc86fa912d9b6e21857598ad81ff88564468e5d.1564091601.git.amit.kucheria@linaro.org> From: Daniel Lezcano Openpgp: preference=signencrypt Autocrypt: addr=daniel.lezcano@linaro.org; prefer-encrypt=mutual; keydata= mQINBFv/yykBEADDdW8RZu7iZILSf3zxq5y8YdaeyZjI/MaqgnvG/c3WjFaunoTMspeusiFE sXvtg3ehTOoyD0oFjKkHaia1Zpa1m/gnNdT/WvTveLfGA1gH+yGes2Sr53Ht8hWYZFYMZc8V 2pbSKh8wepq4g8r5YI1XUy9YbcTdj5mVrTklyGWA49NOeJz2QbfytMT3DJmk40LqwK6CCSU0 9Ed8n0a+vevmQoRZJEd3Y1qXn2XHys0F6OHCC+VLENqNNZXdZE9E+b3FFW0lk49oLTzLRNIq 0wHeR1H54RffhLQAor2+4kSSu8mW5qB0n5Eb/zXJZZ/bRiXmT8kNg85UdYhvf03ZAsp3qxcr xMfMsC7m3+ADOtW90rNNLZnRvjhsYNrGIKH8Ub0UKXFXibHbafSuq7RqyRQzt01Ud8CAtq+w P9EftUysLtovGpLSpGDO5zQ++4ZGVygdYFr318aGDqCljKAKZ9hYgRimPBToDedho1S1uE6F 6YiBFnI3ry9+/KUnEP6L8Sfezwy7fp2JUNkUr41QF76nz43tl7oersrLxHzj2dYfWUAZWXva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zgFr/pxH5CbYJDk0 tYUhisTESeesbvWSPO5uNqqy1dAFw+dqRcF5gXIh3NKX0gqiAA87NM7nL5ym/CNpJ7z7nRC8 qePOXubgouxumi5RQs1+crBmCDa/AyJHKdG2mqCt9fx5EPbDpw6Zzx7hgURh4ikHoS7/tLjK iqWjuat8/HWc01yEd8rtkGuUcMqbCi1XhcAmkaOnX8FYscMRoyyMrWClRZEQRokqZIj79+PR adkDXtr4MeL8BaB7Ij2oyRVjXUwhFQNKi5Z5Rve0a3zvGkkqw8Mz20BOksjSWjAF6g9byukl CUVjC03PdMSufNLK06x5hPc/c4tFR4J9cLrV+XxdCX7r0zGos9SzTPGNuIk1LK++S3EJhLFj 4eoWtNhMWc1uiTf9ENza0ntqH9XBWEQ6IA1gubCniGG+Xg== Message-ID: Date: Mon, 19 Aug 2019 13:55:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <9dc86fa912d9b6e21857598ad81ff88564468e5d.1564091601.git.amit.kucheria@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/07/2019 00:18, Amit Kucheria wrote: > There are two fields - id and hw_id - to track what sensor an action was > to performed on. This was because the sensors connected to a TSENS IP > might not be contiguous i.e. 1, 2, 4, 5 with 3 being skipped. > > This causes confusion in the code which uses hw_id sometimes and id > other times (tsens_get_temp, tsens_get_trend). > > Switch to only using the hw_id field to track the physical ID of the > sensor. When we iterate through all the sensors connected to an IP > block, we use an index i to loop through the list of sensors, and then > return the actual hw_id that is registered on that index. > > Signed-off-by: Amit Kucheria Reviewed-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog