Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp420980rdb; Sat, 27 Jan 2024 12:11:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9fwDftcRj01aQ9JKE1yNgVlgQmnWdkj0Ahz5X5NjUOS1nXGeRLudWPxbwclqo3ixJyKxE X-Received: by 2002:a17:906:1187:b0:a34:9d98:ac1f with SMTP id n7-20020a170906118700b00a349d98ac1fmr2944023eja.24.1706386297246; Sat, 27 Jan 2024 12:11:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706386297; cv=pass; d=google.com; s=arc-20160816; b=K0wfyi9W4gd/ukoHj7YxzG/U6b/oxqFmVt/pOBLaa5TfY1QERajjn9RhKu+ZRdxpyq 4qyDKOCyM5ru0fQU2LeiETMFbFbpA1zXRpVHwxZh4nAmvKqYE64hTktNxEeBxTVyMG8/ /jq9APw7IsPqm5G08hsTL1EGhCLKPdFH7Ac7z19xM1qp41YAuQxMQXXozRmJfcTwJWhX T84zFzfXQb4d+4z5ROeixXvLalQb/960xXZQuHNHimtw26F5yZfV/wGwmttgBlCKSyJ4 GiTeE/o2gaFstajo2m57DMdcFZ9bxpaXbymcPVdVB2/B1aOK3ESwhpesYJp73w5687Rk THHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=sJ9tgEx/4vCHI7sx+ldFQbW4TAUPdYxPct5X6gZ9CBY=; fh=dvdYqdA1QHlNVeOtgdPU8QPIAFOWbQDGClQK8EkPtXQ=; b=edKa5OXMhJKo1nR32K4Z1b2LVWpsnao70rNgQS8m6IglkL6BrXGeCL98cHQbs45Rre ql6NZds4TtKJ6iS681pCz/5B6bohxeXKnQPvDc3vFW0k0BuoG+Zp07DUR6wfVRRxylUT 9b4bv9WLR17TN841j63chKLKoKXVk3JE7ve7z3MpDFMYaErflSeThD57O0SJz75o7G4I Jxcl/ybv+KlBZRROtCLtPKlTHDgjI1Ar0A3/aOozZ9J5Pl330xHvsEE7LA4Dm7g8QFKo ro9aNBrkGyXFRssY4hqmf4m9ndO16lVfHAY0WYX+ZHXAdiqz6opWp/4/2pwSpcPH1e0L 6k3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bxezkgEh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f16-20020a170906139000b00a318b332e98si2052171ejc.195.2024.01.27.12.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 12:11:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bxezkgEh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41388-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F00481F23690 for ; Sat, 27 Jan 2024 20:11:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6357E2E834; Sat, 27 Jan 2024 20:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bxezkgEh" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 886A82E632 for ; Sat, 27 Jan 2024 20:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706386283; cv=none; b=dxujjgArxytepfQk/jkQ+fvp096OC2dvA38onfaFL8uRFEaqiuKvwdDsgEeb9ZNH57gIMECKKZ9DXRvMSfAukOMzWVDBjfnkX0u1EpepxbWScYC/Ux3ylRapGKyyi2FDQb/6j24q9XR9+y2v1IbMvu77KC+rGDC2eyYcUvDvpKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706386283; c=relaxed/simple; bh=sJ9tgEx/4vCHI7sx+ldFQbW4TAUPdYxPct5X6gZ9CBY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XTmz+OP4hukdlvXV+H+E5N25cCFeSienGvVdycNZmvdeS3VJ9Sdga4T1pThSqtutPqkfK+QawjTmv74ENS3N0vEVrdKBmhbP3hcDyfqqoXBAungnGdtP8SPJAA9d3X81eQwmTtKzDG9jR5hBOnHCEPoT8ycH859IfmZZVdR8Myk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bxezkgEh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F6A5C433B2 for ; Sat, 27 Jan 2024 20:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706386283; bh=sJ9tgEx/4vCHI7sx+ldFQbW4TAUPdYxPct5X6gZ9CBY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bxezkgEhriSMgNo0yNPHHLoWx4LU0Lk5qXWlnQdW11Ne00KcgZCK4QtRpNvJDAv8x alc8idCqxuWYUMDku49533/NIVTufuYgE4jQ1v+ssHpQdHXQrOni80813BcspOE/GE yTIUdp+WJ6qVtVdVXJIZbqslfXYj7v3wzAY9QQCz+GU+LbsWMpLSD1ps9Zrml/HR94 LBh0mP2cDibEniijYevyN31NO3DUFvHFZIDXZt0j04MajRXIefg3vVZjvjQg0sYv3E mwENMf8cMZ9DnP/sYDY0a9WwmpIlbmHOw2O+0xUNu6xZy30zID7f6U4udgGUOgkanm qaQrUmS40tnFQ== Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-55eb1f9d1f0so1182360a12.0 for ; Sat, 27 Jan 2024 12:11:23 -0800 (PST) X-Gm-Message-State: AOJu0YxX5l72jrnP5R1bA5vxU1Ui8Yy0gBqog4S6TYPWmsMx0zP4moCt G2ZF1z7kSZHQJJQkOTlPVS0nnAGgLwxGEgXBcCMdZHDd9o46VohWBP9KuQdngwEjRn4XWitikMx 29lqQ9cA3SPQa6O7UdO7zZu3eSbfsREvc+7X3Qg== X-Received: by 2002:a17:906:5587:b0:a35:4331:8971 with SMTP id y7-20020a170906558700b00a3543318971mr1555326ejp.31.1706386281470; Sat, 27 Jan 2024 12:11:21 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240122100726.16993-1-quic_priyjain@quicinc.com> <548e2f24-a51e-4593-9463-09506488c70e@linaro.org> In-Reply-To: From: Amit Kucheria Date: Sun, 28 Jan 2024 01:41:10 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] thermal/drivers/tsens: Add suspend to RAM support for tsens To: Priyansh Jain Cc: Konrad Dybcio , Thara Gopinath , Bjorn Andersson , "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_manafm@quicinc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 24, 2024 at 8:55=E2=80=AFPM Priyansh Jain wrote: > > > > On 1/24/2024 6:04 PM, Konrad Dybcio wrote: > > > > > > On 1/24/24 11:42, Priyansh Jain wrote: > >> > >> As part of suspend to RAM, tsens hardware will be turned off and it > >> cannot generate any interrupt.Also system doesn't want to abort > >> suspend to RAM due to tsens interrupts since system is already going > >> into lowest > >> power state. Hence disabling tsens interrupt during suspend to RAM > >> callback. > > > > Is that a hardware limitation, or a software design choice? I'm not > > sure I want my phone to have thermal notifications disabled when > > it's suspended. > > > Konrad > > As part of suspend to RAM , entire SOC will be off, this mode (suspend > to RAM) is not intended for Mobile product. Tsens interrupts are not > disabled as part of suspend to idle(suspend mode for mobile). You should hide the callbacks behind the CONFIG_SUSPEND Kconfig option so that it only gets enabled when S2R is enabled.