Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4674134imm; Mon, 14 May 2018 10:59:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrRg8PBMxoFyH1gfx8s0VVXEDTdwlrCIZRITX7C4YgVqp1oF3j68WCgo7GyQ65a/0ep9hM3 X-Received: by 2002:a65:46c1:: with SMTP id n1-v6mr9427337pgr.62.1526320761909; Mon, 14 May 2018 10:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526320761; cv=none; d=google.com; s=arc-20160816; b=ixJoFQlN5lB7Ropyc1YycAXME82/7RsHUDanUHOvkFxYbfh/XZD/uH11X/EmA5B884 8/DumotcWB/Qc/1OmoAP+BbI1xq0Q1VDWnPdVWjfNEcp2sN4rz4WgVjBftSOtzMeWH4K 3pI07F/Thi+xbOFpYgNc/Tx8P/A753NbJzofqw21Zi7Rg0qXSE3BzOjSooA+3yjKX3lT P0Jy5KFol3XVbrumt9dsLqPpww/cgHCxafOclZw9P/c5GgdF723Ny7OK9BylSuyG58t5 eFa3SPXUNyIhtl0RkKH08r5ebz2+e4F5YZPzM+N+cX/RZIKBCVZqMcw1pVoObSatJy0A imJg== 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:dkim-signature:arc-authentication-results; bh=W8lBzJlE81MZPGheKBhfolTmBDrB1NHyCuIUQDfbGnU=; b=BMztT1OS9moicSpqolvOUszg3/0/58JoJ+7q+ksiu3v85sWbv0MWmA6Eg0K9uuwJNi NQBHysNrPwE8fazbHufbKNTzwjlAo2P0C+S7gN1lSXaptR7r+kGLYZrSK/pjWuaqQL4y U87Nx3Zh3fgjXpy6UpCcAkuO+gAWuuz7YIxKIYeOHIhsmN+n5GxB9CUX1kWBAeYqC6+2 E0GKS5iK6fo9enjRhLBChEJkwt66eG4BylRo4kTBebi2HW5UDjxpbjxRKsBVRSPY4rTt S8Gpk3us9gdaz+hGD7+RuMU1YsZ6IhOxvOkOMNRFj6FUEIACaUp0sVxGcDTUPcgKUirw CRZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=buFQcjJD; 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 f9-v6si3586326pgo.334.2018.05.14.10.59.07; Mon, 14 May 2018 10:59:21 -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=buFQcjJD; 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 S1751961AbeENRqz (ORCPT + 99 others); Mon, 14 May 2018 13:46:55 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:45384 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbeENRqx (ORCPT ); Mon, 14 May 2018 13:46:53 -0400 Received: by mail-pg0-f66.google.com with SMTP id w3-v6so5786745pgv.12 for ; Mon, 14 May 2018 10:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=W8lBzJlE81MZPGheKBhfolTmBDrB1NHyCuIUQDfbGnU=; b=buFQcjJDY7ojJERxPEUjElWsZVta7CCdcuGMpr4MiZTfPtRQ6528W9RRhTmauJJhke 1DU47lwWO0fVUFM41v/fOSSGbIzlFD2leA9eyY3jrlsNdKR9PkNRX9mLbKY6nrO2loHo 95qtcMnGng3Vw3eX/zsT2rXqVa2BkGLIE8K68= 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=W8lBzJlE81MZPGheKBhfolTmBDrB1NHyCuIUQDfbGnU=; b=B+Eqxw3PlBx16pqtsnGOQ5TE9KIHKkBYuw8lymqS9S0L+ZHwNgoYI+QJIrNp+IBgGv Y5qxPFWCBEPmQ/rQ4B/bVNL5jBBIWwbMVpi4LpI/prMNsINP8xDTgD5U+GLyCOFCs2jX 09iOoJtzTNEg4Yd5HJvl/Z/CTWvqddRUnYBhMgFPPPZf4m0+Nx4aFONODHRkgc9emIrV a12Kyb5f70lmRCSZdSqCpy4peYaRy3k8r7zczXYwx6OnXnq5Sg2eiEaDQClV2t+/g9oH V8Px+3iBudJ2QOQ8A2II75j0tu/Id7wOMmVNyVFbwFeEJu74zPkiQrWmvPmgJN8rDzT+ EA3Q== X-Gm-Message-State: ALKqPweaUK/W51u2YDQZrMMbhN9K664Jj2IlxquTIZC8X2iD0lSo1fho xR6IzVds0AT2v34z4dHj26Zogw== X-Received: by 2002:a63:6fcd:: with SMTP id k196-v6mr1901742pgc.376.1526320012375; Mon, 14 May 2018 10:46:52 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 73-v6sm21667993pfo.153.2018.05.14.10.46.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 10:46:51 -0700 (PDT) Date: Mon, 14 May 2018 10:46:49 -0700 From: Bjorn Andersson To: Amit Kucheria Cc: Zhang Rui , Eduardo Valentin , Rob Herring , Mark Rutland , Rajendra Nayak , Linux PM list , devicetree@vger.kernel.org, LKML , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] thermal: qcom: tsens: Allow number of sensors to come from DT Message-ID: <20180514174649.GM14924@minitux> References: <20180507235339.8836-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 14 May 07:45 PDT 2018, Amit Kucheria wrote: > On Tue, May 8, 2018 at 2:53 AM, Bjorn Andersson > wrote: > > For platforms that has multiple copies of the TSENS hardware block it's > > necessary to be able to specify the number of sensors per block in DeviceTree. > > I assume you want to replace the hardcoded num_sensors values in the > tsens-xxxx.c files with values in device tree atleast on platforms > that use devicetree? > Right, e.g. in msm8998 we have two blocks with 12 and 8 sensors respectively. With the patch we will overwrite the num_sensors with a value from DT, iff specified. As probe will fail if num_sensors is 0 we can reuse ops_8996 and just not provide num_sensors for 8998, hence requiring it to be specified in DT. PS. Looking at the register spec 8996 too seems to have two tsens blocks, so in order to access sensors off the second bank this patch would be needed (and would work and be backwards compatible). Regards, Bjorn