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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17013C61DA4 for ; Mon, 6 Feb 2023 14:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjBFOdc (ORCPT ); Mon, 6 Feb 2023 09:33:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjBFOdb (ORCPT ); Mon, 6 Feb 2023 09:33:31 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 105DB234E2 for ; Mon, 6 Feb 2023 06:33:29 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id ml19so34899029ejb.0 for ; Mon, 06 Feb 2023 06:33:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RHaeRZqGHYAtIxM6Dz50lpu040N8lRz141Rm2pL5rVo=; b=jF1s45DfufJwWZ57OB4BhZN/fdCEcCANg5872Lpc2HV2Ir2Mncxbo/xAhZJfUnR3L+ zj/iqQibSO2essYu11V5ZoaCOO1G8tKqVEw+x1gL3ETrubdC6B68mNHS4+lJGYXSzrXu orW5CjFvL/UrHYWJjZ8cV+5pZ+/s8jq4GoMsOmhkPKIWkNXm0D6Gnilexls3a7htxx6D /25skRRaDV+Gz0xrN/fO6uxRvlSPOWnSXL06w/EXUgmzB9QU+iA7gSZAByL4V9Z/WFL3 g4urT34lwmdyWPzF1tFaoARTuuhrRNCW3FK5ZrJQXnjAxjvMTBeUgl7MN1sDOzeoiag9 IQNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RHaeRZqGHYAtIxM6Dz50lpu040N8lRz141Rm2pL5rVo=; b=hO7jM9i2X6+k93a/r0mcDmpqr76iGMsLBTJmQPMI4fZKjoCaMPYfyZmbQ+giS7jieX hRAUsBGRhIqDQ8Qh/98j7aXNm9D7PQQs2Z20Qh0whs7xcIV0EMFcuwnxmERSk2ie6V6G H8ds6bT9ihv9TLO0B7/6tPE5HgXU4gmkI14SuNwR4K1mAOShQoGlLnQup1DAlGZ4+mR6 MILwjL1ngsyqBjR8CXZaZfrsb5nlrLJsI8LByvoZ8JqVtnfDOVqofBjnBQthvlY3aPpy N1TE/rZlVKtVYPxcEEz+RJsMCylEgeANEsiLqT5OvM0K+F+BduCWMdT7fhFLhyDSYfxV opMg== X-Gm-Message-State: AO0yUKXITnCBgUlV0l5al5lPrQUZatjFJ7m+GdRa7N88XEjA9WlkO2ea y1iHvW0GdIS1270430007IuOH3x5j6ayLU5t3JeiMA== X-Google-Smtp-Source: AK7set9F4u722OkpXBvTbwVo7eCQ7QLvmQTwkMqIg2LACU7M2aYX2ATRDdPXXoHFDCXc6U7xCq0cgsgND0rwHzgdHtY= X-Received: by 2002:a17:906:1803:b0:7c0:f45e:22ff with SMTP id v3-20020a170906180300b007c0f45e22ffmr6633853eje.104.1675694007671; Mon, 06 Feb 2023 06:33:27 -0800 (PST) MIME-Version: 1.0 References: <20230124131717.128660-5-bchihi@baylibre.com> <20230131153816.21709-1-bchihi@baylibre.com> <20230206140713.GB15176@linaro.org> In-Reply-To: <20230206140713.GB15176@linaro.org> From: Balsam CHIHI Date: Mon, 6 Feb 2023 15:32:51 +0100 Message-ID: Subject: Re: [PATCH v12] thermal: drivers: mediatek: Add the Low Voltage Thermal Sensor driver To: Daniel Lezcano Cc: Krzysztof Kozlowski , angelogioacchino.delregno@collabora.com, rafael@kernel.org, amitk@kernel.org, rui.zhang@intel.com, matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, rdunlap@infradead.org, ye.xingchen@zte.com.cn, p.zabel@pengutronix.de, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, khilman@baylibre.com, james.lo@mediatek.com, rex-bc.chen@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Daniel, On Mon, Feb 6, 2023 at 3:07 PM Daniel Lezcano wrote: > > On Wed, Feb 01, 2023 at 08:55:07AM +0100, Krzysztof Kozlowski wrote: > > On 31/01/2023 16:38, bchihi@baylibre.com wrote: > > > From: Balsam CHIHI > > > > > > The Low Voltage Thermal Sensor (LVTS) is a multiple sensors, multi > > > controllers contained in a thermal domain. > > > > > > A thermal domains can be the MCU or the AP. > > > > > > Each thermal domains contain up to seven controllers, each thermal > > > controller handle up to four thermal sensors. > > > > > > The LVTS has two Finite State Machines (FSM), one to handle the > > > functionin temperatures range like hot or cold temperature and another > > > one to handle monitoring trip point. The FSM notifies via interrupts > > > when a trip point is crossed. > > > > > > > (...) > > > > > + > > > +struct lvts_domain { > > > + struct lvts_ctrl *lvts_ctrl; > > > + struct reset_control *reset; > > > + struct clk *clk; > > > + int num_lvts_ctrl; > > > + void __iomem *base; > > > + size_t calib_len; > > > + u8 *calib; > > > +}; > > > + > > > +#ifdef CONFIG_MTK_LVTS_THERMAL_DEBUGFS > > > + > > > +static struct dentry *root; > > > > How do you handle two instances of driver? > > For now, we can put the entry in /sys/kernel/debug/ Yes, sure. I will do the necessary changes. > > I'm preparing a debugfs series for the thermal framework and that will provide > an entry to hook in for the sensors debugfs if available It would be a good feature! good luck! Best regards, Balsam.