Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2868086ybh; Mon, 5 Aug 2019 08:07:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqgBXIwVxLgSURQQfmKVna4Nqj3CuY98853QfCB4mjcdFRh4paJn+gh4ns9oRWZd8dHrc4 X-Received: by 2002:a65:63c4:: with SMTP id n4mr135277127pgv.44.1565017623775; Mon, 05 Aug 2019 08:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565017623; cv=none; d=google.com; s=arc-20160816; b=cT+j9s4NO4RXLNZff3i0xOFkyBnNs6Bamy9TQO/tVBRaYMvGj0MVVXPiH3h+/aAg51 7aEGcbBpkbDV4tDU1LTVpOurxbtf0ZMflRwXsPM8DP0wyWqqAIrH9UGUZAkwxb5/taSA 1cbJawRL8tVlTGBJIcJRjIYtq4RCO0wGZzNae35xVfCrRSbNKxP2zrmpFUFvjDYsa7AM MhDfOOIWYHzv6R5TfiGgZsk8FButvo4wSERHkhrthXwux8Q7e6cXetRTLBKtw55G2wnL J2Ykeg5vKlLTaYHn474ZlMD5kEHhPGkgqaV0hLwL9vA6tlIrIUeV0xk2Pivh0Y3CZud3 Qq9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BDafBgrQe/HIF0gsZ1GhvKu8J7pmlt80Y4YsgKYoMg0=; b=Zo9k9TgTIyfrWbV6vCYUdKcJlSspJ683ihPlW4oNUI4ZSzJrnZD34mJhss41IJoWKE nVMjyMPeEG3v0aqgIfeZD7t0YenDZkU1hgy8QYpWTSY6erO7csG9Bf8yry7l4GIFS57i SdknJfvjSeVDpmY8+QTy8X8lBttYuZUVVmfvLF8+sjMS2HeuCOt/B6iamApfnZSwvvDI D74AqVdBLq9J8MiWhYC1SxvB8LitV2qLZntqctrWNmGdwCnRMYwEVJCdw9erMlSWOPV2 pYonLyOJVF9BWLrJU9DhmWdu8pK2NdOWYsr5zMGTGBbh3Sa37whMAkkIPvGrahZqdNh0 bCGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yac3Z2uc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14si46331722pfq.88.2019.08.05.08.06.48; Mon, 05 Aug 2019 08:07:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yac3Z2uc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729637AbfHEPEn (ORCPT + 99 others); Mon, 5 Aug 2019 11:04:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:36936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728885AbfHEPEm (ORCPT ); Mon, 5 Aug 2019 11:04:42 -0400 Received: from localhost.localdomain (unknown [151.66.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 153B0206C1; Mon, 5 Aug 2019 15:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565017481; bh=6SJSdyDbFDLeQFF5ITDNOv7RkepckDurk2I+Z0EiFsY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yac3Z2ucmDuY654rgEaaZfCY6ZN0SK6lY4rjXjoXAMKlyxIlLfxr3x9bfJWm4dtIo NdVAdTEO7L/E5qt06LNC3Y2HaPeDuiLwn8AvI6EORdN1L2cfg19H/Gsc2yXYeRc87S v8HiIZYEck2YVQNrQMEG2kOmeP5kOl5YgZLpDjAk= Date: Mon, 5 Aug 2019 17:04:35 +0200 From: Lorenzo Bianconi To: Jonathan Cameron Cc: Martin Kepplinger , lorenzo.bianconi83@gmail.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: imu: st_lsm6dsx: make IIO_CHAN_INFO_SCALE shared by type Message-ID: <20190805150435.GA15250@localhost.localdomain> References: <20190801143908.27608-1-martin.kepplinger@puri.sm> <20190805152148.0ea55f6e@archlinux> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20190805152148.0ea55f6e@archlinux> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Thu, 1 Aug 2019 16:39:08 +0200 > Martin Kepplinger wrote: >=20 > > in_accel_x_scale, in_accel_y_scale and in_accel_z_scale are always > > the same. The scale is still defined to be in "info_mask_separate". > >=20 > > Userspace (iio-sensor-proxy and others) is not used to that and only > > looks for "in_accel_scale" for the scaling factor to apply. > >=20 > > Change IIO_CHAN_INFO_SCALE from being separate in all channel to be > > shared by type. > >=20 > > This removes in_accel_x_scale, in_accel_y_scale and in_accel_z_scale and > > makes available in_accel_scale. > >=20 > > Signed-off-by: Martin Kepplinger > > --- > >=20 > > AFAIK in all other drivers, IIO_CHAN_INFO_SCALE is "shared by type". Su= re > > devices are different, but LSM6DSX devices still don't have different > > scales for x/y/z channels :) >=20 > I'm fine with this, but would like a Lorenzo ack as we have had > devices in other series where these are not equal. It used to > be common in accelerometers as I think it was hard to get a large > range in the vertical direction. Doubt that applies on these modern > parts though! >=20 > Thanks, >=20 > Jonathan AFAIK all the supported sensors have the same sensitivity on all axis and s= o I am fine with this patch (it should be done in this way from day 0 actually = :)) but is it going to break uapi? if not feel free to add: Acked-by: Lorenzo Bianconi Regards, Lorenzo >=20 >=20 > >=20 > > thanks, > >=20 > > martin > >=20 > >=20 > >=20 > > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/= st_lsm6dsx/st_lsm6dsx.h > > index af379a5429ed..59c3ab7cbb6f 100644 > > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > > @@ -56,8 +56,8 @@ enum st_lsm6dsx_hw_id { > > .address =3D addr, \ > > .modified =3D 1, \ > > .channel2 =3D mod, \ > > - .info_mask_separate =3D BIT(IIO_CHAN_INFO_RAW) | \ > > - BIT(IIO_CHAN_INFO_SCALE), \ > > + .info_mask_separate =3D BIT(IIO_CHAN_INFO_RAW), \ > > + .info_mask_shared_by_type =3D BIT(IIO_CHAN_INFO_SCALE), \ > > .info_mask_shared_by_all =3D BIT(IIO_CHAN_INFO_SAMP_FREQ), \ > > .scan_index =3D scan_idx, \ > > .scan_type =3D { \ >=20 --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCXUhFgQAKCRA6cBh0uS2t rMtiAQCclTOniECTRlWfSm0HPOwK5O7sL9GHP5DCp2avHVWz6AEAtf9XQPfIo/Kn ib+ne9EnoUEkLVI2HY21THROulATFQc= =/f7d -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--