summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'x86-platform-for-linus' of ↵Linus Torvalds2012-01-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel config: Fix the APB_TIMER selection x86/mrst: Add additional debug prints for pb_keys x86/intel config: Revamp configuration to allow for Moorestown and Medfield x86/intel/scu/ipc: Match the changes in the x86 configuration x86/apb: Fix configuration constraints x86: Fix INTEL_MID silly x86/Kconfig: Cyclone-timer depends on x86-summit x86: Reduce clock calibration time during slave cpu startup x86/config: Revamp configuration for MID devices x86/sfi: Kill the IRQ as id hack
| * Merge commit 'v3.2-rc6' into x86/platformIngo Molnar2011-12-181-5/+16
| |\
| * | x86/intel/scu/ipc: Match the changes in the x86 configurationAlan Cox2011-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to depend on INTEL_MID because the SCU is Moorestown and Medfield. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: mjg@redhat.com Link: http://lkml.kernel.org/r/20111217174215.7096.7786.stgit@bob.linux.org.uk Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | | Merge branch 'pm-for-linus' of ↵Linus Torvalds2012-01-081-9/+6Star
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm * 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits) PM / Hibernate: Implement compat_ioctl for /dev/snapshot PM / Freezer: fix return value of freezable_schedule_timeout_killable() PM / shmobile: Allow the A4R domain to be turned off at run time PM / input / touchscreen: Make st1232 use device PM QoS constraints PM / QoS: Introduce dev_pm_qos_add_ancestor_request() PM / shmobile: Remove the stay_on flag from SH7372's PM domains PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode PM: Drop generic_subsys_pm_ops PM / Sleep: Remove forward-only callbacks from AMBA bus type PM / Sleep: Remove forward-only callbacks from platform bus type PM: Run the driver callback directly if the subsystem one is not there PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412. PM / Sleep: Merge internal functions in generic_ops.c PM / Sleep: Simplify generic system suspend callbacks PM / Hibernate: Remove deprecated hibernation snapshot ioctls PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled() ARM: S3C64XX: Implement basic power domain support PM / shmobile: Use common always on power domain governor ... Fix up trivial conflict in fs/xfs/xfs_buf.c due to removal of unused XBT_FORCE_SLEEP bit
| * \ \ Merge branch 'master' into pm-sleepRafael J. Wysocki2011-12-211-5/+16
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (848 commits) SELinux: Fix RCU deref check warning in sel_netport_insert() binary_sysctl(): fix memory leak mm/vmalloc.c: remove static declaration of va from __get_vm_area_node ipmi_watchdog: restore settings when BMC reset oom: fix integer overflow of points in oom_badness memcg: keep root group unchanged if creation fails nilfs2: potential integer overflow in nilfs_ioctl_clean_segments() nilfs2: unbreak compat ioctl cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask evm: prevent racing during tfm allocation evm: key must be set once during initialization mmc: vub300: fix type of firmware_rom_wait_states module parameter Revert "mmc: enable runtime PM by default" mmc: sdhci: remove "state" argument from sdhci_suspend_host x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT IB/qib: Correct sense on freectxts increment and decrement RDMA/cma: Verify private data length cgroups: fix a css_set not found bug in cgroup_attach_proc oprofile: Fix uninitialized memory access when writing to writing to oprofilefs Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel" ... Conflicts: kernel/cgroup_freezer.c
| * | | freezer: implement and use kthread_freezable_should_stop()Tejun Heo2011-11-211-9/+6Star
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writeback and thinkpad_acpi have been using thaw_process() to prevent deadlock between the freezer and kthread_stop(); unfortunately, this is inherently racy - nothing prevents freezing from happening between thaw_process() and kthread_stop(). This patch implements kthread_freezable_should_stop() which enters refrigerator if necessary but is guaranteed to return if kthread_stop() is invoked. Both thaw_process() users are converted to use the new function. Note that this deadlock condition exists for many of freezable kthreads. They need to be converted to use the new should_stop or freezable workqueue. Tested with synthetic test case. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Jens Axboe <axboe@kernel.dk> Cc: Oleg Nesterov <oleg@redhat.com>
* | | Merge branch 'for-linus2' of ↵Linus Torvalds2012-01-086-9/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits) reiserfs: Properly display mount options in /proc/mounts vfs: prevent remount read-only if pending removes vfs: count unlinked inodes vfs: protect remounting superblock read-only vfs: keep list of mounts for each superblock vfs: switch ->show_options() to struct dentry * vfs: switch ->show_path() to struct dentry * vfs: switch ->show_devname() to struct dentry * vfs: switch ->show_stats to struct dentry * switch security_path_chmod() to struct path * vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb vfs: trim includes a bit switch mnt_namespace ->root to struct mount vfs: take /proc/*/mounts and friends to fs/proc_namespace.c vfs: opencode mntget() mnt_set_mountpoint() vfs: spread struct mount - remaining argument of next_mnt() vfs: move fsnotify junk to struct mount vfs: move mnt_devname vfs: move mnt_list to struct mount vfs: switch pnode.h macros to struct mount * ...
| * | | switch procfs to umode_t useAl Viro2012-01-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | both proc_dir_entry ->mode and populating functions Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | switch ->is_visible() to returning umode_tAl Viro2012-01-043-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * | | switch sysfs attr->mode to umode_tAl Viro2012-01-041-1/+1
| | |/ | |/| | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | | Merge branch 'driver-core-next' into Linux 3.2Greg Kroah-Hartman2012-01-062-18/+18
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file, and it fixes the build error in the arch/x86/kernel/microcode_core.c file, that the merge did not catch. The microcode_core.c patch was provided by Stephen Rothwell <sfr@canb.auug.org.au> who was invaluable in the merge issues involved with the large sysdev removal process in the driver-core tree. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | driver-core: remove sysdev.h usage.Kay Sievers2011-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sysdev.h file should not be needed by any in-kernel code, so remove the .h file from these random files that seem to still want to include it. The sysdev code will be going away soon, so this include needs to be removed no matter what. Cc: Jiandong Zheng <jdzheng@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: David Brown <davidb@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: "Venkatesh Pallipadi Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
| * | ibm_rtl: convert sysdev_class to a regular subsystemKay Sievers2011-12-151-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | toshiba_acpi: Fix machines that don't support HCI_SYSTEM_EVENTSeth Forshee2011-12-051-5/+16
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | The Satellite C670-10V generates notifications for hotkeys but does not support HCI_SYSTEM_EVENT. As a result when a hotkey is pressed it gets stuck in an infinite loop in toshiba_acpi_notify. To fix this, detect whether or not HCI_SYSTEM_EVENT is supported up-front and don't try to read system events if it isn't supported. In addition, limit the number of retries when reading HCI_SYSTEM_EVENT fails so that this loop cannot run unbounded. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* | platform/x86: fix dell-laptop function prototypesRandy Dunlap2011-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | Fix build warnings: drivers/platform/x86/dell-laptop.c:592:13: warning: function declaration isn't a prototype drivers/platform/x86/dell-laptop.c:599:13: warning: function declaration isn't a prototype Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | x86 platform drivers: add POWER_SUPPLY to selected drivers for DellLinus Torvalds2011-11-081-1/+1
| | | | | | | | | | | | The Kconfig loop detection goes crazy without this. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | x86 platform drivers: make Dell laptop driver select needed LED supportLinus Torvalds2011-11-081-0/+2
|/ | | | | | | | | | | | | | | | Otherwise we get compile errors like this: ERROR: "led_classdev_unregister" [drivers/platform/x86/dell-laptop.ko] undefined! ERROR: "led_classdev_register" [drivers/platform/x86/dell-laptop.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 when the dell-laptop support is enabled without the necessary LED support being enabled. Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds2011-11-073-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
| * x86: fix up files really needing to include module.hPaul Gortmaker2011-11-013-0/+3
| | | | | | | | | | | | | | These files aren't just exporting symbols -- they are also defining a MODULE_LICENSE etc. so give them the full module.h file. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | Merge branch 'akpm' (Andrew's incoming)Linus Torvalds2011-11-011-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 ...
| * | lis3: change exported function to use passed parameterÉric Piel2011-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change exported functions to use the device given as parameter instead of the global one. Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Witold Pilat <witold.pilat@gmail.com> Cc: Lyall Pearce <lyall.pearce@hp.com> Cc: Malte Starostik <m-starostik@versanet.de> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | hp_accel: add HP ProBook 655xÉric Piel2011-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add axis correction for HP ProBook 6555b. Signed-off-by: Malte Starostik <m-starostik@versanet.de> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Witold Pilat <witold.pilat@gmail.com> Cc: Lyall Pearce <lyall.pearce@hp.com> Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | lis3: add support for HP EliteBook 8540wÉric Piel2011-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add axis correction for HP EliteBook 8540w. Reported-by: Lyall Pearce <lyall.pearce@hp.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Witold Pilat <witold.pilat@gmail.com> Cc: Malte Starostik <m-starostik@versanet.de> Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | lis3: add support for HP EliteBook 2730pÉric Piel2011-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add axis correction for HP EliteBook 2730p. Tested-by: Witold Pilat <witold.pilat@gmail.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Lyall Pearce <lyall.pearce@hp.com> Cc: Malte Starostik <m-starostik@versanet.de> Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | lis3lv02d: avoid divide by zero due to uncheckedÉric Piel2011-11-011-2/+1Star
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <chunkeey@googlemail.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Witold Pilat <witold.pilat@gmail.com> Cc: Lyall Pearce <lyall.pearce@hp.com> Cc: Malte Starostik <m-starostik@versanet.de> Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds2011-11-0114-599/+1395
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (45 commits) acer-wmi: replaced the hard coded bitmap by the communication devices bitmap from SMBIOS acer-wmi: check the existence of internal wireless device when set capability acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks sony-laptop:irq: Remove IRQF_DISABLED asus-laptop: Add rfkill support for Pegatron Lucid tablet asus-laptop: pega_accel - Report accelerometer orientation change through udev asus-laptop: fix module description asus-laptop: hide leds on Pegatron Lucid asus-laptop: Pegatron Lucid accelerometer asus-laptop: allow boot time control of Pegatron ALS sensor Platform: samsung_laptop: add support for X520 machines. platform: samsung_laptop: add dmi information for Samsung R700 laptops hp_accel: Add axis-mapping for HP ProBook / EliteBook hp_accel: Add a new PNP id WMI: properly cleanup devices to avoid crashes ideapad: remove sysfs node for cfg ideapad: add debugfs support ideapad: add event for Novo key ideapad: change parameter of ideapad_sync_rfk_state ideapad: define vpc commands ...
| * acer-wmi: replaced the hard coded bitmap by the communication devices bitmap ↵Lee, Chun-Yi2011-10-241-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from SMBIOS Before set communication devices state, we need query out all devices state to set the states bitmap. That will be better use the devices bitmap in SMBIOS type Aah instead of hardcode in driver. Tested on Acer Travelmate 8572. Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * acer-wmi: check the existence of internal wireless device when set capabilityLee, Chun-Yi2011-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will be better to check the existence of internal wireless device when we set wireless capability and generate killswitch for it. It can avoid userland access wireless rfkill but the machine doesn't have internal wireless device. Tested on Acer Travelmate 8572 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooksLee, Chun-Yi2011-10-241-203/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have new acer notebooks' BIOS provide new WMID_GUID3 and ACERWMID_EVENT_GUID methods. Some of machines still keep the old WMID_GUID1 method but more and more machines were already removed old wmi methods from DSDT. So, this patch add a new ACER_WMID_v2 interface flag to represent new acer notebooks, the following is definition: + ACER_WMID: It means this machine only provides WMID_GUID1/2 methods. + ACER_WMID_v2: It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID methods. Some ACER_WMID_v2 machines also provide old WMID_GUID1/2 methods, but we still query/set communication device's state by new WMID_GUID3 method. Tested on Acer Travelmate 8572 Tested on Acer Aspire 4739Z Tested-by: AceLan Kao <acelan.kao@canonical.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * sony-laptop:irq: Remove IRQF_DISABLEDYong Zhang2011-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * asus-laptop: Add rfkill support for Pegatron Lucid tabletAnisse Astier2011-10-241-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add three new rfkill switches in this driver that are specific to Pegatron Lucid tablet. Please note that you might not need all three switches. For example if you don't have a 3G module inside your tablet. Also, on my device, the gpio for the wifi/bt module is connected to the bluetooth line. Therefore to activate your wireless lan interface, you need to use the "pega-bt" rfkill switch. Finally, the rfkill switch only works before the wireless module is loaded the first time. Unloading ath9k doesn't help, a reboot is necessary. Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * asus-laptop: pega_accel - Report accelerometer orientation change through udevAnisse Astier2011-10-241-0/+8
| | | | | | | | | | | | Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * asus-laptop: fix module descriptionCorentin Chary2011-10-241-4/+4
| | | | | | | | | | Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * asus-laptop: hide leds on Pegatron LucidCorentin Chary2011-10-241-0/+7
| | | | | | | | | | Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * asus-laptop: Pegatron Lucid accelerometerAndy Ross2011-10-242-5/+133
| | | | | | | | | | | | | | | | | | Support the built-in accelerometer on the Lucid tablets as a standard 3-axis input device. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * asus-laptop: allow boot time control of Pegatron ALS sensorAndy Ross2011-10-241-1/+7
| | | | | | | | | | | | Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * Platform: samsung_laptop: add support for X520 machines.Tommaso Massimi2011-10-241-0/+9
| | | | | | | | | | | | | | | | | | my samsung laptop would be very happy if you add these lines to the file drivers/platform/x86/samsung-laptop.c Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * platform: samsung_laptop: add dmi information for Samsung R700 laptopsStefan Beller2011-10-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My DMI model is this: >dmesg |grep DMI [ 0.000000] DMI present. [ 0.000000] DMI: SAMSUNG ELECTRONICS CO., LTD. SR700/SR700, BIOS 04SR 02/20/2008 adding dmi information of Samsung R700 laptops This adds the dmi information of Samsungs R700 laptops. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * hp_accel: Add axis-mapping for HP ProBook / EliteBookTakashi Iwai2011-10-241-0/+4
| | | | | | | | | | | | | | Add the corrected axis-mapping for some HP laptops. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * hp_accel: Add a new PNP idTakashi Iwai2011-10-241-0/+1
| | | | | | | | | | | | | | New HP laptops assign a new PNP id "HPQ6000" for DriveGuard. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * WMI: properly cleanup devices to avoid crashesDmitry Torokhov2011-10-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to remove devices that we destroy from the list, otherwise we'll crash if there are more than one "_WDG" methods in DSDT. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052 Tested-by: Ilya Tumaykin <librarian_rus@yahoo.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * ideapad: remove sysfs node for cfgIke Panhc2011-10-241-12/+0Star
| | | | | | | | | | | | | | Replaced by the one in debugfs. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * ideapad: add debugfs supportIke Panhc2011-10-241-0/+152
| | | | | | | | | | | | | | | | Add two nodes in debugfs which shows cfg value and its meaning, and status info read from VPC2004. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * ideapad: add event for Novo keyIke Panhc2011-10-241-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Novo key is the Lenovo define key on every ideapads, which has two definition. Long press and short click. Driver will report KEY_PROG1 on short click and KEY_PROG2 when long press. On pre-install OS for ideapads there are application waiting for the event and there is no such application for Linux yet, so I think to report KEY_PROG is fine in anyway. Also change the scancode from hex to decimal because they are related to vpc bit in notify function which is in decimal. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * ideapad: change parameter of ideapad_sync_rfk_stateIke Panhc2011-10-241-4/+3Star
| | | | | | | | | | | | | | This could save us a local variable. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * ideapad: define vpc commandsIke Panhc2011-10-241-16/+41
| | | | | | | | | | | | | | Better then write hex number everywhere. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * intel_scu_ipcutil: fix major device number handlingKirill A. Shutemov2011-10-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | We need to save major device number to be able to use it for unregister_chrdev() in ipc_module_exit(). ipc_module_init() must return 0 on success, not major device number. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * [PATCH] ideapad: Check if acpi already handle backlight power to avoid a ↵Rene Bollford2011-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | page fault This patch avoid a page fault in the ideapad-laptop extras when turning the backlight power on or off. Signed-off-by: Rene Bolldorf <xsecute@googlemail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * acer-wmi: check wireless capability flag before register rfkillLee, Chun-Yi2011-10-241-22/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There will be better to check the wireless capability flag (ACER_CAP_WIRELESS) before register wireless rfkill because maybe the machine doesn't have wifi module or the module removed by user. Tested on Acer Travelmate 8572 Tested on Acer Aspire 4739Z Tested-by: AceLan Kao <acelan.kao@canonical.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * platform-drivers-x86: asus-laptop: fix wrong test for successful registered ↵Axel Lin2011-10-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | led_classdev device_create returns &struct device pointer on success, or ERR_PTR() on error. Thus if led_classdev_register fails, led_cdev->dev is always not NULL. Thus to unregister a successful registered led_classdev, we should check IS_ERR_OR_NULL macro for led_cdev->dev instead of checking if led_cdev->dev is NULL or not. we use IS_ERR_OR_NULL instead of IS_ERR because if we havn't call led_classdev_register, the led_cdev->dev is NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>