aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/math64.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-08-19Input: psmouse - allow defining read-only attributesDmitry Torokhov1-5/+16
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-12Input: eeti_ts - allow active high irq linesDaniel Mack2-3/+28
This adds a struct eeti_ts_platform_data which currently holds only one value to specify the interrupt polarity. The driver has a fallback if no platform data is passed in via the i2c_board_info, so no regression is caused. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-09Input: w90p910_keypad - adjust to use definitions from matrix_keypad.hDmitry Torokhov2-83/+66
Also have the driver send MSC_SCAN events as most keyboards do to aid in updating keymap from userspace. Tested-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-09Input: add keypad driver for w90p910Wan ZongShun4-0/+334
Add keypad driver for the 4x4 keypad on an evaluation board based on w90p910. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Reviewed-by: Trilok Soni <soni.trilok@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-09Input: combine hil_kbd and hil_ptr driversDmitry Torokhov5-493/+219
hil_kbd and hil_ptr look like twins so it makes sense to combine them into a single driver. [deller@gmx.de: add MODULE_ALIAS() entry for mouse] Tested-by: Helge Deller <deller@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-09Input: hil_kbd - prepare for merging with hil_ptrDmitry Torokhov1-78/+78
Rename functions and variables from [hil_]kbd to [hil_]dev in preparation of merging hil_kbd and hil_ptr. Tested-by: Helge Deller <deller@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-09Input: hil_kbd - switch to use completion instead of semaphoreDmitry Torokhov1-132/+140
Stop abusing semaphore for waiting, use completion instead. Also handle errors from input_register_device. Tested-by: Helge Deller <deller@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-08Input: wistron_btns - switch to using dev_pm_opsDmitry Torokhov1-29/+37
Also start using 'bool' where it makes sense. Tested-by: Giuseppe Mazzotta <g.mazzotta@iragan.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-05Input: serio - don't use serio->write() directlyDmitry Torokhov6-86/+91
We have a nice wrapper for that. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-05Input: hgpk - forced recalibration for the OLPC touchpadPaul Fox1-3/+52
The OLPC XO laptop incorporates a combination touchpad/tablet device which unfortunately requires frequent recalibration. The driver will force this automatically when various suspicious behaviors are observed, and the user can recalibrate manually (with a special keyboard sequence). There's currently no way, however, for an external program to cause recalibration. We can not use the reconnect capability which is already available in /sys because full reset of the touchpad takes 1.1 - 1.2 secons which is too long. This patch creates a new node in /sys which, when written with '1', will force a touchpad recalibration; no other writes (or reads) of this node are supported. Signed-off-by: Paul Fox <pgf@laptop.org> Acked-by: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-04Input: tsc2007 - check if I2C communication works during probeRichard Röjfors1-3/+5
Check the result when sending the power down command to the controller. Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-08-04Input: tsc2007 - make get_pendown_state platform callback optionalDmitry Torokhov1-79/+93
In cases when get_pendown_state callback is not available have the driver to fallback on pressure calculation to determine if the pen is up. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-27Input: usbtouchscreen - add support for e2i touchscreen controllerFlorian Echtler2-0/+54
This patch adds support for the e2i touchscreen controller used in the Mimo 740 (and probably in other e2i touchscreen products). Tested on Mimo 740. Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: tsc2007 - do not read coordinates during probeRichard Röjfors1-2/+3
Don't read coordinates during probe of the driver, just power down the controller and wait for interrupts. Signed-off-by: Richard Röjfors<richard.rojfors.ext@mocean-labs.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: tsc2007 - make init/exit platform hw callbacks optionalRichard Röjfors1-3/+6
Make init_platform_hw and exit_platform_hw callbacks optional since they are not needed on all platforms. Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: tsc2007 - properly shut off interrupts/delayed workDmitry Torokhov1-30/+42
Properly shut off interrupts/delayed work by free-ing IRQ first and then ensuring that enable/disable is balanced. Also add __devinit/__devexit markings, restore poll delay/period scheduling logic, make sure we call exit_platform_hw() method when probe fails. Tested-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: tsc2007 - remove HR timerRichard Röjfors1-35/+13
Since it's not allowed to do synchronous I2C in the HR timer callback context we have to switch to using the global workqueue. The work is scheduled every 1ms when polling rather than 5 us. Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: pxa27x_keypad - switch to using dev_pm_opsDmitry Torokhov1-7/+12
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: serio - switch to using dev_pm_opsDmitry Torokhov2-14/+11
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-26Input: i8042 - switch to using dev_pm_opsDmitry Torokhov1-26/+18
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-24Input: gpio_keys - swtich to dev_pm_opsMike Rapoport1-7/+12
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-24Driver Core: Make PM operations a const pointerDmitry Torokhov4-16/+19
They are not supposed to be modified by drivers, so make them const. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-07-23Input: bf54x-keys - convert printk() to dev_*()Mike Frysinger1-17/+9
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-23Input: add Blackfin rotary input driverMichael Hennerich4-0/+333
This driver handles the Blackfin on-chip rotary peripheral. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-22Input: pxa27x_keypad - remove extra clk_disableDmitry Torokhov2-25/+21
clk_disable() in remove method is not needed since we already have clk_disable in pxa27x_keypad_close(). Also make sure the driver uses resource_size() and helpers from include/input/matrix_keypad.h Tested-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-22Linux 2.6.31-rc4Linus Torvalds1-1/+1
2009-07-22genirq: Fix UP compile failure caused by irq_thread_check_affinityBruno Premont1-0/+5
Since genirq: Delegate irq affinity setting to the irq thread (591d2fb02ea80472d846c0b8507007806bdd69cc) compilation with CONFIG_SMP=n fails with following error: /usr/src/linux-2.6/kernel/irq/manage.c: In function 'irq_thread_check_affinity': /usr/src/linux-2.6/kernel/irq/manage.c:475: error: 'struct irq_desc' has no member named 'affinity' make[4]: *** [kernel/irq/manage.o] Error 1 That commit adds a new function irq_thread_check_affinity() which uses struct irq_desc.affinity which is only available for CONFIG_SMP=y. Move that function under #ifdef CONFIG_SMP. [ tglx@brownpaperbag: compile and boot tested on UP and SMP ] Signed-off-by: Bruno Premont <bonbons@linux-vserver.org> LKML-Reference: <20090722222232.2eb3e1c4@neptune.home> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-07-22lockdep: Fix lockdep annotation for pipe_double_lock()Peter Zijlstra1-2/+2
The presumed use of the pipe_double_lock() routine is to lock 2 locks in a deadlock free way by ordering the locks by their address. However it fails to keep the specified lock classes in order and explicitly annotates a deadlock. Rectify this. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Miklos Szeredi <mszeredi@suse.cz> LKML-Reference: <1248163763.15751.11098.camel@twins>
2009-07-22perf: fix stack data leakArjan van de Ven1-0/+1
the "reserved" field was not initialized to zero, resulting in 4 bytes of stack data leaking to userspace.... Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-22perf_counter tools: Give perf top inherit optionMike Galbraith1-1/+5
Currently, perf top -p only tracks the pid provided, which isn't very useful for watching forky loads, so give it an inherit option. Signed-off-by: Mike Galbraith <efault@gmx.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1248165036.9795.10.camel@marge.simson.net>
2009-07-22perf_counter tools: Fix vmlinux symbol generation breakageMike Galbraith1-2/+5
vmlinux meets the criteria for symbol adjustment, which breaks vmlinux generated symbols. Fix this by exempting vmlinux. This is a bit fragile in that someone could change the kernel dso's name, but currently that name is also hardwired. Signed-off-by: Mike Galbraith <efault@gmx.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1248091298.18702.18.camel@marge.simson.net>
2009-07-22perf_counter: Detect debugfs locationJason Baron5-17/+102
If "/sys/kernel/debug" is not a debugfs mount point, search for the debugfs filesystem in /proc/mounts, but also allows the user to specify '--debugfs-dir=blah' or set the environment variable: 'PERF_DEBUGFS_DIR' Signed-off-by: Jason Baron <jbaron@redhat.com> [ also made it probe "/debug" by default ] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090721181629.GA3094@redhat.com>
2009-07-22perf_counter: Add tracepoint support to perf list, perf statJason Baron2-1/+176
Add support to 'perf list' and 'perf stat' for kernel tracepoints. The implementation creates a 'for_each_subsystem' and 'for_each_event' for easy iteration over the tracepoints. Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <426129bf9fcc8ee63bb094cf736e7316a7dcd77a.1248190728.git.jbaron@redhat.com>
2009-07-22perf symbol: C++ demanglingArnaldo Carvalho de Melo2-3/+20
[acme@doppio ~]$ perf report -s comm,dso,symbol -C firefox -d /usr/lib64/xulrunner-1.9.1/libxul.so | grep :: | head 2.21% [.] nsDeque::Push(void*) 1.78% [.] GraphWalker::DoWalk(nsDeque&) 1.30% [.] GCGraphBuilder::AddNode(void*, nsCycleCollectionParticipant*) 1.27% [.] XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) 1.18% [.] imgContainer::DrawFrameTo(gfxIImageFrame*, gfxIImageFrame*, nsRect&) 1.13% [.] nsDeque::PopFront() 1.11% [.] nsGlobalWindow::RunTimeout(nsTimeout*) 0.97% [.] nsXPConnect::Traverse(void*, nsCycleCollectionTraversalCallback&) 0.95% [.] nsJSEventListener::cycleCollection::Traverse(void*, nsCycleCollectionTraversalCallback&) 0.95% [.] nsCOMPtr_base::~nsCOMPtr_base() [acme@doppio ~]$ Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Vegard Nossum <vegard.nossum@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Suggested-by: Clark Williams <williams@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090720171412.GB10410@ghostprotocols.net>
2009-07-22perf: avoid structure size confusion by using a fixed sizeArjan van de Ven1-1/+1
for some reason, this structure gets compiled as 36 bytes in some files (the ones that alloacte it) but 40 bytes in others (the ones that use it). The cause is an off_t type that gets a different size in different compilation units for some yet-to-be-explained reason. But the effect is disasterous; the size/offset members of the struct are at different offsets, and result in mostly complete garbage. The parser in perf is so robust that this all gets hidden, and after skipping an certain amount of samples, it recovers.... so this bug is not normally noticed. .... except when you want every sample to be exact. Fix this by just using an explicitly sized type. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <4A655917.9080504@linux.intel.com>
2009-07-22perf_counter: Fix throttle/unthrottle event loggingAnton Blanchard1-1/+4
Right now we only print PERF_EVENT_THROTTLE + 1 (ie PERF_EVENT_UNTHROTTLE). Fix this to print both a throttle and unthrottle event. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090722130546.GE9029@kryten>
2009-07-22perf_counter: Improve perf stat and perf record option parsingAnton Blanchard2-2/+4
perf stat and perf record currently look for all options on the command line. This can lead to some confusion: # perf stat ls -l Error: unknown switch `l' While we can work around this by adding '--' before the command, the git option parsing code can stop at the first non option: # perf stat ls -l Performance counter stats for 'ls -l': .... Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090722130412.GD9029@kryten>
2009-07-22perf_counter: PERF_SAMPLE_ID and inherited countersPeter Zijlstra4-120/+35
Anton noted that for inherited counters the counter-id as provided by PERF_SAMPLE_ID isn't mappable to the id found through PERF_RECORD_ID because each inherited counter gets its own id. His suggestion was to always return the parent counter id, since that is the primary counter id as exposed. However, these inherited counters have a unique identifier so that events like PERF_EVENT_PERIOD and PERF_EVENT_THROTTLE can be specific about which counter gets modified, which is important when trying to normalize the sample streams. This patch removes PERF_EVENT_PERIOD in favour of PERF_SAMPLE_PERIOD, which is more useful anyway, since changing periods became a lot more common than initially thought -- rendering PERF_EVENT_PERIOD the less useful solution (also, PERF_SAMPLE_PERIOD reports the more accurate value, since it reports the value used to trigger the overflow, whereas PERF_EVENT_PERIOD simply reports the requested period changed, which might only take effect on the next cycle). This still leaves us PERF_EVENT_THROTTLE to consider, but since that _should_ be a rare occurrence, and linking it to a primary id is the most useful bit to diagnose the problem, we introduce a PERF_SAMPLE_STREAM_ID, for those few cases where the full reconstruction is important. [Does change the ABI a little, but I see no other way out] Suggested-by: Anton Blanchard <anton@samba.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1248095846.15751.8781.camel@twins>
2009-07-22perf_counter: Plug more stack leaksPeter Zijlstra1-2/+21
Per example of Arjan's patch, I went through and found a few more. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-07-22perf: Fix stack data leakArjan van de Ven1-0/+1
the "reserved" field was not initialized to zero, resulting in 4 bytes of stack data leaking to userspace.... Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-07-22perf_counter: Remove unused variablesPeter Zijlstra1-2/+0
Fix a gcc unused variables warning. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
2009-07-22fbmon: work around compiler bug in gcc-2.4.2Linus Torvalds1-2/+2
There's some odd bug in gcc-4.2 where it miscompiles a simple loop whent he loop counter is of type 'unsigned char' and it should count to 128. The compiler will incorrectly decide that a trivial loop like this: unsigned char i, ... for (i = 0; i < 128; i++) { .. is endless, and will compile it to a single instruction that just branches to itself. This was triggered by the addition of '-fno-strict-overflow', and we could play games with compiler versions and go back to '-fwrapv' instead, but the trivial way to avoid it is to just make the loop induction variable be an 'int' instead. Thanks to Krzysztof Oledzki for reporting and testing and to Troy Moure for digging through assembler differences and finding it. Reported-and-tested-by: Krzysztof Oledzki <olel@ans.pl> Found-by: Troy Moure <twmoure@szypr.net> Gcc-bug-acked-by: Ian Lance Taylor <iant@google.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-22softirq: introduce tasklet_hrtimer infrastructurePeter Zijlstra2-1/+89
commit ca109491f (hrtimer: removing all ur callback modes) moved all hrtimer callbacks into hard interrupt context when high resolution timers are active. That breaks code which relied on the assumption that the callback happens in softirq context. Provide a generic infrastructure which combines tasklets and hrtimers together to provide an in-softirq hrtimer experience. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: torvalds@linux-foundation.org Cc: kaber@trash.net Cc: David Miller <davem@davemloft.net> LKML-Reference: <1248265724.27058.1366.camel@twins> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-07-21sky2: Avoid races in sky2_downMike McCormack1-8/+8
Reset rx chain before trying to drain it. Shut interrupts off last, incase there's something to report. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-21ide-tape: Don't leak kernel stack informationMichael Buesch1-0/+1
Don't leak kernel stack information through uninitialized structure members. Signed-off-by: Michael Buesch <mb@bu3sch.de> Acked-by: Borislav Petkov <petkovbb@gmail.com>. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-21ide: fix memory leak when flush command is issuedMaxime Bizon1-0/+1
I'm using ide on 2.6.30.1 with xfs filesystem. I noticed a kernel memory leak after writing lots of data, the kmalloc-96 slab cache keeps growing. It seems the struct ide_cmd kmalloced by idedisk_prepare_flush is never kfreed. Commit a09485df9cda49fbde2766c86eb18a9cae585162 ("ide: move request type specific code from ide_end_drive_cmd() to callers (v3)") and f505d49ffd25ed062e76ffd17568d3937fcd338c ("ide: fix barriers support") cause this regression, cmd->rq must now be set for ide_complete_cmd to honor the IDE_TFLAG_DYN flag. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-21NFSv4: Fix a problem whereby a buggy server can oops the kernelTrond Myklebust2-5/+13
We just had a case in which a buggy server occasionally returns the wrong attributes during an OPEN call. While the client does catch this sort of condition in nfs4_open_done(), and causes the nfs4_atomic_open() to return -EISDIR, the logic in nfs_atomic_lookup() is broken, since it causes a fallback to an ordinary lookup instead of just returning the error. When the buggy server then returns a regular file for the fallback lookup, the VFS allows the open, and bad things start to happen, since the open file doesn't have any associated NFSv4 state. The fix is firstly to return the EISDIR/ENOTDIR errors immediately, and secondly to ensure that we are always careful when dereferencing the nfs_open_context state pointer. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2009-07-21NFSv4: Fix an NFSv4 mount regressionTrond Myklebust3-22/+26
Commit 008f55d0e019943323c20a03493a2ba5672a4cc8 (nfs41: recover lease in _nfs4_lookup_root) forces the state manager to always run on mount. This is a bug in the case of NFSv4.0, which doesn't require us to send a setclientid until we want to grab file state. In any case, this is completely the wrong place to be doing state management. Moving that code into nfs4_init_session... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2009-07-21NFSv4: Fix an Oops in nfs4_free_lock_stateTrond Myklebust1-1/+1
The oops http://www.kerneloops.org/raw.php?rawid=537858&msgid= appears to be due to the nfs4_lock_state->ls_state field being uninitialised. This happens if the call to nfs4_free_lock_state() is triggered at the end of nfs4_get_lock_state(). The fix is to move the initialisation of ls_state into the allocator. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2009-07-21drivers/net/mlx4: Adjust constantJulia Lawall1-1/+1
The values in the advertising field are typically ADVERTISED_xxx, not SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and ADVERTISED_1000baseT_Full have the same value. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ struct ethtool_cmd E; @@ *E.advertising = SUPPORTED_10000baseT_Full // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>