From patchwork Mon Mar 30 14:59:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?R2HDq3RhbiBBbmRyw6k=?= X-Patchwork-Id: 11465811 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD481912 for ; Mon, 30 Mar 2020 15:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95A5720732 for ; Mon, 30 Mar 2020 15:24:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728991AbgC3PYr (ORCPT ); Mon, 30 Mar 2020 11:24:47 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:50141 "EHLO smtpout1.mo804.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728666AbgC3PYq (ORCPT ); Mon, 30 Mar 2020 11:24:46 -0400 X-Greylist: delayed 1518 seconds by postgrey-1.27 at vger.kernel.org; Mon, 30 Mar 2020 11:24:46 EDT Received: from DAG2EX1.mxp2.local (unknown [10.109.156.148]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id 989C4321A41D; Mon, 30 Mar 2020 16:59:26 +0200 (CEST) Received: from gaetanandre.eu (37.59.142.99) by DAG2EX1.mxp2.local (172.16.2.3) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 30 Mar 2020 16:59:26 +0200 From: =?utf-8?b?R2HDq3RhbiBBbmRyw6k=?= To: CC: , <~postmarketos/upstreaming@lists.sr.ht>, =?utf-8?b?R2HDq3RhbiBBbmRyw6k=?= Subject: [PATCH] iio: st_sensors: make scale channels also shared by type Date: Mon, 30 Mar 2020 16:59:20 +0200 Message-ID: <20200330145920.441528-1-rvlander@gaetanandre.eu> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG6EX2.mxp2.local (172.16.2.12) To DAG2EX1.mxp2.local (172.16.2.3) X-Ovh-Tracer-GUID: 11d227e3-49fb-45d4-b500-33cc3a15d870 X-Ovh-Tracer-Id: 670473397238907104 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudeihedgkedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkofggtgfgihesthekredtredtjeenucfhrhhomhepifgrtohtrghnucetnhgurhoruceorhhvlhgrnhguvghrsehgrggvthgrnhgrnhgurhgvrdgvuheqnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopefftefivdfgigdurdhmgihpvddrlhhotggrlhdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheprhhvlhgrnhguvghrsehgrggvthgrnhgrnhgurhgvrdgvuhdprhgtphhtthhopehrvhhlrghnuggvrhesghgrvghtrghnrghnughrvgdrvghu Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Scale channels are available by axis. For example for accelerometers, in_accel_x_scale, in_accel_y_scale and in_accel_z_scale are available. However, they should be shared by type as documented in Documentation/ABI/testing/sysfs-bus-iio. For each sensor (acceleros, gyros and magnetos) only one value is specified for all the axes. Existing, by axis, entries are preserved in order to to leave the old ABI untouched. Signed-off-by: Gaëtan André --- include/linux/iio/common/st_sensors.h | 1 + 1 file changed, 1 insertion(+) base-commit: b723e9431b77976b83efb90178dfcada3405321c diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 33e939977444..f31e309f0fd1 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h @@ -52,6 +52,7 @@ .type = device_type, \ .modified = mod, \ .info_mask_separate = mask, \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ), \ .scan_index = index, \ .channel2 = ch2, \