aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lis3lv02d.h
diff options
context:
space:
mode:
authorEric Piel <eric.piel@tremplin-utc.net>2009-06-16 18:34:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 22:47:57 -0400
commita002ee896dfd08ce9fba44e9ae513c9094699a27 (patch)
tree3a66ea80ad5523359e3f3f34be39d902d84706bb /drivers/hwmon/lis3lv02d.h
parentc28842421cb6a29fd952043381bc5391bdf6be50 (diff)
lis3: remove automatic shutdown of the device
After measurement on my laptop, it seems that turning off the device does not bring any energy saving (within 0.1W precision). So let's keep the device always on. It simplifies the code, and it avoids the problem of reading a wrong value sometimes just after turning the device on. Moreover, since commit ef2cfc790bf5f0ff189b01eabc0f4feb5e8524df had been too zealous, the device was actually never turned off anyway. This patch also restores the damages done by this commit concerning the initialisation/poweroff. Also do more clean up with the usage of the lis3_dev global variable. Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon/lis3lv02d.h')
-rw-r--r--drivers/hwmon/lis3lv02d.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/hwmon/lis3lv02d.h b/drivers/hwmon/lis3lv02d.h
index 745ec96806d4..b007d8184212 100644
--- a/drivers/hwmon/lis3lv02d.h
+++ b/drivers/hwmon/lis3lv02d.h
@@ -171,14 +171,11 @@ struct lis3lv02d {
171 171
172 struct input_dev *idev; /* input device */ 172 struct input_dev *idev; /* input device */
173 struct task_struct *kthread; /* kthread for input */ 173 struct task_struct *kthread; /* kthread for input */
174 struct mutex lock;
175 struct platform_device *pdev; /* platform device */ 174 struct platform_device *pdev; /* platform device */
176 atomic_t count; /* interrupt count after last read */ 175 atomic_t count; /* interrupt count after last read */
177 int xcalib; /* calibrated null value for x */ 176 int xcalib; /* calibrated null value for x */
178 int ycalib; /* calibrated null value for y */ 177 int ycalib; /* calibrated null value for y */
179 int zcalib; /* calibrated null value for z */ 178 int zcalib; /* calibrated null value for z */
180 unsigned char is_on; /* whether the device is on or off */
181 unsigned char usage; /* usage counter */
182 struct axis_conversion ac; /* hw -> logical axis */ 179 struct axis_conversion ac; /* hw -> logical axis */
183 180
184 u32 irq; /* IRQ number */ 181 u32 irq; /* IRQ number */
@@ -192,6 +189,6 @@ int lis3lv02d_joystick_enable(void);
192void lis3lv02d_joystick_disable(void); 189void lis3lv02d_joystick_disable(void);
193void lis3lv02d_poweroff(struct lis3lv02d *lis3); 190void lis3lv02d_poweroff(struct lis3lv02d *lis3);
194void lis3lv02d_poweron(struct lis3lv02d *lis3); 191void lis3lv02d_poweron(struct lis3lv02d *lis3);
195int lis3lv02d_remove_fs(void); 192int lis3lv02d_remove_fs(struct lis3lv02d *lis3);
196 193
197extern struct lis3lv02d lis3_dev; 194extern struct lis3lv02d lis3_dev;