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=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 63E8BC3A59B for ; Sat, 17 Aug 2019 04:01:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 392BF21743 for ; Sat, 17 Aug 2019 04:01:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ixPLfl74" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbfHQEB4 (ORCPT ); Sat, 17 Aug 2019 00:01:56 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35064 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbfHQEB4 (ORCPT ); Sat, 17 Aug 2019 00:01:56 -0400 Received: by mail-pf1-f194.google.com with SMTP id d85so4128066pfd.2 for ; Fri, 16 Aug 2019 21:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:mime-version:content-transfer-encoding:in-reply-to :references:subject:from:cc:to:user-agent:date; bh=41DUNyHfGDYGOFlacUiPuaR42aKSRfTphWQX5UDtD6o=; b=ixPLfl74xidyeGDAyESYrtkRAaaOMaad+qjnu1XULZZimjYFtEn181iLZpP1ym0gTA PyreXM8okqrfOAAnHjzFtE/FnJKkFAp8pd4+9ldH2Wlq/lH1I1IyQLfzS8xi6udjNbnC tvTGPUZ1nfHWe6ixN8ihl34CXoXxiNO57br9U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version :content-transfer-encoding:in-reply-to:references:subject:from:cc:to :user-agent:date; bh=41DUNyHfGDYGOFlacUiPuaR42aKSRfTphWQX5UDtD6o=; b=ZpZKKyBBYDObe2JJ3NQPY9JjAQqjqWQMIstwdPLTVDlgXfEgNOkq8c2CWkMt3q12V/ WOaw/iA9iTqNkSezHyAnQMGghHa/1QWQCCNwQhSbW33C7HCekmv7g8IjI7ZGJTk0auzI C2MSgkH2V/KSR6Dk8hH/fjaufW/PaOGeVxpMAFT8UisukTGscoJsRjGWNEtz945A4vpj +SfKxj2l5jqsZ1jT8KmR1SyGEdGQ5MDUq+qSMwMKptwpVo4+TmIIrzTJ6HyZcf7vAMf7 lnkWYYg4dPvIzQX2Cep6g0NhG4ad5M37c88OSursMFG3kJNn7X2E4kUSkFULuuiADCgB qlQA== X-Gm-Message-State: APjAAAVL8Pbt/eHBW/0Ha1NX90za/Fdt+6j8DlVkJpf+MYsxW+FPzlor 95IaHR0cBXbnbzYyHDHhOX9FG59GZtBztA== X-Google-Smtp-Source: APXvYqziDXUQ6baa9UVufZvuqukFBB8IgCHuhJBV0YUPgaMdR05hRMBSBQY/Mi09HZoEtziD5Ch3kA== X-Received: by 2002:a63:1046:: with SMTP id 6mr10700399pgq.111.1566014515650; Fri, 16 Aug 2019 21:01:55 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id j15sm7429996pfr.146.2019.08.16.21.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2019 21:01:55 -0700 (PDT) Message-ID: <5d577c33.1c69fb81.f966d.6963@mx.google.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <9dc86fa912d9b6e21857598ad81ff88564468e5d.1564091601.git.amit.kucheria@linaro.org> References: <9dc86fa912d9b6e21857598ad81ff88564468e5d.1564091601.git.amit.kucheria@linaro.org> Subject: Re: [PATCH 01/15] drivers: thermal: tsens: Get rid of id field in tsens_sensor From: Stephen Boyd Cc: linux-pm@vger.kernel.org To: Amit Kucheria , Andy Gross , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui , andy.gross@linaro.org, bjorn.andersson@linaro.org, edubezval@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org User-Agent: alot/0.8.1 Date: Fri, 16 Aug 2019 21:01:54 -0700 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Quoting Amit Kucheria (2019-07-25 15:18:36) > 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. >=20 > This causes confusion in the code which uses hw_id sometimes and id > other times (tsens_get_temp, tsens_get_trend). >=20 > 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. >=20 > Signed-off-by: Amit Kucheria > --- Nice cleanup! Reviewed-by: Stephen Boyd