summaryrefslogtreecommitdiffstats
path: root/drivers/input
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'mfd-3.6-1' of ↵Linus Torvalds2012-07-304-2/+181
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFD bits from Samuel Ortiz: "We have support for a few new drivers: - Samsung s2mps11 - Wolfson Microelectronics wm5102 and wm5110 - Marvell 88PM800 and 88PM805 - TI twl6041 We also have our regular driver improvements: - Device tree and IRQ domain support for STE AB8500 - Regmap and devm_* API conversion for TI tps6586x - Device tree support for Samsung max77686 - devm_* API conversion for STE AB3100 Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910, tps65090, da9052 and twl-core." Fix up mostly trivial conflicts, with the exception of drivers/usb/host/ehci-omap.c in particular, which had some re-organization of the reset sequence (commit 1a49e2ac9651: "EHCI: centralize controller initialization") that clashed with commit 2761a6394516 ("mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues"). In particular, commit 2761a6394516 moved the usb_add_hcd() to the *middle* of the reset sequence, which clashes fairly badly with the reset sequence re-organization (although it could have been done inside the new omap_ehci_init() function). I left that part of commit 2761a6394516 just undone. * tag 'mfd-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (110 commits) mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core mfd: Arizone core should select MFD_CORE mfd: Fix arizona-irq.c build by selecting REGMAP_IRQ mfd: Add debug trace on entering and leaving arizone runtime suspend mfd: Correct tps65090 cell names mfd: Remove gpio support from tps6586x core driver ARM: tegra: defconfig: Enable tps6586x gpio gpio: tps6586x: Add gpio support through platform driver mfd: Cache tps6586x register through regmap mfd: Use regmap for tps6586x register access. mfd: Use devm managed resources for tps6586x input: Add onkey support for 88PM80X PMIC mfd: Add support for twl6041 mfd: Fix twl6040 revision information mfd: Matches should be NULL when populate anatop child devices input: ab8500-ponkey: Create AB8500 domain IRQ mapping mfd: Add missing out of memory check for pcf50633 Documentation: Describe the AB8500 Device Tree bindings mfd: Add tps65910 32-kHz-crystal-input init mfd: Drop modifying mc13xxx driver's id_table in probe ...
| * input: Add onkey support for 88PM80X PMICQiao Zhou2012-07-253-0/+179
| | | | | | | | | | | | | | | | Add onkey support for MARVELL 88PM80X PMIC. Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * input: ab8500-ponkey: Create AB8500 domain IRQ mappingLee Jones2012-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we can use any domain allocated IRQ, we need to first create a map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq). We do this with a helper function provided by the AB8500 IRQ domain controller called ab8500_irq_get_virq(). We need to do this for both IRQs which the Power-On-Key driver uses; one for button press, the other for button depress. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2012-07-306-3/+955
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "A new driver for FT5x06 based EDT displays and a couple of other driver changes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics - handle out of bounds values from the hardware Input: wacom - add support to Cintiq 22HD Input: add driver for FT5x06 based EDT displays
| * \ Merge branch 'next' into for-linusDmitry Torokhov2012-07-296-3/+955
| |\ \ | | | | | | | | | | | | Prepare second set of changes for 3.6 merge window.
| | * | Input: synaptics - handle out of bounds values from the hardwareSeth Forshee2012-07-241-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The touchpad on the Acer Aspire One D250 will report out of range values in the extreme lower portion of the touchpad. These appear as abrupt changes in the values reported by the hardware from very low values to very high values, which can cause unexpected vertical jumps in the position of the mouse pointer. What seems to be happening is that the value is wrapping to a two's compliment negative value of higher resolution than the 13-bit value reported by the hardware, with the high-order bits being truncated. This patch adds handling for these values by converting them to the appropriate negative values. The only tricky part about this is deciding when to treat a number as negative. It stands to reason that if out of range values can be reported on the low end then it could also happen on the high end, so not all out of range values should be treated as negative. The approach taken here is to split the difference between the maximum legitimate value for the axis and the maximum possible value that the hardware can report, treating values greater than this number as negative and all other values as positive. This can be tweaked later if hardware is found that operates outside of these parameters. BugLink: http://bugs.launchpad.net/bugs/1001251 Cc: stable@vger.kernel.org Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: wacom - add support to Cintiq 22HDPing Cheng2012-07-242-3/+21
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: add driver for FT5x06 based EDT displaysSimon Budig2012-07-243-0/+912
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a driver for the EDT "Polytouch" family of touch controllers based on the FocalTech FT5x06 line of chips. Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds2012-07-271-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull ARM updates from Russell King: "First ARM push of this merge window, post me coming back from holiday. This is what has been in linux-next for the last few weeks. Not much to say which isn't described by the commit summaries." * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (32 commits) ARM: 7463/1: topology: Update cpu_power according to DT information ARM: 7462/1: topology: factorize the update of sibling masks ARM: 7461/1: topology: Add arch_scale_freq_power function ARM: 7456/1: ptrace: provide separate functions for tracing syscall {entry,exit} ARM: 7455/1: audit: move syscall auditing until after ptrace SIGTRAP handling ARM: 7454/1: entry: don't bother with syscall tracing on ret_from_fork path ARM: 7453/1: audit: only allow syscall auditing for pure EABI userspace ARM: 7452/1: delay: allow timer-based delay implementation to be selected ARM: 7451/1: arch timer: implement read_current_timer and get_cycles ARM: 7450/1: dcache: select DCACHE_WORD_ACCESS for little-endian ARMv6+ CPUs ARM: 7449/1: use generic strnlen_user and strncpy_from_user functions ARM: 7448/1: perf: remove arm_perf_pmu_ids global enumeration ARM: 7447/1: rwlocks: remove unused branch labels from trylock routines ARM: 7446/1: spinlock: use ticket algorithm for ARMv6+ locking implementation ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process ARM: 7444/1: kernel: add arch-timer C3STOP feature ARM: 7460/1: remove asm/locks.h ARM: 7439/1: head.S: simplify initial page table mapping ARM: 7437/1: zImage: Allow DTB command line concatenation with ATAG_CMDLINE ARM: 7436/1: Do not map the vectors page as write-through on UP systems ...
| | \ \ \
| | \ \ \
| | \ \ \
| | \ \ \
| *---. \ \ \ Merge branches 'audit', 'delay', 'fixes', 'misc' and 'sta2x11' into for-linusRussell King2012-07-271-0/+1
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | |
| | | | * | | ARM: sa11x0/pxa: convert OS timer registers to IOMEMRussell King2012-07-091-0/+1
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the OS timer registers have IOMEM like properities so they can be passed to readl_relaxed/writel_relaxed() et.al. rather than being straight volatile dereferences. Add linux/io.h includes where required. linux/io.h includes added to arch/arm/mach-sa1100/cpu-sa1100.c, arch/arm/mach-sa1100/jornada720_ssp.c, arch/arm/mach-sa1100/leds-lart.c drivers/input/touchscreen/jornada720_ts.c, drivers/pcmcia/sa1100_shannon.c from Arnd. This fixes these warnings: arch/arm/mach-sa1100/time.c: In function 'sa1100_timer_init': arch/arm/mach-sa1100/time.c:104: warning: passing argument 1 of 'clocksource_mmio_init' discards qualifiers from pointer target type arch/arm/mach-pxa/time.c: In function 'pxa_timer_init': arch/arm/mach-pxa/time.c:126: warning: passing argument 1 of 'clocksource_mmio_init' discards qualifiers from pointer target type Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | | | | Merge branch 'for-linus' of ↵Linus Torvalds2012-07-2625-436/+1655
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer updates from Dmitry Torokhov: "First set of updates for the input subsystem. You will get a new touchscreen driver (Melfas mms114), a new keypad driver for LPC32xx SoC, large update to Atmel mXT touchscreen driver, a lot of drivers acquired device tree support and a slew of other fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: add MELFAS mms114 touchscreen driver Input: add support for key scan interface of the LPC32xx SoC Input: omap4-keypad - add device tree support Input: hanwang - add support for Art Master II tablet Input: spear_keyboard - reconfigure operating frequency on suspend Input: spear_keyboard - fix clock handling during suspend/resume Input: ff-memless - fix a couple min_t() casts Input: synaptics - print firmware ID and board number at init Input: spear_keyboard - generalize keyboard frequency configuration Input: spear_keyboard - rename bit definitions to reflect register Input: spear_keyboard - use correct io accessors Input: spear-keyboard - fix disable device_init_wakeup in remove Input: wacom_i2c - fix compiler warning Input: imx_keypad - check error returned by clk_prepare_enable() Input: imx_keypad - adapt the new kpp clock name Input: imx_keypad - use clk_prepare_enable/clk_disable_unprepare() Input: ad7879 - add option to correct xy axis Input: synaptics_usb - Remove TrackPoint name trailing whitespace Revert "Input: atmel_mxt_ts - warn if sysfs could not be created" Input: MT - Include win8 support ...
| * | | | | Merge branch 'next' into for-linusDmitry Torokhov2012-07-2446-745/+2016
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Input: add MELFAS mms114 touchscreen driverJoonyoung Shim2012-07-173-0/+557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a initial driver for new touchscreen chip mms114 of MELFAS. It uses I2C interface and supports 10 multi touch. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: add support for key scan interface of the LPC32xx SoCRoland Stigge2012-07-173-0/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a driver for the key scan interface of the LPC32xx SoC Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: omap4-keypad - add device tree supportSourav Poddar2012-07-171-40/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device tree support for omap4 keypad driver and update the Documentation with omap4 keypad device tree binding information. Tested on omap4430 sdp. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: hanwang - add support for Art Master II tabletweixing2012-07-131-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds support for old Hanwang Art master II tablet Signed-off-by: weixing <weixing@hanwang.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: spear_keyboard - reconfigure operating frequency on suspendShiraz Hashim2012-07-131-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platform it may happen that the input clock to keyboard may change during suspend, thus impacting its wakeup capability. There is no means for keyboard driver to know this frequency before hand. Hence introduce a platform data 'suspended_rate' which indicates the frequency during suspend at which keyboard operates. Accordingly reprogram keyboard while going into suspend and restore original configuration at the time of resume. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: spear_keyboard - fix clock handling during suspend/resumeShiraz Hashim2012-07-131-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPEAr keyboard should normally disable clock during suspend and enable it during resume. For cases where it is expected to act as a wakeup source the clock can remain in the same state i.e. kept enabled if it is being used. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: ff-memless - fix a couple min_t() castsDan Carpenter2012-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | envelope->attack_level is a u16 type. We're trying to clamp it here so it's between 0 and 0x7fff. Unfortunately, the cast to __s16 turns all the values larger than 0x7fff into negative numbers and min_t() thinks they are less than 0x7fff. envelope_level is an int so now we've got negative values stored there. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: synaptics - print firmware ID and board number at initDaniel Kurtz2012-07-072-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read the Firmware ID and Board Number from a synaptics device at init and display them in the system log. Device behavior is very board and firmware dependent. It may prove useful for users to include this information when providing bug reports or other feedback. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: spear_keyboard - generalize keyboard frequency configurationShiraz Hashim2012-07-071-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation hard coded keyboard frequency configuration assuming input clock as fixed APB (83 MHz). Generalize the configuration using clock framework APIs. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: spear_keyboard - rename bit definitions to reflect registerShiraz Hashim2012-07-071-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename bit definition macros to reflect keyboard registers clearly thus being more readable. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: spear_keyboard - use correct io accessorsShiraz Hashim2012-07-071-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All SPEAr keyboard registers are 32 bit wide and are word aligned. This patch aligns all io access to be word size using relaxed version of readl/writel. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: spear-keyboard - fix disable device_init_wakeup in removeVipul Kumar Samar2012-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is to disable device wakeup while removing keyboard. Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | | | Input: wacom_i2c - fix compiler warningDmitry Torokhov2012-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently GCC can't figure out that we bail if we fail to query device and will not try to use 'features': drivers/input/touchscreen/wacom_i2c.c: In function ‘wacom_i2c_probe’: drivers/input/touchscreen/wacom_i2c.c:177:20: warning: ‘features.fw_version’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| | * | | | Pull input changes from Henrik Rydberg, including large update toDmitry Torokhov2012-07-072-223/+242
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | atmel_mxt_ts driver by Daniel and MT protocol addition for win8 devices. Conflicts: drivers/input/touchscreen/atmel_mxt_ts.c
| | | * | | | Revert "Input: atmel_mxt_ts - warn if sysfs could not be created"Henrik Rydberg2012-07-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dmitry: I understand that I am a bit late to the party :) but I do not agree with this change. Failure to create attributes is not sometihng that user could cause (at least not easily) and thus would not be a setup issue but something more severe. I believe we should fail loading the driver so sysfs attribute breakage will be noticed as soon as possible, instead of discovering it much much later in the process. This reverts commit 639900380062ecd78ee8b265ea23929c565469b4. Requested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - parse T6 reportsDaniel Kurtz2012-06-291-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The normal messages sent after boot or NVRAM update are T6 reports, containing a status, and the config memory checksum. Parse them and dump a useful info message. This patch tested on an MXT224E. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - send all MT-B slots in one input reportDaniel Kurtz2012-06-291-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each interrupt contains information for all contacts with changing properties. Process all of this information at once, and send it all in a a single input report (ie input events ending in EV_SYN/SYN_REPORT). This patch was tested using an MXT224E. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - use T9 reportid range to init number of mt slotsDaniel Kurtz2012-06-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atmel mxt devices can report one finger for each T9 reportid. Therefore, this range can be used to report the max number of MT-B slots to userspace instead of assuming a fixed 10. Note that mxt_initialized() must complete early, since the input_dev properties now depend on values in the object table. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - refactor reportid checking in mxt_interruptDaniel Kurtz2012-06-291-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This small refactor is in preparation for checking more report types in the mxt_interrupt message processing loop. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - cache T9 reportid range when reading object tableDaniel Kurtz2012-06-291-35/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Streamline interrupt processing by caching the T9 reportid range when first reading the object table. In the process, refactor reading the object descriptor table. First, since the object_table entries are now exactly the same layout in device memory and in the driver, allocate an appropriately sized array and fetch the entire table directly into it in a single i2c transaction. Since a 6 byte table object requires 10 bytes to read, doing this dramatically reduces overhead. Note: The cached T9 reportid's are initialized to 0, which is an invalid reportid. Thus, the checks in the interrupt handler will always fail for devices that do not support the T9 object. Therefore, after doing a firmware update, the old object table is destroyed and all cached object values are reset to 0, before reading the new object table, in case the new firmware does not have the old objects. This patch tested on an MXT224E. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - refactor when and how object table is freedDaniel Kurtz2012-06-291-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Object Table is freed in three cases: 1) When the driver is being removed. 2) In the error path of mxt_initialize(). 3) Just after a firmware update, when a new object table is about to be read. For cases 2 & 3, the driver is not immediately unloaded, so this patch refactors these cases to use a common cleanup function. It also refactors the mxt_initialize error paths to ensure that this cleanup happens. Note: mxt_update_fw_store() does not handle errors during mxt_initialize(). A proposed fix for this is in a subsequent patchset. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - add detail to touchevent debug messageDaniel Kurtz2012-06-291-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the debug message: * print inidividual status bits * print the pressure value * use '%u' for unsigned quantities Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - simplify event reportingDaniel Kurtz2012-06-291-76/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of carrying around per-finger state in the driver instance, just report each finger as it arrives to the input layer, and let the input layer (evdev) hold the event state (which it does anyway). Note: this driver does not really do MT-B properly. Each input report (a group of input events followed by a SYN_REPORT) only contains data for a single contact. When multiple fingers are present on a device, each is properly reported in its own MT_SLOT. However, there is only ever one MT_SLOT per SYN_REPORT. This is fixed in a subsequent patch. This patch was tested with an mXT224E. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - add sysfs entries to read fw and hw versionDaniel Kurtz2012-06-291-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make firmware and hardware version strings available to userspace. This is useful, for example, to allow a userspace program to implement a firwmare update policy. Change-Id: I1eddb4bbf5f3f9ae6947a8528598973ddead18cf Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - update driver ID info loggingDaniel Kurtz2012-06-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print unsigned values as '%u'. Also, parse and print the firmware version in its canonical format, as suggested by Nick Dyer. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - read ID information block in one i2c transactionDaniel Kurtz2012-06-291-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading the whole info block in one i2c transaction speeds up driver probe significantly, especially on slower i2c busses. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - optimize writing of object table entriesDaniel Kurtz2012-06-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write each object using a single bulk i2c write transfer. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - add variable length __mxt_write_regDaniel Kurtz2012-06-291-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c bus requires 4 bytes to do a 1-byte write (1 byte i2c address + 2 byte offset + 1 byte data). By taking a length with writes, the driver can amortize transaction overhead by performing larger transactions where appropriate. This patch just sets up the new API. Later patches refactor writes to take advantage of the larger transactions. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - return errors from i2c layerDaniel Kurtz2012-06-291-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c layer can report a variety of errors, including -ENXIO for an i2c NAK. Instead of treating them all as -EIO, pass the actual i2c layer error up to the caller. However, still report as -EIO the unlikely case that a transaction was partially completed, and no error message was returned from i2c_*(). Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - print all instances when dumping objectsDaniel Kurtz2012-06-291-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For objects with multiple instances, dump them all, prepending each with its "Instance #". [rydberg@euromail.se: break out mxt_show_instance()] Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - print less overhead when dumping objectsDaniel Kurtz2012-06-291-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conserve limited (PAGE_SIZE) sysfs output buffer space by only showing readable objects and not printing the object's index, which is not useful to userspace. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - optimize reading objects in object sysfs entryDaniel Kurtz2012-06-291-20/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read each object in a single i2c transaction instead of byte-by-byte Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - use scnprintf for object sysfs entryDaniel Kurtz2012-06-291-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using scnprintf() is a cleaner way to ensure that we don't overwrite the PAGE_SIZE sysfs output buffer. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - don't read T5 when dumping objectsDaniel Kurtz2012-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | T5 is the message processor object. Reading it will only have two outcomes, neither of which is particularly useful: 1) the message count decrements, and a valid message will be lost 2) an invalid message will be read (reportid == 0xff) Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - warn if sysfs could not be createdDaniel Kurtz2012-06-291-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If sysfs entry creation fails, the driver is still usable, so don't just abort probe. Just warn and continue. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - detect OOM when creating mt slotsDaniel Kurtz2012-06-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully this new code path will never be used, but better safe than sorry... Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| | | * | | | Input: atmel_mxt_ts - use client name for irqDaniel Kurtz2012-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atmel_mxt_ts driver can support multiple devices simultaneously. Use the i2c_client name instead of the driver name when requesting an interrupt to make the different interrupts distinguishable in /proc/interrupts and top. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
OpenPOWER on IntegriCloud