linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "AnilKumar, Chimata" <anilkumar@ti.com>
To: Chinmay V S <cvs268@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"eric.piel@tremplin-utc.net" <eric.piel@tremplin-utc.net>,
	"jic23@cam.ac.uk" <jic23@cam.ac.uk>,
	"greg@kroah.com" <greg@kroah.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"broonie@opensource.wolfsonmicro.com" 
	<broonie@opensource.wolfsonmicro.com>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer
Date: Wed, 22 Aug 2012 15:40:25 +0000	[thread overview]
Message-ID: <331ABD5ECB02734CA317220B2BBEABC13EA1BDA9@DBDE01.ent.ti.com> (raw)
In-Reply-To: <CAK-9PRBDpxtrxZWL_x9Uz--GMWDN5anyB_fuKtLrvZcLoRR+FQ@mail.gmail.com>

On Wed, Aug 22, 2012 at 16:09:22, Chinmay V S wrote:
> Hmmm. Interesting. As i understand LIS331DLH provides 16bit data
> irrespective of the full-scale/sensitivity configuration. Hence we
> could effectively map +/-2G to +/-32768(signed 16bit 2's complement).
> According to the current-patch right-shifting the register values by
> 4(i.e. reducing 16bit --> 12bit) will mean that we lose accuracy by
> ~1mG.
> 
> Clearly this will NOT affect use-case like display-orientation in
> smart-phones, but surely medical and industrial applications WILL
> benefit from the additional accuracy by utilising the entire 16-bit
> resolution provided by LIS331DLH hardware.
> 
> I went through the LIS331DLH datasheet/application-note from
> http://www.st.com/internet/analog/product/218132.jsp and i'm a bit
> confused from your statement about +/-2G being 12bit data. Nowhere is
> it mentioned that LIS331DLH provides +/-2G|+/-4G|+/-8G as 12|13|14 bit
> data respectively. Then again i might be wrong...
> 

Look at this application note which talks about the outdata values
for 2G range (page 12/31) http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00215823.pdf

Corresponding to the 4G and 8G I got the details form older
patches (SHIFT_ADJ_4G and SHIFT_ADJ_8G).
http://driverdev.linuxdriverproject.org/pipermail/devel/2010-November/009685.html

We can easily interpret number of bits for 4G and 8G from 2G
information.

Thanks
AnilKumar

  reply	other threads:[~2012-08-22 15:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22  6:30 [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer AnilKumar Ch
2012-08-22  7:48 ` Arnd Bergmann
2012-08-22  8:44   ` Chinmay V S
2012-08-22  9:00     ` AnilKumar, Chimata
2012-08-22 10:39       ` Chinmay V S
2012-08-22 15:40         ` AnilKumar, Chimata [this message]
2012-08-22 16:54           ` Chinmay V S
2012-08-23 10:00             ` AnilKumar, Chimata
2012-08-23 10:23               ` Chinmay V S
2012-08-23 11:15                 ` AnilKumar, Chimata
2012-08-23 11:33                   ` Chinmay V S
2012-08-28  5:45   ` AnilKumar, Chimata
2012-09-23 21:38 ` Éric Piel
2012-09-24  5:46   ` AnilKumar, Chimata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=331ABD5ECB02734CA317220B2BBEABC13EA1BDA9@DBDE01.ent.ti.com \
    --to=anilkumar@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cvs268@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eric.piel@tremplin-utc.net \
    --cc=greg@kroah.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).