Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp367273pxm; Fri, 25 Feb 2022 09:29:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwB9kpY6QGUGgyw06py2wtKCLqYN0ZNSQ+6bh/r0v8Ckh8+5bcOnVs4AGN6lzzn5LRASpXS X-Received: by 2002:a17:906:ae4a:b0:6d0:9eee:e951 with SMTP id lf10-20020a170906ae4a00b006d09eeee951mr6829718ejb.2.1645810152151; Fri, 25 Feb 2022 09:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645810152; cv=none; d=google.com; s=arc-20160816; b=GXSCZ5RB4DcAVqG1OBf+gbQ+WA87V3WEXalvYP2NQiah7mn4P+S7N8AU+OlxsLhZ+U FIWRRKbOy51HxvH5tXuqCfDXvpy2JvKHBUXui5WVfzm24oRt/pm5jsGvNvksFB+uK/NH a4dvmgq1CsIIRnjF7RYC9XtIZdcowphYJcdyA0ykKHrTUEJDnd4TNM86PK66/dfK2IVa +G/b8lq3Xlnj7jhsyPbin2ubsr7iORvkMbOrDnbCO+ZKfRINM07JCG0lT8lyEF0uCYB1 LIc9eWwjGBxZNezIwGaXQynMrN6DVYicXUeK08xgugEmtMiFTONXVYdMysVkT9+zXawO ToCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=h+/c/SRTSFW4bUr7uZwCZvPDV13JvSZpjRW/Ah6HmPo=; b=en2MqAxowShSKK4W3SNFVKnd/bTJMm9jFK1bR6Gq/dTU7jlueKMqoaG6WKnB9qOYJY hYZPHrvdS3M6ArUaN9ALfxdPmCSGe7Zvq4U7tS7IpOs196ga0pwm3FHYca/NFbXqaD04 td28tiG92PkTDfpZG0IQIr2FvG4izPsHv8ctL2Rdf8Na9UNXiDZ014366QKs5FuelAsa F73uhkHYndbF2IRiLyAtvd8i0FRtnOkBYcsPvGSQaRFrl3qJrF7fUd2sFn5mdbGMXTOB 0BkbaCzPOh3SCbfg5TqF2OFRbNo5GAKi70APCIpzgnAuxXzJ7V1yDCOBPCR6gBTmcDZ+ 2bCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squareup.com header.s=google header.b=N4LP5Oh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=squareup.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a27-20020a509b5b000000b00410a2e0e2c9si1905651edj.279.2022.02.25.09.28.45; Fri, 25 Feb 2022 09:29:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@squareup.com header.s=google header.b=N4LP5Oh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=squareup.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237945AbiBYQsK (ORCPT + 99 others); Fri, 25 Feb 2022 11:48:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243300AbiBYQrU (ORCPT ); Fri, 25 Feb 2022 11:47:20 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B9AB2510D0 for ; Fri, 25 Feb 2022 08:46:37 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id f37so10354025lfv.8 for ; Fri, 25 Feb 2022 08:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squareup.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=h+/c/SRTSFW4bUr7uZwCZvPDV13JvSZpjRW/Ah6HmPo=; b=N4LP5Oh9x++Pocr8eHXKA2242EquvbDfLIw5chVlFT67q3k/SHnTT8xSaf51V0TpWM gbAzCWRp9vhBWkZ+eBJH7Bi92oFuDR7P0A4KuRoAHY5MdTlylTX7oSWabG6DM1/Zvusu 0KboIZS+04K1i4d8b/9DqYFPzt+FBktUNpbCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=h+/c/SRTSFW4bUr7uZwCZvPDV13JvSZpjRW/Ah6HmPo=; b=mPmo1LGRXzLPbib26e3ZaMryCMsy57Sk8qDCRAvvllYGC8Y7Kk/nJSqdhsSnj23AcO AuHpZJUxVGOH9AFygDT25YWPhceysof04EK9nsvZkQ3/CU/kM2nYjZTRBXBCNn+5rG88 /UC5DqgwITjV4R7ocJ88NP/wukMpmjP/OAc5CVOkHN194PHtcXhR1zgB5hanOZejtQVz LvqhUgpvnVVp1PF3mF/3L1HkBjbwQZRtskuSiE1oX7QiNDlseV5/qWdSYAzsic+TsUqP osBorUPDBSEVIInPbQYk8ZKV6s+lgCVsnYZnWACwR/7sqjcSIfUMHUETUPZJ0pehrTuL jQ9g== X-Gm-Message-State: AOAM5313SFa/Y88odQITm5dD/I0tlYi5B6aKIE+x1cTReOPFd5ZZsaOA SS8Ca/GCKDuUh9bW2qnOv8EGMdtjCaEwxhJ2w7dWTA== X-Received: by 2002:ac2:4474:0:b0:43a:7681:8fac with SMTP id y20-20020ac24474000000b0043a76818facmr5538482lfl.316.1645807595152; Fri, 25 Feb 2022 08:46:35 -0800 (PST) MIME-Version: 1.0 References: <20220120200153.1214-1-benl@squareup.com> <422bd780-354d-d4ac-7b7a-8060325fc13e@linaro.org> In-Reply-To: <422bd780-354d-d4ac-7b7a-8060325fc13e@linaro.org> From: Benjamin Li Date: Fri, 25 Feb 2022 08:46:23 -0800 Message-ID: Subject: Re: [PATCH v3] drivers: thermal: tsens: respect thermal_device_mode in threshold irq reporting To: Daniel Lezcano Cc: Amit Kucheria , Thara Gopinath , Bjorn Andersson , Zac Crosby , Andy Gross , "Rafael J. Wysocki" , Zhang Rui , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 25, 2022 at 6:02 AM Daniel Lezcano wrote: > > Some drivers that support thermal zone disabling implement a set_mode > > operation and simply disable the sensor or the relevant IRQ(s), so they > > actually don't log anything when zones are disabled. These drivers are > > imx_thermal.c, intel_quark_dts_thermal.c, and int3400_thermal.c. > > > > For tsens.c, implementing a change_mode would require migrating the dri= ver > > from devm_thermal_zone_of_sensor_register to thermal_zone_device_regist= er > > (or updating thermal_of.c to add a change_mode operation in thermal_zon= e_ > > of_device_ops). > > > > stm_thermal.c seems to use this patch's model of not disabling IRQs whe= n > > the zone is disabled (they still perform the thermal_zone_device_update > > upon IRQ, but return -EAGAIN from their get_temp). > > What is the concern by changing the core code to have a correct handling > of the disabled / enabled state in this driver ? (and by this way give > the opportunity to other drivers to fix their code)' It seems fine, is that the preference? Updating thermal_of.c to add a change_mode operation in thermal_zone_of_device_ops? Ben > > > -- > Linaro.org =E2=94=82 Open source software for AR= M SoCs > > Follow Linaro: Facebook | > Twitter | > Blog