From patchwork Wed Dec 7 02:04:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Collins X-Patchwork-Id: 2696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3163623wrr; Tue, 6 Dec 2022 18:09:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf5KlpC4I7lYyQOJzZqdbw0HOHqrSar3X4CAiPi7bGarUAxi22ChqU4uoeuWYf402fxSoc+L X-Received: by 2002:a05:6402:494:b0:46a:c9bc:ccd4 with SMTP id k20-20020a056402049400b0046ac9bcccd4mr46786569edv.200.1670378998195; Tue, 06 Dec 2022 18:09:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670378998; cv=none; d=google.com; s=arc-20160816; b=mlFS5jd9fExb2VCwI3K1zj22JHXPOkEGHm3l8rSpKNVEgHCseTzCvJoIVCnSQOq6Et 0Cl31KvL0iKtJmx02e99CfPZW6ehLIwSuOJxg11cEsV6bsHQpdRiA6RKpZ8ZT0V8BweV ZRzJ2Dj9tP7kFs+8JL7lkaot3hk8ZWQfxyQ9Op91Jph8nK8F8i/sOhHuL2MnLabpBg54 lHTm9xJ8ju4pTaFg8BBook+Nj+x6CDoff3CaAz3UQWjjw0b6+h76+TdiJGR3E2G014hB DpL8oZpggWgtGsAv6413pm/kZ4KtmrnKRqmSFsVVLODGU2+nTeOkswOcmskWcpguEo5d F+lg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a50fc85000000b0046ad8e026e1si2891758edq.69.2022.12.06.18.09.35; Tue, 06 Dec 2022 18:09:58 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751519328143781753?= X-GMAIL-MSGID: =?utf-8?q?1751519328143781753?= 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(-)