Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp423548pxu; Tue, 5 Jan 2021 15:15:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVmAWl/0/jgYBZqBdpW7RdIVerf7JH3n1Zi0OqrbzMnNurm14VQAqnwkKVhGY5uAEe5t7w X-Received: by 2002:a17:907:4243:: with SMTP id np3mr1162699ejb.212.1609888541868; Tue, 05 Jan 2021 15:15:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609888541; cv=none; d=google.com; s=arc-20160816; b=k6BBAzcPL5/HukfeV1qiQojZ47aDdfnxjajyuv/TQ/V0ccVYYynXLQMb2JBMQj4ipZ eaS0mMWB5ckazD5xiiAaWFL4pYKM9AD2r7ADWlepxR9V64dq92G7F5SPNhWkDKMQjEVX nFOPACrp1b0zf2Ve0O86abWUgmQvTPiEoFq9pyMU0TMRnlOAo0ZeQcBAnXz+QLDaKJJ6 w4E/sHtV0k2LCkhMaP4cHDgH9g2tthm3thEwKV8mdgP7Q8Bh9JUYEOlWsbN/zkG/N+2d 2Y4Gij/xOZaQBlgueYnrH0bOIUKCMmMhU4wTtpFYewG8+Y5sygRfhdxKE/4LEwFMmIWC lqKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=3QQTYrRGvdGiP5J+1ZbyRpWtam1Wq+KjywVYS8/XwHY=; b=artH51lkQw08407uSOb6a1rOQzyoByna2zIQOepH4i5o4S61R3MZ9xXrqS2onekSuH Qp/YFdfqlZ7zsOXnP3IE+EAwpZ+3KyXGZIjuXyT1sdU7QXSaxgWLV3iP8EOIxvkTh1vk 8BdlKkCBMJ81bx1hLM8z3PXaWQNxE3lqR9Kr4tTc8gZUDoiYvhvuWugYbXjOpo0vTRv+ YR7gXPpuq62jhVWuQXOzIijiBTeLdG9WufLpdfjFz9LLbqKgNv1GSMMRnjqf8VRcl/5E GPqHVtZBCPfaNWZjFrEx4rBR4uT0r6SrldkRvpgaMDUZf4YCxz6M62SQa3v1UoJrP9mH SxNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=k8ZE3Pyg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd14si223737edb.478.2021.01.05.15.15.19; Tue, 05 Jan 2021 15:15:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=k8ZE3Pyg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728776AbhAEXKK (ORCPT + 99 others); Tue, 5 Jan 2021 18:10:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbhAEXKH (ORCPT ); Tue, 5 Jan 2021 18:10:07 -0500 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CAEBC061793 for ; Tue, 5 Jan 2021 15:09:27 -0800 (PST) Received: by mail-pf1-x44a.google.com with SMTP id t16so441090pfh.22 for ; Tue, 05 Jan 2021 15:09:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=3QQTYrRGvdGiP5J+1ZbyRpWtam1Wq+KjywVYS8/XwHY=; b=k8ZE3PyggTJSgblvZ+b3RcAVjj2MHU2Nyyb7IziH8GjdhUCpsfyJanhJdL9G9qznSR fChz3/Qmp3sp/SGid8UwZee8wpOgQRhUEeGdVNET4CuaS/xCCHixB3Zbe2egQVvXQaVo YvQtche5ilHDy7x+pskv9POs4+CRGwyOS6anrvUsvGcH1RC/mPcnjsmHXFw6AKCkLhwv wVvMIq++8YpCC6j4yEakIrOv7RSJzC1pmvzkp/xIJaypUrjJZqevx5atcpFUgDJVMpbq dackgtzWSFks/uvGfdBWarA0FALhtFE9NguRoHeBaGDUx1RDG9R7F2K82fFmm1ZN+yT5 A2eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=3QQTYrRGvdGiP5J+1ZbyRpWtam1Wq+KjywVYS8/XwHY=; b=eRwvXh5PSRffCD3G4vTgKg5IRgPV25a3vdVzK/VhdBx/O5NcXYEF9/IDIqaWTNV5JD SjWIlMQU1Jh5NUUwaZqnB+88uoZIgqHAt/0ICvXTERgzQ4bVomxkgFcCd2ZRJWPTKdZv xSoQQWx13LD3MOrPVCbjkAToXp+iKD4uzxLOD1ZvCYsWJzlvYKJw0/cmDtrHuPybid2f 5gI2wiNDV4jsQM+vXNxRboubQW1Ckn82NfujEWwLJzTDQH8b4CVKbazaCBbwea1pNwhK AMs2mKGlMT+mYEk0sjPpfdE9fqNDRxhwT9eJ4pWh1yPa8nXv3DcsVRXqvBZn6FEnotji 6kMg== X-Gm-Message-State: AOAM5303Yjddy2yVAgbtJ2T5oC+x0ka8SWFaxr0srg+5R6GGYU1fzxKd g0stpzNbvQ827zi1+fXeWD8z5DW6XVTm1A== 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:a17:90a:f288:: with SMTP id fs8mr1354336pjb.184.1609888166723; Tue, 05 Jan 2021 15:09:26 -0800 (PST) Date: Tue, 5 Jan 2021 23:09:20 +0000 In-Reply-To: <20201230123748.4e969f82@archlinux> Message-Id: <20210105230920.769144-1-jbhayana@google.com> Mime-Version: 1.0 References: <20201230123748.4e969f82@archlinux> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog Subject: Reply to [RFC PATCH v2 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonathan, > So, sensor_max_range can effectively be exposed as a combination of > scale and the *_raw_avail for a raw read (via the read_avail callback in IIO). > We'll ignore the fact the interface assumes a single value (so I assume symmetric?) Based on the SCMI specification the sensor min range and max range are 64 bits signed number. looks like IIO_AVAIL_RANGE can only take the following types of data which all looks like 32 bit. IIO_VAL_FRACTIONAL also takes two int type numbers. How can I send 64 bit sensor range using this and read_avail callback? #define IIO_VAL_INT 1 #define IIO_VAL_INT_PLUS_MICRO 2 #define IIO_VAL_INT_PLUS_NANO 3 #define IIO_VAL_INT_PLUS_MICRO_DB 4 #define IIO_VAL_INT_MULTIPLE 5 #define IIO_VAL_FRACTIONAL 10 #define IIO_VAL_FRACTIONAL_LOG2 11 #define IIO_VAL_CHAR 12 Thanks, Jyoti