RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-09-23 Thread AnilKumar, Chimata
Hi Eric, Thanks for the comments, On Mon, Sep 24, 2012 at 03:08:19, Éric Piel wrote: > On 22-08-12 08:30, AnilKumar Ch wrote: > > This patch adds support for lis331dlh digital accelerometer to the > > lis3lv02d driver family. Adds ID field for detecting the lis331dlh > > module, based on this ID

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-09-23 Thread Éric Piel
On 22-08-12 08:30, AnilKumar Ch wrote: This patch adds support for lis331dlh digital accelerometer to the lis3lv02d driver family. Adds ID field for detecting the lis331dlh module, based on this ID field lis3lv02d driver will export the lis331dlh module functionality. Hello AnilKumar, Sorry fo

RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-27 Thread AnilKumar, Chimata
Hi Eric, On Wed, Aug 22, 2012 at 13:18:38, Arnd Bergmann wrote: > On Wednesday 22 August 2012, AnilKumar Ch wrote: > > This patch adds support for lis331dlh digital accelerometer to the > > lis3lv02d driver family. Adds ID field for detecting the lis331dlh > > module, based on this ID field lis3lv

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-23 Thread Chinmay V S
12bit it IS then. :-) LGTM. +1. On Thu, Aug 23, 2012 at 4:45 PM, AnilKumar, Chimata wrote: > Chinmay, > > On Thu, Aug 23, 2012 at 15:53:10, Chinmay V S wrote: >> > Note from datasheet, "1LSb=4g/4096 at 12bit representation, >> > ±2g Full-scale" >> >> Precisely my point. All the datasheet says is

RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-23 Thread AnilKumar, Chimata
Chinmay, On Thu, Aug 23, 2012 at 15:53:10, Chinmay V S wrote: > > Note from datasheet, "1LSb=4g/4096 at 12bit representation, > > ±2g Full-scale" > > Precisely my point. All the datasheet says is : > 1. It is +/-2G mode --> so Numerator is 4G. > 2. We are using 12bits --> so Denominator is 2^12 =

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-23 Thread Chinmay V S
> Note from datasheet, "1LSb=4g/4096 at 12bit representation, > ±2g Full-scale" Precisely my point. All the datasheet says is : 1. It is +/-2G mode --> so Numerator is 4G. 2. We are using 12bits --> so Denominator is 2^12 = 4096. There is no clear reason/justification as to why 12bits was chosen

RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-23 Thread AnilKumar, Chimata
On Wed, Aug 22, 2012 at 22:24:10, Chinmay V S wrote: > > 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 > > Had been through the applicatio

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-22 Thread Chinmay V S
> 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 Had been through the application note earlier. The table5 (on page 12) that you refer to, does

RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-22 Thread AnilKumar, Chimata
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

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-22 Thread Chinmay V S
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 --> 12

RE: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-22 Thread AnilKumar, Chimata
Hi Chinmay, Thanks for the comments On Wed, Aug 22, 2012 at 14:14:55, Chinmay V S wrote: > Hi All, > > A few nitpicks. > > > + * LIS3331DLH spec says 1LSBs corresponds 4G/1024 -> 1LSB is 1000/1024 mG. > > + * Sensitivity values for +/-2G, outdata in 12 bits for +/-2G scale. so 4 > > + * bits ad

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-22 Thread Chinmay V S
Hi All, A few nitpicks. > + * LIS3331DLH spec says 1LSBs corresponds 4G/1024 -> 1LSB is 1000/1024 mG. > + * Sensitivity values for +/-2G, outdata in 12 bits for +/-2G scale. so 4 > + * bits adjustment is required Shouldn't it be "1LSB is 4000/1024 mG" ? Also "outdata in 12bits" (typo. in->is?) O

Re: [PATCH v2] lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer

2012-08-22 Thread Arnd Bergmann
On Wednesday 22 August 2012, AnilKumar Ch wrote: > This patch adds support for lis331dlh digital accelerometer to the > lis3lv02d driver family. Adds ID field for detecting the lis331dlh > module, based on this ID field lis3lv02d driver will export the > lis331dlh module functionality. > > Signed-