From mboxrd@z Thu Jan 1 00:00:00 1970 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 10A91C54EBE for ; Fri, 13 Jan 2023 14:59:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbjAMO7E (ORCPT ); Fri, 13 Jan 2023 09:59:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjAMO6S (ORCPT ); Fri, 13 Jan 2023 09:58:18 -0500 Received: from frolo.macqel.be (smtp2.macqel.be [109.135.2.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 092BA983DA for ; Fri, 13 Jan 2023 06:45:46 -0800 (PST) Received: by frolo.macqel.be (Postfix, from userid 1000) id 44526DF00AB; Fri, 13 Jan 2023 15:45:43 +0100 (CET) Date: Fri, 13 Jan 2023 15:45:44 +0100 From: Philippe De Muyter To: Lorenzo Bianconi Cc: Jonathan Cameron , linux-iio@vger.kernel.org Subject: Re: sysfs mount_matrix for st_lsm6dsx gyro Message-ID: <20230113144544.GA32740@frolo.macqel> References: <20230111120940.GA23351@frolo.macqel> <20230111171732.00006941@Huawei.com> <20230112112704.GA17933@frolo.macqel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Thu, Jan 12, 2023 at 12:32:11PM +0100, Lorenzo Bianconi wrote: > > I have followed Jonathan's proposal and added this simple patch in > > the definition of the ST_LSM6DSX_CHANNEL macro : > > > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > > index d80ba2e688ed..9d18145d5041 100644 > > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > > @@ -96,6 +96,7 @@ enum st_lsm6dsx_hw_id { > > .storagebits = 16, \ > > .endianness = IIO_LE, \ > > }, \ > > + .ext_info = st_lsm6dsx_accel_ext_info, \ > > } > > I am fine with this approach, probably having a per-sensor mount_matrix is > unnecessary. Can you please just rename st_lsm6dsx_accel_ext_info in > st_lsm6dsx_ext_info? > The compilation fails because there is already something different with that same name in drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:715:30: error: conflicting type qualifiers for ‘st_lsm6dsx_ext_info’ static const struct iio_info st_lsm6dsx_ext_info = { ^~~~~~~~~~~~~~~~~~~ In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:31:0: drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:498:46: note: previous definition of ‘st_lsm6dsx_ext_info’ was here struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_ext_info[] = { Best regards Philippe