Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp155298rwb; Tue, 6 Dec 2022 18:50:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf71A2ncKKXjL6JoZEo0ysoO7bms568TnN6u1cobs0KgwnnJ5mx7kgxf8WE2VulU9xKbZpkB X-Received: by 2002:a17:906:3411:b0:7c0:d3e6:cce with SMTP id c17-20020a170906341100b007c0d3e60ccemr14130901ejb.742.1670381433372; Tue, 06 Dec 2022 18:50:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670381433; cv=none; d=google.com; s=arc-20160816; b=y9b8JT74dAzMVjstohiTNJcxGjtQGWem/v+iFNUuF7agrm0u7u8ugyKpT9IhjuQjPp imrvUZUbc1fd9YS85HoJzVrZdnBrqjFo7APW0l445EYF9WUixq/gg9LZR+Vo3Zsfy7Iz dP6U1w8F2IG5rgmNxi41WPNJJnISaj+SSsybuVqru2wexaC6edkw0xhraOIBDSwP5wFR lxZ18uG7c4iJYHFZQ7A+qQgTeAElbi7Zv098kMCMKu3NMCBHFXI6LSYvxRHyinoxxJll KbP8bON5snA7E41BTHSvnyKhMQmQoGYEw6jWEmzs1zRR6aSZlvG7z0vp06r6EvHTs2bF 2QDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5gvLHz9/RmuCHyZaZr4kvK5GKQwiKL9wboByT6H5TWI=; b=wv1TzlAr8WXueTfJfYl894fVPECwUUj9+dk/YDhtI0igr7SNGd9lsbKV4vibO1svpO P5GCtgZT1vFMAvvhojanyxP3EsKRSHLCsjqJExekHP/yeVmaVoRPsRr5YhuLPRSmu8CH I8A9eMhkj+Hn7wST9Iox/RglFmTzV7MY+qfa4CedtfovtxihnGNRh87SpGy03o0/2ZoM aWG0ugbBcbJ23Z/6CdtccVGZiLFecsIzwUeQ5Rk/lD8OsPb07O/l5c8S4hEtCsrGEQHZ 070fBIdC8DN51LC5f52K1U7of2QOjK+9rezOqYXvsfOiaTcMa0XERyF4+P0ksMm7UixN VoCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=Bs2gUsTI; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a05640234cf00b0046649cd87c2si4045425edc.32.2022.12.06.18.50.08; Tue, 06 Dec 2022 18:50:33 -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=@quicinc.com header.s=qcdkim header.b=Bs2gUsTI; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbiLGCFZ (ORCPT + 77 others); Tue, 6 Dec 2022 21:05:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiLGCFY (ORCPT ); Tue, 6 Dec 2022 21:05:24 -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 547B840474; Tue, 6 Dec 2022 18:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1670378723; x=1701914723; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5gvLHz9/RmuCHyZaZr4kvK5GKQwiKL9wboByT6H5TWI=; b=Bs2gUsTIgqzVSpuh+Rf7mhYT/aLA1W7h0wgRU8s/lXDka2putKWN8SW8 ea8zicre4VddirgWO9RT+/c3Mntfsf9iFZimAkMwiYWpqK/l/Jirvxl3B 059b851QpxiGqxD6PyF3YQE5jK/kR2kyczDZnbs7ZiuNDXKisg3zRKJND M=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 06 Dec 2022 18:05:22 -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; 06 Dec 2022 18:05:22 -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; Tue, 6 Dec 2022 18:05:22 -0800 From: David Collins To: Amit Kucheria , Thara Gopinath , Andy Gross , Bjorn Andersson CC: David Collins , Konrad Dybcio , "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , , , Subject: [PATCH v2 0/3] thermal: qcom-spmi-temp-alarm: add support for new TEMP_ALARM subtypes Date: Tue, 6 Dec 2022 18:04:43 -0800 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nasanex01b.na.qualcomm.com (10.46.141.250) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 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 v1 [1]: * 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.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 | 406 +++++++++++++++++++- 1 file changed, 391 insertions(+), 15 deletions(-) -- 2.25.1