Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1466549rdh; Mon, 25 Sep 2023 13:47:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsdbMt06ujGsT42ybWFVGmXAAYmg+hN8Z83bFaT8KBT1VuQPnVxrcprhIG4EXCasRFAJqP X-Received: by 2002:a17:902:ce87:b0:1c4:4a4d:cc6 with SMTP id f7-20020a170902ce8700b001c44a4d0cc6mr1036300plg.19.1695674876889; Mon, 25 Sep 2023 13:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695674876; cv=none; d=google.com; s=arc-20160816; b=ygQFVH+rppzeupjU1J/3gtPf6+XmCEdcutkDHnnUy/MRHhyllEmjJqCbbhIMTbn3lO kLlkw0ioIywrw/xtw5/WIvyRrHMoLNXjV360QyDmOe/zMz0NnMb4qKEQcmLI/QnesdZW TG6OR5RQ6kLJv9bTuBGRytVp2Cx/mOvKVDZxNyyQT1PUM+fCZ6OEMjMO3TFpJCO/YL4c u1pqvw32AY7dJ/QzY52UlyU1d87728GKyvFB6pdvJGCqQp/LQ+WywJRRBGGhKeRRnNAJ jfBH8bbJFFAtaaaPBJ3slrHT4nK3MFly75irGsdXjjInf1VwtCUu5KYsUR8NAIzkeQ1U wM0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=12lvvZVko7HwcFd7BVr7FRaCYZcG3/6yf/N02oFBsK8=; fh=a+bqIUpyEnR9NnMuoMuCxNjgsMOoBEvgrgBB5OT52ts=; b=EiFw2TlbzNlD4E1nNxsTA3RakgRk1oDR5vXZ6lLCRYrV2cCFYWHdi6eTO5hocZBaPi J6+hdkjWvfkpaJr86HLRCSw9bIhIpC/xQE7onE0yu/rG50HQidFVlZYVSbQgoMsTGv95 PMA1GZQ93q2LUG7gAWqYMlkppPFgmfjP7/7lZw+IEa6ZTAKlEFwn6RChjcTgLjGerIk0 lxN+8959XXYyCd+H+CEE9wR1MZVZHqAP7uf3k3oy2zNUlYviTBJrwBdaIl/YEzlfu2gX cCoP9ZMaBEcIIAF/61itzTVEmaVCTeUMzC2NOMZW/+AxuvVXdQN0B5MPhSXnVEXYvXbq yttg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=znnFwVGn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n13-20020a65488d000000b0055be9543340si10588666pgs.872.2023.09.25.13.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 13:47:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=znnFwVGn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0089F82372E8; Mon, 25 Sep 2023 07:53:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232388AbjIYOxU (ORCPT + 99 others); Mon, 25 Sep 2023 10:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232686AbjIYOxM (ORCPT ); Mon, 25 Sep 2023 10:53:12 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61934192 for ; Mon, 25 Sep 2023 07:53:00 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2bb9a063f26so107906551fa.2 for ; Mon, 25 Sep 2023 07:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695653578; x=1696258378; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=12lvvZVko7HwcFd7BVr7FRaCYZcG3/6yf/N02oFBsK8=; b=znnFwVGn+zck2eznawy53HuyrlhwhEcgK90aK6K8nOemWEjHO5lc1uOQYuVTiZaTwf shGOESxGUXmzoqCzqUkLzDn5KjK/kGSnjqkLWxL/rrgzkK7axQq9kJT62xROgrazZV8L Er9u6sq3F1fGoca3K4gY33FCwvRvS2VO3gsjnyOX90CiRsCfrQkRbHgXeXP6tzQFH7Ic x48he8NVvebbENIMVc2Bjkgu3WOkf/3YSW5jR4CaJkI4uxu0tsktnlNbIuqq8ZSO/8Ac 22Xwd0Mlnot3pcqemqLyIbSQfGHee6RYyUB1DJbYhIDvseBqgQtMD+SX4pPm65govz9u /06g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695653578; x=1696258378; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=12lvvZVko7HwcFd7BVr7FRaCYZcG3/6yf/N02oFBsK8=; b=M1kitVELBoXkg/HVz+gKIatlACQYbVJ88umenxMh+XbpbhkixgvVVP939oFYXPHhHG QbVmzmirG1L7ZQkIxrNbPeoEE3BDiWfvXR+tqGesG/DzB5M6skseNabpeSqW8Sp1YEZ6 A5IITwvWfpTWkwNPXYjIvWqTHGKeOkpz5eH7rjWU+e+1om6OWByYGqgO3/4jRaFntKM5 dKoH1b82R695j0JHFtHMWbY9esB6Q1jN7CwWj0RsKv4rSMcgLRk9/0B3DYrwYH3yJ1I/ MIdK/lXdijK0lMwZ9WMnAP2GMdW+l0GnIt4UU8m9tAjXPD0yTK9AX1UPuOHGdEcEOVGu ISbQ== X-Gm-Message-State: AOJu0YyX/3duTI80rMbZpHciHZW08LNOIIl6xYvwu1OLRHrAfblKJ4Gy KGk2fyeZr2HMAdSGGeNhyIo1Lg== X-Received: by 2002:a2e:984e:0:b0:2bc:eceb:6a4b with SMTP id e14-20020a2e984e000000b002bceceb6a4bmr5683898ljj.28.1695653578381; Mon, 25 Sep 2023 07:52:58 -0700 (PDT) Received: from [192.168.1.172] ([93.5.22.158]) by smtp.gmail.com with ESMTPSA id md1-20020a170906ae8100b009a1be9c29d7sm6455357ejb.179.2023.09.25.07.52.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Sep 2023 07:52:57 -0700 (PDT) Message-ID: Date: Mon, 25 Sep 2023 16:52:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v4 2/5] thermal/drivers/mediatek/lvts_thermal: Add suspend and resume Content-Language: en-US To: Daniel Lezcano , AngeloGioacchino Del Regno , =?UTF-8?Q?Bernhard_Rosenkr=c3=a4nzer?= , 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 Cc: 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, wenst@chromium.org, james.lo@mediatek.com, rex-bc.chen@mediatek.com, nfraprado@collabora.com, abailon@baylibre.com, khilman@baylibre.com References: <20230530195132.2286163-1-bero@baylibre.com> <20230530195132.2286163-3-bero@baylibre.com> <371790cd-5a7c-8fa6-cc38-3a3680525092@collabora.com> From: Alexandre Mergnat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 07:53:24 -0700 (PDT) On 23/08/2023 09:48, Daniel Lezcano wrote: > On 31/05/2023 10:05, AngeloGioacchino Del Regno wrote: > > [ ... ] > >>>   static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { >>>       { >>>           .cal_offset = { 0x04, 0x07 }, >>> @@ -1268,6 +1300,8 @@ MODULE_DEVICE_TABLE(of, lvts_of_match); >>>   static struct platform_driver lvts_driver = { >>>       .probe = lvts_probe, >>>       .remove = lvts_remove, >>> +    .suspend = lvts_suspend, >> >> Should we do that in noirq handlers? >> We're risking to miss a thermal interrupt. > > I'm not sure missing a thermal interrupt is a problem in this context > but we may go in the irq routine with an undefined state sensor setup > (eg. the internal clock stopped in the suspend and then read the sensor > in the isr). > > IMO, using suspend_noirq and resume_noirq may be required here. > > Alexandre are you taking over the next iteration? > > Hi Daniel, Sorry I missed your message... I don't think taking over the next iteration, Bernhard should continue. Let me check internally to be sure. As I understood, the next change should be heavy. -- Regards, Alexandre