From patchwork Mon Jan 16 13:07:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe De Muyter X-Patchwork-Id: 13103070 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C89A9C54EBE for ; Mon, 16 Jan 2023 13:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229935AbjAPNLU (ORCPT ); Mon, 16 Jan 2023 08:11:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231511AbjAPNLD (ORCPT ); Mon, 16 Jan 2023 08:11:03 -0500 Received: from frolo.macqel.be (smtp2.macqel.be [109.135.2.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 39CE223C5A for ; Mon, 16 Jan 2023 05:08:46 -0800 (PST) Received: by frolo.macqel.be (Postfix, from userid 1000) id 64538DF00AC; Mon, 16 Jan 2023 14:07:45 +0100 (CET) From: Philippe De Muyter To: lorenzo@kernel.org, linux-iio@vger.kernel.org Cc: Philippe De Muyter Subject: [PATCH v2 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' in st_lsm6dsx_shub.c. Date: Mon, 16 Jan 2023 14:07:13 +0100 Message-Id: <1673874434-30750-2-git-send-email-Philippe.DeMuyter@macq.eu> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1673874434-30750-1-git-send-email-Philippe.DeMuyter@macq.eu> References: <1673874434-30750-1-git-send-email-Philippe.DeMuyter@macq.eu> Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Philippe De Muyter We need the name 'st_lsm6dsx_ext_info' for the actual 'iio_chan_spec_ext_info'. Rename the 'st_lsm6dsx_ext_info' in st_lsm6dsx_shub.c to 'st_lsm6dsx_shub_info'. For consistency, replace also 'ext' by 'shub' in 'st_lsm6dsx_ext_attributes' and 'st_lsm6dsx_ext_attribute_group'. Signed-off-by: Philippe De Muyter Acked-by: Lorenzo Bianconi --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c index f2b64b4956a3..c1b444520d2a 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c @@ -704,18 +704,18 @@ static ssize_t st_lsm6dsx_shub_scale_avail(struct device *dev, static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(st_lsm6dsx_shub_sampling_freq_avail); static IIO_DEVICE_ATTR(in_scale_available, 0444, st_lsm6dsx_shub_scale_avail, NULL, 0); -static struct attribute *st_lsm6dsx_ext_attributes[] = { +static struct attribute *st_lsm6dsx_shub_attributes[] = { &iio_dev_attr_sampling_frequency_available.dev_attr.attr, &iio_dev_attr_in_scale_available.dev_attr.attr, NULL, }; -static const struct attribute_group st_lsm6dsx_ext_attribute_group = { - .attrs = st_lsm6dsx_ext_attributes, +static const struct attribute_group st_lsm6dsx_shub_attribute_group = { + .attrs = st_lsm6dsx_shub_attributes, }; -static const struct iio_info st_lsm6dsx_ext_info = { - .attrs = &st_lsm6dsx_ext_attribute_group, +static const struct iio_info st_lsm6dsx_shub_info = { + .attrs = &st_lsm6dsx_shub_attribute_group, .read_raw = st_lsm6dsx_shub_read_raw, .write_raw = st_lsm6dsx_shub_write_raw, .hwfifo_set_watermark = st_lsm6dsx_set_watermark, @@ -737,7 +737,7 @@ st_lsm6dsx_shub_alloc_iiodev(struct st_lsm6dsx_hw *hw, return NULL; iio_dev->modes = INDIO_DIRECT_MODE; - iio_dev->info = &st_lsm6dsx_ext_info; + iio_dev->info = &st_lsm6dsx_shub_info; sensor = iio_priv(iio_dev); sensor->id = id; From patchwork Mon Jan 16 13:07:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe De Muyter X-Patchwork-Id: 13103146 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85EFBC46467 for ; Mon, 16 Jan 2023 13:21:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbjAPNVp (ORCPT ); Mon, 16 Jan 2023 08:21:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjAPNVo (ORCPT ); Mon, 16 Jan 2023 08:21:44 -0500 Received: from frolo.macqel.be (smtp2.macqel.be [109.135.2.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D218544B9 for ; Mon, 16 Jan 2023 05:21:42 -0800 (PST) Received: by frolo.macqel.be (Postfix, from userid 1000) id B5D15DF00AD; Mon, 16 Jan 2023 14:07:47 +0100 (CET) From: Philippe De Muyter To: lorenzo@kernel.org, linux-iio@vger.kernel.org Cc: Philippe De Muyter Subject: [PATCH v2 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. Date: Mon, 16 Jan 2023 14:07:14 +0100 Message-Id: <1673874434-30750-3-git-send-email-Philippe.DeMuyter@macq.eu> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1673874434-30750-1-git-send-email-Philippe.DeMuyter@macq.eu> References: <1673874434-30750-1-git-send-email-Philippe.DeMuyter@macq.eu> Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Philippe De Muyter Signed-off-by: Philippe De Muyter --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h index 5b6f195748fc..499fcf8875b4 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h @@ -93,7 +93,7 @@ enum st_lsm6dsx_hw_id { .endianness = IIO_LE, \ }, \ .event_spec = &st_lsm6dsx_event, \ - .ext_info = st_lsm6dsx_accel_ext_info, \ + .ext_info = st_lsm6dsx_ext_info, \ .num_event_specs = 1, \ } @@ -113,6 +113,7 @@ enum st_lsm6dsx_hw_id { .storagebits = 16, \ .endianness = IIO_LE, \ }, \ + .ext_info = st_lsm6dsx_ext_info, \ } struct st_lsm6dsx_reg { @@ -528,7 +529,7 @@ st_lsm6dsx_device_set_enable(struct st_lsm6dsx_sensor *sensor, bool enable) } static const -struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_accel_ext_info[] = { +struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_ext_info[] = { IIO_MOUNT_MATRIX(IIO_SHARED_BY_ALL, st_lsm6dsx_get_mount_matrix), { } };