login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
October
»
24
Re: [PATCH 05/12] hwmon: lis3: Power on corrections
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Éric Piel
Subject:
Re: [PATCH 05/12] hwmon: lis3: Power on corrections
Date: Sunday, October 24, 2010 - 7:22 am
Op 22-10-10 13:57, Samu Onkalo schreef:
quoted text
> Sometimes lis3 chip seems to fail to setup factory tuning at boot up. > This probably happens if there is some odd power ramp down ramp up sequence > for example in device restart. Set boot bit in control2 register to > trig boot sequence manually and wait until it is finished. > > Signed-off-by: Samu Onkalo<samu.p.onkalo@nokia.com> > Acked-by: Jonathan Cameron<jic23@cam.ac.uk>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
quoted text
> --- > drivers/hwmon/lis3lv02d.c | 19 +++++++++++-------- > drivers/hwmon/lis3lv02d.h | 1 + > 2 files changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c > index e2e0bb4..b44d4c5 100644 > --- a/drivers/hwmon/lis3lv02d.c > +++ b/drivers/hwmon/lis3lv02d.c > @@ -273,19 +273,22 @@ void lis3lv02d_poweron(struct lis3lv02d *lis3) > > lis3->init(lis3); > > - /* LIS3 power on delay is quite long */ > - msleep(lis3->pwron_delay / lis3lv02d_get_odr()); > - > /* > * Common configuration > * BDU: (12 bits sensors only) LSB and MSB values are not updated until > * both have been read. So the value read will always be correct. > + * Set BOOT bit to refresh factory tuning values. > */ > - if (lis3->whoami == WAI_12B) { > - lis3->read(lis3, CTRL_REG2,®); > - reg |= CTRL2_BDU; > - lis3->write(lis3, CTRL_REG2, reg); > - } > + lis3->read(lis3, CTRL_REG2,®); > + if (lis3->whoami == WAI_12B) > + reg |= CTRL2_BDU | CTRL2_BOOT; > + else > + reg |= CTRL2_BOOT_8B; > + lis3->write(lis3, CTRL_REG2, reg); > + > + /* LIS3 power on delay is quite long */ > + msleep(lis3->pwron_delay / lis3lv02d_get_odr()); > + > if (lis3->reg_ctrl) > lis3_context_restore(lis3); > } > diff --git a/drivers/hwmon/lis3lv02d.h b/drivers/hwmon/lis3lv02d.h > index 66e37b1..2ac27b9 100644 > --- a/drivers/hwmon/lis3lv02d.h > +++ b/drivers/hwmon/lis3lv02d.h > @@ -133,6 +133,7 @@ enum lis3lv02d_ctrl2 { > enum lis302d_ctrl2 { > HP_FF_WU2 = 0x08, > HP_FF_WU1 = 0x04, > + CTRL2_BOOT_8B = 0x40, > }; > > enum lis3lv02d_ctrl3 {
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH 05/12] hwmon: lis3: Power on corrections
, Samu Onkalo
, (Fri Oct 22, 4:57 am)
Re: [PATCH 05/12] hwmon: lis3: Power on corrections
, Éric Piel
, (Sun Oct 24, 7:22 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
Mingming Cao
Re: [RFC 1/4] Large Blocksize support for Ext2/3/4
Linus Torvalds
Linux 2.6.34-rc4
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Adeodato
Bazaar's patience diff as GIT_EXTERNAL_DIFF
Johannes Schindelin
Re: [PATCH 2/4] Add functions get_relative_cwd() and is_inside_dir()
Len Brown
Re: fatal: unable to create '.git/index': File exists
Denis Bueno
Git clone error
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color ga...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Sam Fourman Jr.
Re: Help with Altell PC6700
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Ursula Braun
[patch 0/1] remove header_ops bug in qeth driver
Colocation donated by:
Syndicate