From patchwork Mon Feb 8 21:19:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyoti Bhayana X-Patchwork-Id: 12076541 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=-21.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL 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 8E895C433E6 for ; Mon, 8 Feb 2021 21:20:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3DC2164E8F for ; Mon, 8 Feb 2021 21:20:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235646AbhBHVUR (ORCPT ); Mon, 8 Feb 2021 16:20:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236308AbhBHVUE (ORCPT ); Mon, 8 Feb 2021 16:20:04 -0500 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD48C061788 for ; Mon, 8 Feb 2021 13:19:22 -0800 (PST) Received: by mail-pj1-x1049.google.com with SMTP id m5so336292pjg.0 for ; Mon, 08 Feb 2021 13:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=mj2tFALi24MejDUAyOIZC6XcOuZLAwzBMp1DQ6QF7c4=; b=R4kz3oxWh27Oa6yQGz5VU3uqmz22vN2b3nKeesahabCfAT7e9yqTnNciJeT2xfk5ou IWNsYRcd58dNHirK6ZQQezlr81Zhw6QZIoaGkGWyVgHTyo+4jkg1HdNt3KuGvgqbi/+3 7uyVABrUZF0Knpi/7O/BdUmgOaToVrambu3GLsjcAEZoPPdP72xMaXyfDIOreA4YqhlA +nB8h7pPZ0m1nUaeoqAMTAO+gMtIw/GZe7Li6nltqNfsFeRmPCE95gv/61bASA61YrW9 BIacRXmVAmPErl9C7oejKaSPaJF8edAKFWl979P6587nVdK2OrqlsgkpqksTH1Y2Y3wo 7OWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=mj2tFALi24MejDUAyOIZC6XcOuZLAwzBMp1DQ6QF7c4=; b=ke8L50LZ6L1BYUzv+t+e9wdAWvOlLxTqogys3phQ4oZ8rbBXqfPpDzZJTY5V8ASaW/ +nQMgoqP4E3aZD3QoQcXBWkVed5D/Mv2pLM4WzviLFrp1VFhijGx3zwwRHViltRmWmHc tur70e90cMGOFW/S07O+7If8zewjJiZBhWTB8xv1Uvt5qRMQ5fM81nDptAraAlLTm3KV 2agXgy3/4eana+1JcgsaZggJMjIaOKxcZmG5RkrcYVAEt4HWwL1wvDsVE1LzSzNa1bK6 eNwCPGzAKOSosGhOFpuS081H5ADfYWTL/fYHAhtqSyYv9RMBZ0YWCJHm/wYOOiIqC3cl NFBw== X-Gm-Message-State: AOAM5324m8CQinAmrdPuYdt9fioynC2ioWr7RnB/i5hnsOzOBxp016Rb DkH1TYldx5V9ulLMgXjyiFMxKw7nTzOjAQ== X-Google-Smtp-Source: ABdhPJyvWdjxDxa2oDucvOMapD4bizkkq8JMxC+/bmdPT4s/BwMGoHRPjIom3HD+ILKxl8qH9PapC3lGyhggoA== Sender: "jbhayana via sendgmr" X-Received: from jbhayana.c.googlers.com ([fda3:e722:ac3:10:24:72f4:c0a8:42b2]) (user=jbhayana job=sendgmr) by 2002:a62:3503:0:b029:1aa:6f15:b9fe with SMTP id c3-20020a6235030000b02901aa6f15b9femr19274370pfa.65.1612819162178; Mon, 08 Feb 2021 13:19:22 -0800 (PST) Date: Mon, 8 Feb 2021 21:19:17 +0000 Message-Id: <20210208211918.1280588-1-jbhayana@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH v5 0/1] Adding support for IIO SCMI based sensors From: Jyoti Bhayana To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Jyoti Bhayana , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, cristian.marussi@arm.com, sudeep.holla@arm.com, egranata@google.com, mikhail.golubev@opensynergy.com, Igor.Skalkin@opensynergy.com, Peter.hilber@opensynergy.com, ankitarora@google.com Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Hi, This series adds support for ARM SCMI Protocol based IIO Device. This driver provides support for Accelerometer and Gyroscope sensor using SCMI Sensor Protocol extensions added in the SCMIv3.0 ARM specification, which is available at https://developer.arm.com/documentation/den0056/c/ This version of the patch series has been tested using version 5.4.21 branch of Android common kernel. Any feedback welcome, Thanks, Jyoti Bhayana v4 --> v5 - Dropped the RFC tag - Added channel ext_info for raw_available - Incorporated the feedback comments from v4 review of the patch v3 --> v4 - Incorporated the feedback comments from v3 review of the patch v2 --> v3 - Incorporated the feedback comments from v2 review of the patch v1 --> v2 - Incorporated the feedback comments from v1 review of the patch - Regarding the new ABI for sensor_power,sensor_max_range, and sensor_resolution, these are some of the sensor attributes which Android passes to the apps. If there is any other way of getting those values, please let us know Jyoti Bhayana (1): iio/scmi: Adding support for IIO SCMI Based Sensors MAINTAINERS | 6 + drivers/firmware/arm_scmi/driver.c | 2 +- drivers/iio/common/Kconfig | 1 + drivers/iio/common/Makefile | 1 + drivers/iio/common/scmi_sensors/Kconfig | 18 + drivers/iio/common/scmi_sensors/Makefile | 5 + drivers/iio/common/scmi_sensors/scmi_iio.c | 673 +++++++++++++++++++++ 7 files changed, 705 insertions(+), 1 deletion(-) create mode 100644 drivers/iio/common/scmi_sensors/Kconfig create mode 100644 drivers/iio/common/scmi_sensors/Makefile create mode 100644 drivers/iio/common/scmi_sensors/scmi_iio.c