Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp424239imp; Wed, 20 Feb 2019 02:41:32 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia3T+3hrDmOkVFSPTxtp7di53yhDqAHAGLxsJMMvN40AQroHpx5W3h15nh3xahDpJhLUKvM X-Received: by 2002:a63:d810:: with SMTP id b16mr28148057pgh.220.1550659292730; Wed, 20 Feb 2019 02:41:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550659292; cv=none; d=google.com; s=arc-20160816; b=YFz2IOYPE82AYO2StitbHw8rVOIUnmKClXjzogPLfJRqlTlMSTKnfNWhVwMDYj59Tb ZmL4y6uYkV4nscSotXvTmppvwiu7kYVVy+WAb2mHDu5uT/iMFFWNJpgcIMBzddJYh1n8 RpypbRJSv4cV2qWBuZgFIuaxETKFUMWgc9+p5bIHEEWnmLKJIiSXz+ePZQCZOKMEDS8d lllB3BMQXlZkDFJSjQaKQrf6pf+hIDaT6bygFRZGcC9gkz7yrCWnEZPGDZ1yvTHJQoyz S3a6wUUbq6gRurczvaRrni/Zu+LGu2hGqLIP2Ekqbvmn/KR67+X4RlzDSdl+nRXG8BZg +ryw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rIQDUjBXymrTS6PezGmITql++d1keZnOgfckX6aeUxA=; b=RlqX9ufey9A+jp+5zysV8CQLKc/inHcjoz8nAbOadTqWzo9nRG1JCKyAg6BounTG4A q/bJAwLh+gAPmL43U2N9s+5ksajpWP7D0qE4YMVsTSNll1bi/VKa0Ys9wdhfpOJG4HNC feX6UIEmateliynYSVbOJS8y6Vg0WvWTiS0rqmLvRcn/mAbKUwBiYNSv82xcz/rZsS0Y 4g0b8qgN9H2Hrga389dFwT4uMIMRy5M4A45E/YcKC/pxHWqZJ9L/1jaZyg8ayrCTWUPd 9LO3b0ZfAkNL3LuoUvRGX9R4ZkFklxurcbe3Rp0bVG8C0pvTcvtPSQknGEOXrjj6R6pD vKeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LbZBL0Ba; 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 u24si9069389pfa.78.2019.02.20.02.41.16; Wed, 20 Feb 2019 02:41:32 -0800 (PST) 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=LbZBL0Ba; 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 S1727399AbfBTKk4 (ORCPT + 99 others); Wed, 20 Feb 2019 05:40:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:54800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726209AbfBTKk4 (ORCPT ); Wed, 20 Feb 2019 05:40:56 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (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 915EE2087B; Wed, 20 Feb 2019 10:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550659254; bh=48R8l1yYZYp5vUIQbHr8KBwJ9k3lUDwkjwDH9fI2Ats=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LbZBL0BagGDMhPZFCDHb0XJtka7Xz73jgNyZHhf/QTb2DTRU7Hmsrmhscs8Rw74Rg rcZsJkNLwXFcMTxKpPP8xLc1GYTH4KdD4h+liTzcyrzcMj/LGHIPIHJteW4UkgpprS NVYL/7mSCvIng9sKVe/Dnw++7h1N3XCiOpMSpznw= Date: Wed, 20 Feb 2019 10:40:49 +0000 From: Jonathan Cameron To: Stefan Popa Cc: , , , , , , , Subject: Re: [PATCH 5/6] iio: imu: adis16480: Add support for ADIS1649x family of devices Message-ID: <20190220104049.443106ef@archlinux> In-Reply-To: <1550596338-24220-6-git-send-email-stefan.popa@analog.com> References: <1550596338-24220-1-git-send-email-stefan.popa@analog.com> <1550596338-24220-6-git-send-email-stefan.popa@analog.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Feb 2019 19:12:17 +0200 Stefan Popa wrote: > The ADIS16495 and ADIS16497 are inertial systems that include a triaxis > gyroscope and a triaxis accelerometer. The serial peripheral interface > (SPI) provide a simple interface for data collection and configuration > control. The devices are similar to ADIS16475, ADIS16480, ADIS16485 and > ADIS16488, the main differences are related to range and scale factors. > > The temperature data scale is 0.00565 C/LSB for ADIS16475 and ADIS1648x > devices, while for ADIS1649x 0.0125 C/LSB. > > Another difference is that ADIS1649x devices support different gyroscope > measurement ranges which are dependent on the dash number (-1, -2, -3), > see Table 24 in the ADIS16495 datasheet. However, the ADIS16497 > gyroscopes have the same scale as ADIS16495. > > Furthermore, ADIS16495 devices support the acceleration maximum range of > 8g, while ADIS16497 devices go up to 40g. > > Datasheets: > Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adis16495.pdf > Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adis16497.pdf > > Signed-off-by: Stefan Popa Looks fine, but will probably change with the tweaks suggested for earlier patches. Thanks, Jonathan > --- > drivers/iio/imu/adis16480.c | 72 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 72 insertions(+) > > diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c > index cc53825..c30acfdb 100644 > --- a/drivers/iio/imu/adis16480.c > +++ b/drivers/iio/imu/adis16480.c > @@ -714,6 +714,12 @@ enum adis16480_variant { > ADIS16480, > ADIS16485, > ADIS16488, > + ADIS16495_1, > + ADIS16495_2, > + ADIS16495_3, > + ADIS16497_1, > + ADIS16497_2, > + ADIS16497_3, > }; > > static const struct adis16480_chip_info adis16480_chip_info[] = { > @@ -758,6 +764,60 @@ static const struct adis16480_chip_info adis16480_chip_info[] = { > .accel_max_scale = 18, > .temp_max_scale = 10619, > }, > + [ADIS16495_1] = { > + .channels = adis16485_channels, > + .num_channels = ARRAY_SIZE(adis16485_channels), > + .gyro_max_val = IIO_RAD_TO_DEGREE(20000), > + .gyro_max_scale = 125, > + .accel_max_val = IIO_M_S_2_TO_G(32000), > + .accel_max_scale = 8, > + .temp_max_scale = 4800, > + }, > + [ADIS16495_2] = { > + .channels = adis16485_channels, > + .num_channels = ARRAY_SIZE(adis16485_channels), > + .gyro_max_val = IIO_RAD_TO_DEGREE(18000), > + .gyro_max_scale = 450, > + .accel_max_val = IIO_M_S_2_TO_G(32000), > + .accel_max_scale = 8, > + .temp_max_scale = 4800, > + }, > + [ADIS16495_3] = { > + .channels = adis16485_channels, > + .num_channels = ARRAY_SIZE(adis16485_channels), > + .gyro_max_val = IIO_RAD_TO_DEGREE(20000), > + .gyro_max_scale = 2000, > + .accel_max_val = IIO_M_S_2_TO_G(32000), > + .accel_max_scale = 8, > + .temp_max_scale = 4800, > + }, > + [ADIS16497_1] = { > + .channels = adis16485_channels, > + .num_channels = ARRAY_SIZE(adis16485_channels), > + .gyro_max_val = IIO_RAD_TO_DEGREE(20000), > + .gyro_max_scale = 125, > + .accel_max_val = IIO_M_S_2_TO_G(32000), > + .accel_max_scale = 40, > + .temp_max_scale = 4800, > + }, > + [ADIS16497_2] = { > + .channels = adis16485_channels, > + .num_channels = ARRAY_SIZE(adis16485_channels), > + .gyro_max_val = IIO_RAD_TO_DEGREE(18000), > + .gyro_max_scale = 450, > + .accel_max_val = IIO_M_S_2_TO_G(32000), > + .accel_max_scale = 40, > + .temp_max_scale = 4800, > + }, > + [ADIS16497_3] = { > + .channels = adis16485_channels, > + .num_channels = ARRAY_SIZE(adis16485_channels), > + .gyro_max_val = IIO_RAD_TO_DEGREE(20000), > + .gyro_max_scale = 2000, > + .accel_max_val = IIO_M_S_2_TO_G(32000), > + .accel_max_scale = 40, > + .temp_max_scale = 4800, > + }, > }; > > static const struct iio_info adis16480_info = { > @@ -1000,6 +1060,12 @@ static const struct spi_device_id adis16480_ids[] = { > { "adis16480", ADIS16480 }, > { "adis16485", ADIS16485 }, > { "adis16488", ADIS16488 }, > + { "adis16495-1", ADIS16495_1 }, > + { "adis16495-2", ADIS16495_2 }, > + { "adis16495-3", ADIS16495_3 }, > + { "adis16497-1", ADIS16497_1 }, > + { "adis16497-2", ADIS16497_2 }, > + { "adis16497-3", ADIS16497_3 }, > { } > }; > MODULE_DEVICE_TABLE(spi, adis16480_ids); > @@ -1009,6 +1075,12 @@ static const struct of_device_id adis16480_of_match[] = { > { .compatible = "adi,adis16480" }, > { .compatible = "adi,adis16485" }, > { .compatible = "adi,adis16488" }, > + { .compatible = "adi,adis16495-1" }, > + { .compatible = "adi,adis16495-2" }, > + { .compatible = "adi,adis16495-3" }, > + { .compatible = "adi,adis16497-1" }, > + { .compatible = "adi,adis16497-2" }, > + { .compatible = "adi,adis16497-3" }, > { }, > }; > MODULE_DEVICE_TABLE(of, adis16480_of_match);