From patchwork Wed Nov 18 16:28:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 11915393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 570CEC5519F for ; Wed, 18 Nov 2020 16:30:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D438A2481B for ; Wed, 18 Nov 2020 16:30:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PHZJmne/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D438A2481B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=EELgM/3i8X6TxsEYK28raMo1JoUjuzLN8JCpYxlM1Xw=; b=PHZJmne/tuxNw2Epm9vX4y+JRq Qi2bfTZrUkZr81P9czH1ReqbcG0ET9dVUT0y+OaCcUCTTQIkOksDcTqCP2ZsHZvecAEk8s5atMuQq +bC4JdJnQAUFT1cJGqjZBZr3UcLOqTjCAzzTTVgqITPIRvolYJXg5LfkaxmMhTpVph7HjyGNPlnvo 0FTrwn+G1DubHzZ/6MIOfn1KVxaqAtcIQRo/WTaEen/t2SPxbY7I/qUB4nY6zuce9Bzb2vvViEuGW /w7d51XHq3wK+rio4bexamnjRFqS+svefloQTp/OfeXBVeUTWxWIP99BGUMxx6+wIiovhq6ssmPbO JeazBJ3w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfQKr-00031I-06; Wed, 18 Nov 2020 16:29:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfQKi-0002yl-MZ for linux-arm-kernel@lists.infradead.org; Wed, 18 Nov 2020 16:29:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 72A431396; Wed, 18 Nov 2020 08:29:21 -0800 (PST) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB8AF3F719; Wed, 18 Nov 2020 08:29:19 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/6] SCMIv3.0 Sensor Extensions Date: Wed, 18 Nov 2020 16:28:59 +0000 Message-Id: <20201118162905.10439-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201118_112924_798201_D9B06BD1 X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikhail.golubev@opensynergy.com, Igor.Skalkin@opensynergy.com, jbhayana@google.com, sudeep.holla@arm.com, peter.hilber@opensynergy.com, cristian.marussi@arm.com, Jonathan.Cameron@Huawei.com, egranata@google.com, lukasz.luba@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, this series is meant to add support for the new SCMI Sensor Protocol features defined by the upcoming SCMIv3.0 specification, whose BETA release is available at [1]. The series is currently based on for-next/scmi [2] on top of: commit b141fca08207 ("firmware: arm_scmi: Fix missing destroy_workqueue()") Any feedback welcome, Thanks, Cristian --- v2 --> v3 - removed stale unused msg payload definition - moved variable declaration inside switch block - setting rx_size to 0 in sensor_reading_get to allow fw to send both v2 and v3 replies...even if sensor_reading_get() only handles v2 spec and returns one single value - using get_unaligned_le64 in lieu of le64_to_cpu - removed refs to v2.1 - Fix SCMI_MAX_NUM_SENSOR_AXIS to 63 - added missing Dox comment in resolution - added common INTVL SEGMENT macros v1 --> v2 - rebased on for-next/scmi v5.10 - restrict segmented intervals descriptors to single triplet - add proper usage of scmi_reset_rx_to_maxsz [1]:https://developer.arm.com/documentation/den0056/c/ [2]:https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=for-next/scmi Cristian Marussi (6): firmware: arm_scmi: rework scmi_sensors_protocol_init firmware: arm_scmi: add SCMIv3.0 Sensors descriptors extensions hwmon: scmi: update hwmon internal scale data type firmware: arm_scmi: add SCMIv3.0 Sensors timestamped reads firmware: arm_scmi: add SCMIv3.0 Sensor configuration support firmware: arm_scmi: add SCMIv3.0 Sensor notifications drivers/firmware/arm_scmi/sensors.c | 743 ++++++++++++++++++++++++++-- drivers/hwmon/scmi-hwmon.c | 2 +- include/linux/scmi_protocol.h | 291 ++++++++++- 3 files changed, 977 insertions(+), 59 deletions(-)