From patchwork Wed Dec 7 23:24:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Collins X-Patchwork-Id: 631808 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 AD605C63703 for ; Wed, 7 Dec 2022 23:26:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiLGX0F (ORCPT ); Wed, 7 Dec 2022 18:26:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbiLGX0E (ORCPT ); Wed, 7 Dec 2022 18:26:04 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5748A88B5D; Wed, 7 Dec 2022 15:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1670455562; x=1701991562; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=X2Q0tE37VDp4hy/FQTBoYaG77TQ/eZFORCyeWxKtWp8=; b=dk6gBEs0i4XW3Hhv1f/zGkRElirSqoxEW5R+94VTiP4xOBZ7KeKj68W7 W3rv3U6/k7nZIrXcDZPfwTuxt7Uugpbx4/se/RPkDYx0GNEgM/zpKTmKs +jyaJ/0M6l7DpNgcJE0W0DTfELhY3o1sZXreT8uVB1WWXv7ingmI7Htib I=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 07 Dec 2022 15:26:02 -0800 X-QCInternal: smtphost Received: from nasanex01b.na.qualcomm.com ([10.46.141.250]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 15:26:01 -0800 Received: from hu-collinsd-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 7 Dec 2022 15:26:01 -0800 From: David Collins To: Daniel Lezcano , "Rafael J . Wysocki" , Amit Kucheria , Thara Gopinath , Andy Gross , Bjorn Andersson CC: David Collins , Konrad Dybcio , Zhang Rui , , , Subject: [PATCH v3 0/3] thermal: qcom-spmi-temp-alarm: add support for new TEMP_ALARM subtypes Date: Wed, 7 Dec 2022 15:24:55 -0800 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add support in the qcom-spmi-temp-alarm driver for the new PMIC TEMP_ALARM peripheral subtypes: GEN2 rev 2 and LITE. The GEN2 rev 2 subtype provides greater flexibility in temperature threshold specification by using an independent register value to configure each of the three thresholds. The LITE subtype utilizes a simplified set of control registers to configure two thresholds: warning and shutdown. Also add support to avoid a potential issue on certain versions of the TEMP_ALARM GEN2 subtype when automatic stage 2 partial shutdown is disabled. Changes since v2 [1]: * Added missing header in the third patch Changes since v1 [2]: * Updated the thermal API usage in the patches to work with the recent commit ca1b9a9eb3fd ("thermal/drivers/qcom: Switch to new of API") [1]: https://lore.kernel.org/lkml/cover.1670375556.git.quic_collinsd@quicinc.com/ [2]: https://lore.kernel.org/lkml/cover.1663282895.git.quic_collinsd@quicinc.com/ David Collins (3): thermal: qcom-spmi-temp-alarm: enable stage 2 shutdown when required thermal: qcom-spmi-temp-alarm: add support for GEN2 rev 2 PMIC peripherals thermal: qcom-spmi-temp-alarm: add support for LITE PMIC peripherals drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 407 +++++++++++++++++++- 1 file changed, 392 insertions(+), 15 deletions(-)