If kzalloc for kbc fails, then we have NULL pointer dereference while
calling input_free_device(kbc->idev) in the error handling.
So it is safer to always use the original name, input_dev.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
input_free_device() should be used if input_register_device() was not called
yet or if it failed.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
To allow open/ioctl(EVIOCGABS)/close use pattern for polled devices read
the device in context of open() call instead of offloading the first read
to a workqueue. This will ensure that once call to open() returns device
would have cached reasonably recent axis values that can be retrieved via
appropriate ioctl.
Signed-off-by: Dmitry Torokhov <[email protected]>
Added USB device IDs for MacBookAir4,2 trackpad. Device constants were
copied from the MacBookAir3,2 constants. The 4,2 device specification is
reportedly unchanged from the 3,2 predecessor and seems to work well.
Signed-off-by: Joshua V Dillon <[email protected]>
Signed-off-by: Chase Douglas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The module device table for of_device_id should use "of" type.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The analog joystick driver is written for x86 systems. This
patch updates it to use the PIT_TICK_RATE value instead of
CLOCK_TICK_RATE as they are equivalent on x86 and we want to
deprecate the latter.
Signed-off-by: Deepak Saxena <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Input close or device disable should not interact with the exported
gpiolib functionality. However that's the case. __ad7879_disable()
clears the entire AD7879_REG_CTRL2, while it should just power down
the ADC and its reference.
Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add missing header.
Error log:
CC drivers/input/serio/xilinx_ps2.o
drivers/input/serio/xilinx_ps2.c: In function 'xps2_of_probe':
drivers/input/serio/xilinx_ps2.c:249: error: implicit declaration of function 'of_address_to_resource'
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
Add missing device_remove_file() for dev_attr_time in lm8323_remove().
Also calling device_remove_file() in lm8323_probe() error path to
remove sysfs attribute file.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
We need to explicitly include module.h since some of its facilities
are used.
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
hgpk.c uses interfaces from linux/module.h, so it should include that file.
This fixes build errors.
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (53 commits)
Input: synaptics - fix reporting of min coordinates
Input: tegra-kbc - enable key autorepeat
Input: kxtj9 - fix locking typo in kxtj9_set_poll()
Input: kxtj9 - fix bug in probe()
Input: intel-mid-touch - remove pointless checking for variable 'found'
Input: hp_sdc - staticize hp_sdc_kicker()
Input: pmic8xxx-keypad - fix a leak of the IRQ during init failure
Input: cy8ctmg110_ts - set reset_pin and irq_pin from platform data
Input: cy8ctmg110_ts - constify i2c_device_id table
Input: cy8ctmg110_ts - fix checking return value of i2c_master_send
Input: lifebook - make dmi callback functions return 1
Input: atkbd - make dmi callback functions return 1
Input: gpio_keys - switch to using SIMPLE_DEV_PM_OPS
Input: gpio_keys - add support for device-tree platform data
Input: aiptek - remove double define
Input: synaptics - set minimum coordinates as reported by firmware
Input: synaptics - process button bits in AGM packets
Input: synaptics - rename set_slot to be more descriptive
Input: synaptics - fuzz position for touchpad with reduced filtering
Input: synaptics - set resolution for MT_POSITION_X/Y axes
...
* 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (47 commits)
OMAP: Add debugfs node to show the summary of all clocks
OMAP2+: hwmod: Follow the recommended PRCM module enable sequence
OMAP2+: clock: allow per-SoC clock init code to prevent clockdomain calls from clock code
OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming
OMAP2+: PM: idle clkdms only if already in idle
OMAP2+: clockdomain: add clkdm_in_hwsup()
OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework
OMAP: clockdomain: Remove redundant call to pwrdm_wait_transition()
OMAP4: hwmod: Introduce the module control in hwmod control
OMAP4: cm: Add two new APIs for modulemode control
OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure
OMAP4: hwmod data: Add PRM context register offset
OMAP4: prm: Remove deprecated functions
OMAP4: prm: Replace warm reset API with the offset based version
OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros
OMAP: hwmod: Wait the idle status to be disabled
OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros
OMAP2+: hwmod: Init clkdm field at boot time
OMAP4: hwmod data: Add clock domain attribute
OMAP4: clock data: Add missing divider selection for auxclks
...
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
fs: Merge split strings
treewide: fix potentially dangerous trailing ';' in #defined values/expressions
uwb: Fix misspelling of neighbourhood in comment
net, netfilter: Remove redundant goto in ebt_ulog_packet
trivial: don't touch files that are removed in the staging tree
lib/vsprintf: replace link to Draft by final RFC number
doc: Kconfig: `to be' -> `be'
doc: Kconfig: Typo: square -> squared
doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
drivers/net: static should be at beginning of declaration
drivers/media: static should be at beginning of declaration
drivers/i2c: static should be at beginning of declaration
XTENSA: static should be at beginning of declaration
SH: static should be at beginning of declaration
MIPS: static should be at beginning of declaration
ARM: static should be at beginning of declaration
rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
Update my e-mail address
PCIe ASPM: forcedly -> forcibly
gma500: push through device driver tree
...
Fix up trivial conflicts:
- arch/arm/mach-ep93xx/dma-m2p.c (deleted)
- drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
- drivers/net/r8169.c (just context changes)
We were testing wrong bit in the extended capability query.
Reported-by: Daniel Kurtz <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
To support key repeats, keyboard needs to be setup as an autorepeating
device.
Signed-off-by: Rakesh Iyer <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
* 'timers-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
mips: Fix i8253 clockevent fallout
i8253: Cleanup outb/inb magic
arm: Footbridge: Use common i8253 clockevent
mips: Use common i8253 clockevent
x86: Use common i8253 clockevent
i8253: Create common clockevent implementation
i8253: Export i8253_lock unconditionally
pcpskr: MIPS: Make config dependencies finer grained
pcspkr: Cleanup Kconfig dependencies
i8253: Move remaining content and delete asm/i8253.h
i8253: Consolidate definitions of PIT_LATCH
x86: i8253: Consolidate definitions of global_clock_event
i8253: Alpha, PowerPC: Remove unused asm/8253pit.h
alpha: i8253: Cleanup remaining users of i8253pit.h
i8253: Remove I8253_LOCK config
i8253: Make pcsp sound driver use the shared i8253_lock
i8253: Make pcspkr input driver use the shared i8253_lock
i8253: Consolidate all kernel definitions of i8253_lock
i8253: Unify all kernel declarations of i8253_lock
i8253: Create linux/i8253.h and use it in all 8253 related files
According to the comments we want to call mutex_lock() here instead
of mutex_unlock(). That makes more sense.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
We are testing the wrong variable here. I believe tj9->input_dev
is always NULL at this point, so probe() will fail.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The implementation does break from the for loop after we assign 'i' to
variable 'found'.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
It's not referenced outside this file so there's no need for it to be in
the global name space.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Make sure we are passing the same cookie in all calls to
request_any_context_irq() and free_irq().
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The implementation in cy8ctmg110_probe() does not properly set reset_pin
and irq_pin from platform data. Let's fix it.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
i2c_master_send returns negative errno, or else the number of bytes written.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
We only care about if there is a successful match from the table (or
no match at all), so let's make dmi_check_system return immediately
instead of iterating thorough the whole table.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
We only care about if there is a successful match from the table (or
no match at all), so let's make dmi_check_system return immediately
instead of iterating thorough the whole table.
Make the dmi callback function return 1 then dmi_check_system
will return immediately if we have a successful match.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch enables fetching configuration data, which is normally provided
via platform_data, from the device-tree instead.
If the device is configured from device-tree data, the platform_data struct
is not used, and button data needs to be allocated dynamically. Big part of
this patch deals with confining pdata usage to the probe function, to make
this possible.
Signed-off-by: David Jander <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Newer Synaptics firmware allows to query minimum coordinates reported by
the device, let's use this data.
Acked-by: Chase Douglas <[email protected]>
Acked-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The twl6040_request_irq/free_irq inline functions are going
to be removed, so replace them with direct calls.
The irq number is provided by the core driver via resource.
Signed-off-by: Peter Ujfalusi <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
AGM packets contain valid button bits, too.
This patch refactors packet processing to parse button bits in AGM packets.
However, they aren't actually used or reported.
The point is to more completely process AGM packets,
and prepare for future patches that may actually use AGM packet button bits.
Signed-off-by: Daniel Kurtz <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Synaptics touchpads indicate via a capability bit when they perform reduced
filtering on position data. In such a case, use a non-zero fuzz value.
Fuzz = 8 was chosen empirically by observing the raw position data
reported by a clickpad indicating it had reduced filtering.
Signed-off-by: Daniel Kurtz <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Set resolution for MT_POSITION_X and MT_POSITION_Y to match ABS_X and
ABS_Y, respectively.
Signed-off-by: Daniel Kurtz <[email protected]>
Acked-by: Chase Douglas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The old code may call input_sync() without sending any other events.
While it will be suppressed by the input core not calling it at all
is still cheaper.
Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>