aboutsummaryrefslogtreecommitdiffstats
path: root/security/security.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2011-05-19Input: ADP5589 - new driver for I2C Keypad Decoder and I/O ExpanderMichael Hennerich4-0/+995
From http://www.analog.com/ADP5589: The ADP5589 is an I/O port expander and keypad matrix decoder designed for QWERTY type phones that require a large keypad matrix and expanded I/O lines. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17Input: tsc2007 - add X, Y and Z fuzz factors to platform dataThierry Reding2-3/+7
These new platform-specific values can be used to set the fuzz parameter passed to the input_set_abs_params() function for the ABS_X, ABS_Y and ABS_PRESSURE axes. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17Input: tsc2007 - add poll_period parameter to platform dataThierry Reding2-3/+4
This new parameter allows the polling frequency to be configured while keeping the default of once every millisecond. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17Input: tsc2007 - add poll_delay parameter to platform dataThierry Reding2-2/+5
Depending on the quality of the touch panel, the time for the X-, X+, Y- and Y+ inputs to settle may vary. The poll_delay parameter can be used to override the default of 1 millisecond. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17Input: tsc2007 - add max_rt parameter to platform dataThierry Reding2-1/+4
Finger touch events or very quick stylus events on low-quality panels can cause the tsc2007 to read bogus values. Looking at oscilloscope snapshots, this seems to be caused by the touch event disappearing during the measurements. These bogus values result in misclicks, where the X and Y values deviate from the real position. Most of these misclicks can be filtered out by setting a low enough threshold for the maximum resistance (which is loosely the inverse of the pressure) allowed to consider a set of values valid. Since this behaviour is largely dependent on the type and quality of the panel, this commit introduces the max_rt parameter. The default value is kept at MAX_12BIT. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17Input: tsc2007 - debounce pressure measurementThierry Reding1-1/+3
When the controller signals a pen-down event via the platform-specific GPIO, while the sample values indicate an invalid measurement, the measurement needs to be repeated. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: ad714x - fix captouch wheel option algorithmMichael Hennerich1-90/+19
As reported by Jean-Francois Dagenais, the wheel algorithm caused a divide by zero exception due to missing variable pre-initialization. In fact it turned out that the whole algorithm had several problems. It is therefore replaced with something that is known working. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: ad714x - allow platform code to specify irqflagsMichael Hennerich2-2/+5
Add option to specify irqflags in platfrom data. Also update copyright notice. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: ad714x - fix threshold and completion interrupt masksMichael Hennerich1-4/+4
Fix two issues in the threshold and completion interrupt mask and unmask functions. According to the AD714x datasheets the highest stage completion interrupt should be enabled. Fix mask computation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: ad714x - fix up input configurationMichael Hennerich1-0/+8
Add missing input name and set up parent devices so input devices will show in proper places in sysfs tree. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - remove support for proprietary X driverÉric Piel1-12/+0
Apparently somewhere someone had a proprietary X driver. To get the multitouch info, it uses some hack on the normal API instead of using the multitouch protocol. Now that the multitouch info is transmitted correctly it makes not much sense to keep it. Especially because it's impossible to find this proprietary X driver anywhere, so the number of users must be very low. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - report multitouch with proper ABS_MT messagesÉric Piel1-5/+34
Multitouch info was reported only via a old protocol used by the proprietary X driver from elantech. Let's report the multitouch info also following the official MT protocol. It's semi-mt because the device only reports the lowest/highest coordinates. This was done following the multi-touch-protocol.txt documentation, and inspired by the bcm5974 and elantech implementations. Testing was light as there is not many applications using this protocol yet, but the X synaptics driver didn't complain and the X multitouch driver behaved correctly. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - export pressure and width when supportedÉric Piel2-1/+28
Using the info of the Dell/Ubuntu driver, described in the protocol document, report both width and pressure when pressing 1 and 3 fingers, for the versions of the touchpad which support it. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16Input: elantech - describe further the protocolÉric Piel1-23/+100
For some Dell laptops, Ubuntu had a special version of the elantech driver with more knowledge on the devices. It can be found there: http://zinc.ubuntu.com/git?p=mid-team/hardy-netbook.git;a=blob;f=drivers/input/mouse/elantech.c;h=d0e2cafed162428f72e3654f4dda85e08ea486b3;hb=refs/heads/abi-22 By inspecting the source code, and doing some test on a real hardware, I have completed the protocol specification (especially for the 6 bytes protocol). It also adds information about the mapping between the version reported by the device and the protocol to use. Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-14Input: atmel_tsadcc - correct call to input_free_deviceJulia Lawall1-1/+1
This error handling code can be reached before ts_dev->input is initialized, so it is safer to always use the original name, input_dev. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12Input: add driver FSL MPR121 capacitive touch sensorZhang Jiejing4-0/+372
This patch adds basic support for Freescale MPR121 capacitive touch sensor. It's an i2c controller with up to 12 capacitance sensing inputs. Product information (data sheet, application notes) can be found here: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPR121 Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12Input: remove useless synchronize_rcu() callsEric Dumazet4-5/+0
There is no need to call synchronize_rcu() after a list insertion, or a NULL->ptr assignment. However, the reverse operations do need this call. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12Input: ads7846 - fix gpio_pendown configurationIgor Grinberg1-0/+7
The pendown gpio was requested but not configured for input. Configure it for input. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12Input: ads7846 - add possibility to use external vref on ads7846Alexander Stein2-9/+13
Just set vref_mv in your platform config to use external vref. Otherwise the internal one is used. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12Input: rotary-encoder - add support for half-period encodersJohan Hovold3-3/+53
Add support for encoders that have two detents per input signal period. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-11Input: rotary-encoder - refactor and clean upJohan Hovold1-33/+44
Refactor state retrieval and event reporting in interrupt handler. Remove a few empty lines. Signed-off-by: Johan Hovold <jhovold@gmail.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-11Input: tegra-kbc - change wakeup logic to be all or nothingRakesh Iyer2-25/+2
Tegra hardware design cannot reliably support an arbitrary set of keys waking up the system. Modify wakeup logic so either any key wakes the system up or none will do. Signed-off-by: Rakesh Iyer <riyer@nvidia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05Input: ads7846 - remove unused variable from struct ads7845_ser_reqAlexander Stein1-1/+0
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05Input: ads7846 - make transfer buffers DMA safeAlexander Stein1-2/+10
req.sample needs its own cacheline otherwise accessing req.msg fetches it in again. Note: This effect doesn't occur if the underlying SPI driver doesn't use DMA at all. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05Input: ati_remote2 - return the error code from sysfs channel_mask storeVille Syrjala1-3/+6
If the channel_mask setup fails when configuring it through sysfs, return the error code to the caller instead of claiming success. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05Input: sh_keysc - only compile PM code if PM is enabledDmitry Torokhov1-4/+4
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-03Input: h3600_ts_input - fix a leak of the IRQ during init failureAxel Lin1-4/+4
Make sure we are passing the same cookie in all calls to request_irq() and free_irq(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-03Input: sh_keysc - make sh_keysc_device_driver staticDmitry Torokhov1-1/+1
This variable is not used outside of the module so we should mark it as static. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-28Input: sh_keysc - switch to threaded IRQ handlerMagnus Damm1-1/+2
Update the KEYSC driver to make use of threaded IRQs with IRQF_ONESHOT to improve interrupt latency. The driver is using udelay() in the ISR to make sure the hardware has stabilized. Without using interrupt threads this delay may affect the latency of the rest of the system. Also pass dev_name() as string for /proc/interrupts. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-28Input: sh_keysc - implement runtime PM supportMagnus Damm1-25/+15
Convert the KEYSC driver from MSTP bit control through a magic clock string to making use of Runtime PM. Also, update the system suspend/resume callbacks to drop the Runtime PM reference in the case of wakeup disabled. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: input-polldev - use system-wide freezable workqueueDmitry Torokhov1-53/+3
With introduction of concurrency-managed work queues there is rarely a point in creating private workqueues. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: tegra-kbc - add ghost key filterRakesh Iyer2-0/+37
Add ghost key filtering support for the Nvidia Tegra matrix keyboard. Signed-off-by: Rakesh Iyer <riyer@nvidia.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: wm831x-ts - move BTN_TOUCH reporting to data transferMark Brown1-3/+2
Don't report BTN_TOUCH until we've got data as some less robust applications can be confused by getting a touch event by itself and it doesn't seem unreasonable for them to expect coordinates along with a touch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: wm831x-ts - allow IRQ flags to be specifiedMark Brown2-3/+15
This allows maximum flexibility for configuring the direct GPIO based interrupts. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: wm831x-ts - fix races with IRQ managementMark Brown1-5/+49
If the WM831x pen down and data IRQs run in parallel it is possible for the data and pen down IRQs to deadlock themselves as one is part way through disabling its operation while the other is part way through enabling. Fix this by always disabling the pen down interrupt while data is active and vice versa. When a changeover is required we disable the IRQ that is to be stopped then schedule work that will enable the new IRQ. We need to handle the data flow in the data IRQ as the readback from the device needs to be ordered correctly with the IRQ for robust operation. This also fixes an issue when using the built in IRQs due to enable_irq() not being valid from interrupt context on an interrupt controller with bus operations like the built in IRQ controller - this issue may also have affected other interrupt controllers. We can't rely on having the data and pen down IRQs available via GPIOs on the CPU on every system. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: twl4030-pwrbutton - fix a leak of the IRQ during init failureAxel Lin1-1/+1
In twl4030_pwrbutton_probe error path, free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: omap-keypad - fix a wrong free_irq() parameterAxel Lin1-3/+3
In current implementation, free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: qt1070 - add MODULE_DEVICE_TABLEAxel Lin1-0/+1
Adding the necessary MODULE_DEVICE_TABLE() information allows the driver to be automatically loaded by udev Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-26Input: evdev - only signal polls on full packetsJeff Brown1-6/+11
This patch modifies evdev so that it only becomes readable when the buffer contains an EV_SYN/SYN_REPORT event. On SMP systems, it is possible for an evdev client blocked on poll() to wake up and read events from the evdev ring buffer at the same rate as they are enqueued. This can result in high CPU usage, particularly for MT devices, because the client ends up reading events one at a time instead of reading complete packets. We eliminate this problem by making the device readable only when the buffer contains at least one complete packet. This causes clients to block until the entire packet is available. Signed-off-by: Jeff Brown <jeffbrown@android.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18Linux 2.6.39-rc4Linus Torvalds1-1/+1
2011-04-18proc: do proper range check on readdir offsetLinus Torvalds1-2/+7
Rather than pass in some random truncated offset to the pid-related functions, check that the offset is in range up-front. This is just cleanup, the previous commit fixed the real problem. Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-18next_pidmap: fix overflow conditionLinus Torvalds2-2/+5
next_pidmap() just quietly accepted whatever 'last' pid that was passed in, which is not all that safe when one of the users is /proc. Admittedly the proc code should do some sanity checking on the range (and that will be the next commit), but that doesn't mean that the helper functions should just do that pidmap pointer arithmetic without checking the range of its arguments. So clamp 'last' to PID_MAX_LIMIT. The fact that we then do "last+1" doesn't really matter, the for-loop does check against the end of the pidmap array properly (it's only the actual pointer arithmetic overflow case we need to worry about, and going one bit beyond isn't going to overflow). [ Use PID_MAX_LIMIT rather than pid_max as per Eric Biederman ] Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com> Analyzed-by: Robert Święcki <robert@swiecki.net> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-18Input: xen-kbdfront - fix mouse getting stuck after save/restoreIgor Mammedov1-1/+12
Mouse gets "stuck" after restore of PV guest but buttons are in working condition. If driver has been configured for ABS coordinates at start it will get XENKBD_TYPE_POS events and then suddenly after restore it'll start getting XENKBD_TYPE_MOTION events, that will be dropped later and they won't get into user-space. Regression was introduced by hunk 5 and 6 of 5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db ("Input: xen-kbdfront - advertise either absolute or relative coordinates"). Driver on restore should ask xen for request-abs-pointer again if it is available. So restore parts that did it before 5ea5254. Acked-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Igor Mammedov <imammedo@redhat.com> [v1: Expanded the commit description] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18Input: estimate number of events per packetJeff Brown2-0/+46
Calculate a default based on the number of ABS axes, REL axes, and MT slots for the device during input device registration. Signed-off-by: Jeff Brown <jeffbrown@android.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18Btrfs: fix free space cache leakChris Mason1-1/+1
The free space caching code was recently reworked to cache all the pages it needed instead of using find_get_page everywhere. One loop was missed though, so it ended up leaking pages. This fixes it to use our page array instead of find_get_page. Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-04-18block: add blk_run_queue_asyncChristoph Hellwig9-23/+36
Instead of overloading __blk_run_queue to force an offload to kblockd add a new blk_run_queue_async helper to do it explicitly. I've kept the blk_queue_stopped check for now, but I suspect it's not needed as the check we do when the workqueue items runs should be enough. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-04-18block: blk_delay_queue() should use kblockd workqueueJens Axboe1-1/+2
Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-04-18md: fix up raid1/raid10 unplugging.NeilBrown2-28/+20
We just need to make sure that an unplug event wakes up the md thread, which is exactly what mddev_check_plugged does. Also remove some plug-related code that is no longer needed. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md: incorporate new plugging into raid5.NeilBrown1-7/+16
In raid5 plugging is used for 2 things: 1/ collecting writes that require a bitmap update 2/ collecting writes in the hope that we can create full stripes - or at least more-full. We now release these different sets of stripes when plug_cnt is zero. Also in make_request, we call mddev_check_plug to hopefully increase plug_cnt, and wake up the thread at the end if plugging wasn't achieved for some reason. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md: provide generic support for handling unplug callbacks.NeilBrown2-0/+60
When an md device adds a request to a queue, it can call mddev_check_plugged. If this succeeds then we know that the md thread will be woken up shortly, and ->plug_cnt will be non-zero until then, so some processing can be delayed. If it fails, then no unplug callback is expected and the make_request function needs to do whatever is required to make the request happen. Signed-off-by: NeilBrown <neilb@suse.de>