aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/hp_accel.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-08hp_accel: Ignore the error from lis3lv02d_poweron() at resumeShuah Khan1-1/+2
The error in lis3lv02_poweron() is harmless in the resume path, so we should ignore it. It is inline with the other usages of lis3lv02_poweron() and matches the 3.0 code for this routine. This patch is in suse git and might have missed making it into the mainline. opensuse - commit id: 66ccdac87c322cf7af12bddba8c805af640b1cff Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Shuah Khan <[email protected]> CC: [email protected] 3.8, 3.4, 3.5, 3.2 Signed-off-by: Matthew Garrett <[email protected]>
2013-01-26ACPI: Remove useless type argument of driver .remove() operationRafael J. Wysocki1-1/+1
The second argument of ACPI driver .remove() operation is only used by the ACPI processor driver and the value passed to that driver through it is always available from the given struct acpi_device object's removal_type field. For this reason, the second ACPI driver .remove() argument is in fact useless, so drop it. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Jiang Liu <[email protected]> Acked-by: Toshi Kani <[email protected]> Acked-by: Yinghai Lu <[email protected]>
2012-09-21hp_accel: convert to module_acpi_driver()Mika Westerberg1-24/+1
Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Éric Piel <[email protected]> Signed-off-by: Len Brown <[email protected]>
2012-08-10platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEPRafael J. Wysocki1-1/+1
According to compiler warnings, quite some suspend/resume functions in platform x86 drivers are not used for CONFIG_PM_SLEEP unset, so add #ifdefs to prevent them from being built in that case. Signed-off-by: Rafael J. Wysocki <[email protected]>
2012-07-01hp_accel: Use struct dev_pm_ops for power managementRafael J. Wysocki1-7/+8
Make the hp_accel driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Éric Piel <[email protected]>
2012-07-01ACPI / PM: Drop pm_message_t argument from device suspend callbackRafael J. Wysocki1-1/+1
None of the drivers implementing the ACPI device suspend callback uses the pm_message_t argument of it, so this argument may be dropped entirely from that callback. This will simplify switching the ACPI bus type to PM handling based on struct dev_pm_ops. Signed-off-by: Rafael J. Wysocki <[email protected]>
2011-10-31Merge branch 'akpm' (Andrew's incoming)Linus Torvalds1-4/+6
Quoth Andrew: - Most of MM. Still waiting for the poweroc guys to get off their butts and review some threaded hugepages patches. - alpha - vfs bits - drivers/misc - a few core kerenl tweaks - printk() features - MAINTAINERS updates - backlight merge - leds merge - various lib/ updates - checkpatch updates * akpm: (127 commits) epoll: fix spurious lockdep warnings checkpatch: add a --strict check for utf-8 in commit logs kernel.h/checkpatch: mark strict_strto<foo> and simple_strto<foo> as obsolete llist-return-whether-list-is-empty-before-adding-in-llist_add-fix wireless: at76c50x: follow rename pack_hex_byte to hex_byte_pack fat: follow rename pack_hex_byte() to hex_byte_pack() security: follow rename pack_hex_byte() to hex_byte_pack() kgdb: follow rename pack_hex_byte() to hex_byte_pack() lib: rename pack_hex_byte() to hex_byte_pack() lib/string.c: fix strim() semantics for strings that have only blanks lib/idr.c: fix comment for ida_get_new_above() lib/percpu_counter.c: enclose hotplug only variables in hotplug ifdef lib/bitmap.c: quiet sparse noise about address space lib/spinlock_debug.c: print owner on spinlock lockup lib/kstrtox: common code between kstrto*() and simple_strto*() functions drivers/leds/leds-lp5521.c: check if reset is successful leds: turn the blink_timer off before starting to blink leds: save the delay values after a successful call to blink_set() drivers/leds/leds-gpio.c: use gpio_get_value_cansleep() when initializing drivers/leds/leds-lm3530.c: add __devexit_p where needed ...
2011-10-31lis3: change exported function to use passed parameterÉric Piel1-2/+2
Change exported functions to use the device given as parameter instead of the global one. Signed-off-by: Ilkka Koskinen <[email protected]> Signed-off-by: Éric Piel <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Witold Pilat <[email protected]> Cc: Lyall Pearce <[email protected]> Cc: Malte Starostik <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Cc: Christian Lamparter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-31hp_accel: add HP ProBook 655xÉric Piel1-0/+1
Add axis correction for HP ProBook 6555b. Signed-off-by: Malte Starostik <[email protected]> Signed-off-by: Éric Piel <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Witold Pilat <[email protected]> Cc: Lyall Pearce <[email protected]> Cc: Ilkka Koskinen <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Cc: Christian Lamparter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-31lis3: add support for HP EliteBook 8540wÉric Piel1-0/+1
Add axis correction for HP EliteBook 8540w. Reported-by: Lyall Pearce <[email protected]> Signed-off-by: Éric Piel <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Witold Pilat <[email protected]> Cc: Malte Starostik <[email protected]> Cc: Ilkka Koskinen <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Cc: Christian Lamparter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-31lis3: add support for HP EliteBook 2730pÉric Piel1-0/+1
Add axis correction for HP EliteBook 2730p. Tested-by: Witold Pilat <[email protected]> Signed-off-by: Éric Piel <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Lyall Pearce <[email protected]> Cc: Malte Starostik <[email protected]> Cc: Ilkka Koskinen <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Cc: Christian Lamparter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-31lis3lv02d: avoid divide by zero due to uncheckedÉric Piel1-2/+1
After an "unexpected" reboot, I found this Oops in my logs: divide error: 0000 [#1] PREEMPT SMP=20 CPU 0=20 Modules linked in: lis3lv02d hp_wmi input_polldev [...] Pid: 390, comm: modprobe Tainted: G C 2.6.39-rc7-wl+=20 RIP: 0010:[<ffffffffa014b427>] [<ffffffffa014b427>] lis3lv02d_poweron+0x4e/0x94 [lis3lv02d] RSP: 0018:ffff8801d6407cf8 EFLAGS: 00010246 RAX: 0000000000000bb8 RBX: ffffffffa014e000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffea00066e4708 RDI: ffff8801df002700 RBP: ffff8801d6407d18 R08: ffffea00066c5a30 R09: ffffffff812498c9 R10: ffff8801d7bfcea0 R11: ffff8801d7bfce10 R12: 0000000000000bb8 R13: 00000000ffffffda R14: ffffffffa0154120 R15: ffffffffa0154030 =46S: 00007fc0705db700(0000) GS:ffff8801dfa00000(0000) knlGS:0 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007f33549174f0 CR3: 00000001d65c9000 CR4: 00000000000406f0 Process modprobe (pid: 390, threadinfo ffff8801d6406000, task ffff8801d6b40= 000) Stack: ffffffffa0154120 62ffffffa0154030 ffffffffa014e000 00000000ffffffea ffff8801d6407d58 ffffffffa014bcc1 0000000000000000 0000000000000048 ffff8801d8bae800 00000000ffffffea 00000000ffffffda ffffffffa0154120 Call Trace: [<ffffffffa014bcc1>] lis3lv02d_init_device+0x1ce/0x496 [lis3lv02d] [<ffffffffa01522ff>] lis3lv02d_add+0x10f/0x17c [hp_accel] [<ffffffff81233e11>] acpi_device_probe+0x49/0x117 [...] Code: 3a 75 06 80 4d ef 50 eb 04 80 4d ef 40 0f b6 55 ef be 21 00 00 00 48 89 df ff 53 18 44 8b 63 6c e8 3e fc ff ff 89 c1 44 89 e0 99 <f7> f9 89 c7 e8 93 82 ef e0 48 83 7b 30 00 74 2d 45 31 e4 80 7b=20 RIP [<ffffffffa014b427>] lis3lv02d_poweron+0x4e/0x94 [lis3lv02d] RSP <ffff8801d6407cf8> >From my POV, it looks like the hardware is not working as expected and returns a bogus data rate. The driver doesn't check the result and directly uses it as some sort of divisor in some places: msleep(lis3->pwron_delay / lis3lv02d_get_odr()); Under this circumstances, this could very well cause the "divide by zero" exception from above. For now, I fixed it the easiest and most obvious way: Check if the result is sane and if it isn't use a sane default instead. I went for "100" in the latter case, simply because /sys/devices/platform/lis3lv02d/rate returns it on a successful boot. Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Éric Piel <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Witold Pilat <[email protected]> Cc: Lyall Pearce <[email protected]> Cc: Malte Starostik <[email protected]> Cc: Ilkka Koskinen <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Cc: Christian Lamparter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-24hp_accel: Add axis-mapping for HP ProBook / EliteBookTakashi Iwai1-0/+4
Add the corrected axis-mapping for some HP laptops. Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-10-24hp_accel: Add a new PNP idTakashi Iwai1-0/+1
New HP laptops assign a new PNP id "HPQ6000" for DriveGuard. Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2011-03-21hp_accel: Fix driver nameJean Delvare1-1/+1
I suspect that the "lis3lv02d" driver name is a legacy from before the split into several modules. Use a specific name for the hp_accel driver, for better error messages and easier investigation of issues. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: Eric Piel <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Tested-by: Eric Piel <[email protected]> Tested-by: Takashi Iwai <[email protected]>
2011-03-21Move lis3lv02d drivers to drivers/miscJean Delvare1-1/+1
The lis3lv02d drivers aren't hardware monitoring drivers, so the don't belong to drivers/hwmon. Move them to drivers/misc, short of a better home. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: Eric Piel <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Tested-by: Eric Piel <[email protected]> Tested-by: Takashi Iwai <[email protected]>
2011-03-21Move hp_accel to drivers/platform/x86Jean Delvare1-0/+404
The hp_accel driver isn't a hardware monitoring driver, so it doesn't belong to drivers/hwmon. Move it to drivers/platform/x86, assuming HP doesn't ship non-x86 laptops. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: Eric Piel <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Tested-by: Eric Piel <[email protected]> Tested-by: Takashi Iwai <[email protected]>