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=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 0A25BC5519F for ; Sun, 29 Nov 2020 12:59:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B478020829 for ; Sun, 29 Nov 2020 12:59:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="lUSUlXk7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387441AbgK2M6z (ORCPT ); Sun, 29 Nov 2020 07:58:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:49354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727676AbgK2M6y (ORCPT ); Sun, 29 Nov 2020 07:58:54 -0500 Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8476720855 for ; Sun, 29 Nov 2020 12:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606654693; bh=ELHNBHt4EqshhUGNuAZ5/xfd1MTVG6aw9M7tUezJtcw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lUSUlXk7ni4Qqk6/GO9uT9RLb9C5iar9YSvOCMP0dsEiOe4Y/pgDquhrtfDKXxuYK /QrbLJEnAhyNpDv3JXiIf5sq0w5jq8QqwKvjvP4zwRa8hpG21qVSLkGxCle5Ebhw6j Ldud0ctji2XFmdAof/2QF5pjW0PIkwMKE75WiLd0= Received: by mail-vs1-f50.google.com with SMTP id q5so2410133vsg.0 for ; Sun, 29 Nov 2020 04:58:13 -0800 (PST) X-Gm-Message-State: AOAM5335TXASzp4AQSd51+axV01XXHHdR5u86+q7GrdrjDRQK2/3BWw9 qb500oshTTtEI5sP0bgFL0uAehASV43d0hwBq5Eqeg== X-Google-Smtp-Source: ABdhPJzhn1fsp9EHXvRGhpUoP1eGJoSFTv0W/yDjP/8SVVYy5I7YyO+aQKszItKWdNicTfimgy14oUOjpOK0S4oleTM= X-Received: by 2002:a67:ce1a:: with SMTP id s26mr12147763vsl.0.1606654692685; Sun, 29 Nov 2020 04:58:12 -0800 (PST) MIME-Version: 1.0 References: <20200814134123.14566-1-ansuelsmth@gmail.com> <20200814134123.14566-3-ansuelsmth@gmail.com> <20201125122228.GB23592@ansuel-xps20.localdomain> In-Reply-To: <20201125122228.GB23592@ansuel-xps20.localdomain> From: Amit Kucheria Date: Sun, 29 Nov 2020 18:28:01 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v6 2/8] drivers: thermal: tsens: Add VER_0 tsens version To: Ansuel Smith Cc: Amit Kucheria , Andy Gross , Bjorn Andersson , Zhang Rui , Daniel Lezcano , Rob Herring , linux-arm-msm , Linux PM list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Nov 26, 2020 at 2:16 AM Ansuel Smith wrote: > > > }; > > > @@ -441,6 +442,10 @@ enum regfield_ids { > > > CRIT_THRESH_14, > > > CRIT_THRESH_15, > > > > > > + /* VER_0 MIN MAX THRESH */ > > > + MIN_THRESH_0, > > > + MAX_THRESH_0, > > > + > > > > Consider reusing LOW_THRESH_0 and UP_THRESH_0 for these? > > > > As we already have defined LOW_THRESH and UP how can we reuse that > regfield to define MIN and MAX? > We are using MIN and MAX THRESH on the apq8064 to mean LOW and UP THRESOLD, isn't it? IIUC, It was just named differently earlier. When the driver is loaded on the apq8064, only that one field will be use since v0 has a single threshold for all sensors. When the driver is loaded on new IPs, all fields will be used.