Commit Graph

701 Commits

Author SHA1 Message Date
Linus Torvalds 152fcb2784 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "Except for the largish change to the ALPS driver adding "Dolphin V1"
  support and Wacom getting a new signature of yet another device, the
  rest are straightforward driver fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: mms114 - Fix regulator enable and disable paths
  Input: ads7864 - check return value of regulator enable
  Input: tc3589x-keypad - fix keymap size
  Input: wacom - add support for 0x10d
  Input: ALPS - update documentation for recent touchpad driver mods
  Input: ALPS - add "Dolphin V1" touchpad support
  Input: ALPS - remove unused argument to alps_enter_command_mode()
  Input: cypress_ps2 - fix trackpadi found in Dell XPS12
2013-03-11 07:49:37 -07:00
Rabin Vincent 3973501971 Input: tc3589x-keypad - fix keymap size
The keymap size used by tc3589x is too low, leading to the driver
overwriting other people's memory.  Fix this by making the driver
use the automatically allocated keymap provided by
matrix_keypad_build_keymap() instead of allocating one on its own.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-03-10 18:32:51 -07:00
Linus Torvalds bab588fcfb arm-soc: soc-specific updates
This is a larger set of new functionality for the existing SoC families,
 including:
 
 * vt8500 gains support for new CPU cores, notably the Cortex-A9 based wm8850
 * prima2 gains support for the "marco" SoC family, its SMP based cousin
 * tegra gains support for the new Tegra4 (Tegra114) family
 * socfpga now supports a newer version of the hardware including SMP
 * i.mx31 and bcm2835 are now using DT probing for their clocks
 * lots of updates for sh-mobile
 * OMAP updates for clocks, power management and USB
 * i.mx6q and tegra now support cpuidle
 * kirkwood now supports PCIe hot plugging
 * tegra clock support is updated
 * tegra USB PHY probing gets implemented diffently
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUSUyPGCrR//JCVInAQI4YA/+Nb0FaA7qMmTPuJhm7aZNfnwBcGxZ7IZp
 s2xByEl3r5zbLKlKGNGE0x7Q7ETHV4y9tohzi9ZduH2b60dMRYgII06CEmDPu6/h
 4vBap2oLzfWfs9hwpCIh7N9wNzxSj/R42vlXHhNmspHlw7cFk1yw5EeJ+ocxmZPq
 H9lyjAxsGErkZyM/xstNQ1Uvhc8XHAFSUzWrg8hvf6AVVR8hwpIqVzfIizv6Vpk6
 ryBoUBHfdTztAOrafK54CdRc7l6kVMomRodKGzMyasnBK3ZfFca3IR7elnxLyEFJ
 uPDu5DKOdYrjXC8X2dPM6kYiE41YFuqOV2ahBt9HqRe6liNBLHQ6NAH7f7+jBWSI
 eeWe84c2vFaqhAGlci/xm4GaP0ud5ZLudtiVPlDY5tYIADqLygNcx1HIt/5sT7QI
 h34LMjc4+/TGVWTVf5yRmIzTrCXZv5YoAak3UWFoM4nVBo/eYVyNLEt5g9YsfjrC
 P/GWrXJJvOCB3gAi31pgGYJzZg8K7kTTAh/dgxjqzU4f6nGRm5PBydiJe18/lWkH
 qtfNE0RbhxCi3JEBnxW48AIEndVSRbd7jf8upC/s9rPURtFSVXp4APTHVyNUKCip
 gojBxcRYtesyG/53nrwdTyiyHx6GocmWnMNZJoDo0UQEkog2dOef+StdC3zhc2Vm
 9EttcFqWJ+E=
 =PRrg
 -----END PGP SIGNATURE-----

Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC-specific updates from Arnd Bergmann:
 "This is a larger set of new functionality for the existing SoC
  families, including:

   - vt8500 gains support for new CPU cores, notably the Cortex-A9 based
     wm8850

   - prima2 gains support for the "marco" SoC family, its SMP based
     cousin

   - tegra gains support for the new Tegra4 (Tegra114) family

   - socfpga now supports a newer version of the hardware including SMP

   - i.mx31 and bcm2835 are now using DT probing for their clocks

   - lots of updates for sh-mobile

   - OMAP updates for clocks, power management and USB

   - i.mx6q and tegra now support cpuidle

   - kirkwood now supports PCIe hot plugging

   - tegra clock support is updated

   - tegra USB PHY probing gets implemented diffently"

* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (148 commits)
  ARM: prima2: remove duplicate v7_invalidate_l1
  ARM: shmobile: r8a7779: Correct TMU clock support again
  ARM: prima2: fix __init section for cpu hotplug
  ARM: OMAP: Consolidate OMAP USB-HS platform data (part 3/3)
  ARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3)
  arm: socfpga: Add SMP support for actual socfpga harware
  arm: Add v7_invalidate_l1 to cache-v7.S
  arm: socfpga: Add entries to enable make dtbs socfpga
  arm: socfpga: Add new device tree source for actual socfpga HW
  ARM: tegra: sort Kconfig selects for Tegra114
  ARM: tegra: enable ARCH_REQUIRE_GPIOLIB for Tegra114
  ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC
  ARM: tegra: Fix build error for gic update
  ARM: tegra: remove empty tegra_smp_init_cpus()
  ARM: shmobile: Register ARM architected timer
  ARM: MARCO: fix the build issue due to gic-vic-to-irqchip move
  ARM: shmobile: r8a7779: Correct TMU clock support
  ARM: mxs_defconfig: Select CONFIG_DEVTMPFS_MOUNT
  ARM: mxs: decrease mxs_clockevent_device.min_delta_ns to 2 clock cycles
  ARM: mxs: use apbx bus clock to drive the timers on timrotv2
  ...
2013-02-21 15:27:22 -08:00
Linus Torvalds 06991c28f3 Driver core patches for 3.9-rc1
Here is the big driver core merge for 3.9-rc1
 
 There are two major series here, both of which touch lots of drivers all
 over the kernel, and will cause you some merge conflicts:
   - add a new function called devm_ioremap_resource() to properly be
     able to check return values.
   - remove CONFIG_EXPERIMENTAL
 
 If you need me to provide a merged tree to handle these resolutions,
 please let me know.
 
 Other than those patches, there's not much here, some minor fixes and
 updates.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlEmV0cACgkQMUfUDdst+yncCQCfbmnQZju7kzWXk6PjdFuKspT9
 weAAoMCzcAtEzzc4LXuUxxG/sXBVBCjW
 =yWAQ
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core patches from Greg Kroah-Hartman:
 "Here is the big driver core merge for 3.9-rc1

  There are two major series here, both of which touch lots of drivers
  all over the kernel, and will cause you some merge conflicts:

   - add a new function called devm_ioremap_resource() to properly be
     able to check return values.

   - remove CONFIG_EXPERIMENTAL

  Other than those patches, there's not much here, some minor fixes and
  updates"

Fix up trivial conflicts

* tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
  base: memory: fix soft/hard_offline_page permissions
  drivercore: Fix ordering between deferred_probe and exiting initcalls
  backlight: fix class_find_device() arguments
  TTY: mark tty_get_device call with the proper const values
  driver-core: constify data for class_find_device()
  firmware: Ignore abort check when no user-helper is used
  firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
  firmware: Make user-mode helper optional
  firmware: Refactoring for splitting user-mode helper code
  Driver core: treat unregistered bus_types as having no devices
  watchdog: Convert to devm_ioremap_resource()
  thermal: Convert to devm_ioremap_resource()
  spi: Convert to devm_ioremap_resource()
  power: Convert to devm_ioremap_resource()
  mtd: Convert to devm_ioremap_resource()
  mmc: Convert to devm_ioremap_resource()
  mfd: Convert to devm_ioremap_resource()
  media: Convert to devm_ioremap_resource()
  iommu: Convert to devm_ioremap_resource()
  drm: Convert to devm_ioremap_resource()
  ...
2013-02-21 12:05:51 -08:00
Linus Torvalds b3cdda2b4f Device tree changes for v3.9
All around device tree changes destined for v3.8. Aside from the
 documentation updates the highlights in this branch include:
 - Kbuild changes for using CPP with .dts files
 - locking fix from preempt_rt patchset
 - include DT alias names in device uevent
 - Selftest bugfixes and improvements
 - New function for counting phandles stanzas in a property
 - constify argument to of_node_full_name()
 - Various bug fixes
 
 This tree did also contain a commit to use platform_device_add instead
 of open-coding the device add code, but it caused problems with amba
 devices and needed to be reverted.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRI3ZoAAoJEEFnBt12D9kBW0EP/2hTN9cS3b0CMyhh+PVUWZKu
 U+pTMbXBfomYC/9vWEBEpnYQSZuBXA+Sow3ubkRk6p6qjwYi0NUuAE4reQHLwvji
 u9nL7v9WNr4WXqUpMSgSzoxzPkvr2mfrHWRU2adaKpr+p4UvjbYNG1SxppqTJGji
 HThYNsgfdFzNvO7xtFTJGpMe3UhWfazdnVc/rg1csqex2UCZMqmSf1VjNqQIGt+t
 zH6jcCSZY96rX9f+HgdL9rvZyGSjDSIHRllpuG+8u5N3N1CSzbKPe4zSia3mlsC3
 g6g3bOihGJYeG2sc1RzHSdI6ANCn3RTuuA4xQBe/xCKvZIMRNNtzsf2Kbbah0ISG
 NW1WW3KRnq85sEdwv9gtFeMoalZ/sTV1O9m3vG9Xz2XgzWgf7c0V/7ukpFuTpQby
 NiFoTbc7K2E8J/fa8NhKfR4myzNKr3peJ6mJEMMn6PkdQwnOh1AC9l5iuDzMsdvk
 IGY8YvR1qY32IW68E42JQdteZP45EBzEgD9NjU7gRGI6nu2g5czv/VFztjiom4qd
 XahvdsfuVlCitRG8g2CHgBtEsjStYUmCa+gnIoycX7HhMShwYRX/cxA7Yife2UGV
 k+GUKCkGpHOLIoiAEHq+BdEv7amuJsqglJ5kvjL01m80k7JDGJqq8H9UUZ6yOCqe
 iXERO1R4HezNVFtMDrLO
 =Zlkx
 -----END PGP SIGNATURE-----

Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux

Pull device tree changes from Grant Likely:
 "All around device tree changes destined for v3.8.  Aside from the
  documentation updates the highlights in this branch include:

   - Kbuild changes for using CPP with .dts files
   - locking fix from preempt_rt patchset
   - include DT alias names in device uevent
   - Selftest bugfixes and improvements
   - New function for counting phandles stanzas in a property
   - constify argument to of_node_full_name()
   - Various bug fixes

  This tree did also contain a commit to use platform_device_add instead
  of open-coding the device add code, but it caused problems with amba
  devices and needed to be reverted."

* tag 'dt-for-linus' of git://git.secretlab.ca/git/linux: (23 commits)
  Revert "of: use platform_device_add"
  kbuild: limit dtc+cpp include path
  gpio: Make of_count_named_gpios() use new of_count_phandle_with_args()
  of: Create function for counting number of phandles in a property
  of/base: Clean up exit paths for of_parse_phandle_with_args()
  of/selftest: Use selftest() macro throughout
  of/selftest: Fix GPIOs selftest to cover the 7th case
  of: fix recursive locking in of_get_next_available_child()
  documentation/devicetree: Fix a typo in exynos-dw-mshc.txt
  OF: convert devtree lock from rw_lock to raw spinlock
  of/exynos_g2d: Add Bindings for exynos G2D driver
  kbuild: create a rule to run the pre-processor on *.dts files
  input: Extend matrix-keypad device tree binding
  devicetree: Move NS2 LEDs binding into LEDs directory
  of: use platform_device_add
  powerpc/5200: Fix size to request_mem_region() call
  documentation/devicetree: Fix typos
  of: add 'const' to of_node_full_name parameter
  of: Output devicetree alias names in uevent
  DT: add vendor prefixes for Renesas and Toshiba
  ...
2013-02-20 11:04:46 -08:00
Linus Torvalds c6699b58f4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "Two new touchpad drivers - Cypress APA I2C Trackpad and Cypress PS/2
  touchpad and a big update to ALPS driver from Kevin Cernekee that adds
  support for "Rushmore" touchpads and paves way for adding support for
  "Dolphin" touchpads.

  There is also a new input driver for Goldfish emulator and also
  Android keyreset driver was folded into SysRq code.

  A few more drivers were updated with device tree bindings and others
  got some small cleanups and fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits)
  Input: cyttsp-spi - remove duplicate MODULE_ALIAS()
  Input: tsc2005 - add MODULE_ALIAS
  Input: tegra-kbc - require CONFIG_OF, remove platform data
  Input: synaptics - initialize pointer emulation usage
  Input: MT - do not apply filtering on emulated events
  Input: bma150 - make some defines public and fix some comments
  Input: bma150 - fix checking pm_runtime_get_sync() return value
  Input: ALPS - enable trackstick on Rushmore touchpads
  Input: ALPS - add support for "Rushmore" touchpads
  Input: ALPS - make the V3 packet field decoder "pluggable"
  Input: ALPS - move pixel and bitmap info into alps_data struct
  Input: ALPS - fix command mode check
  Input: ALPS - rework detection of Pinnacle AGx touchpads
  Input: ALPS - move {addr,nibble}_command settings into alps_set_defaults()
  Input: ALPS - use function pointers for different protocol handlers
  Input: ALPS - rework detection sequence
  Input: ALPS - introduce helper function for repeated commands
  Input: ALPS - move alps_get_model() down below hw_init code
  Input: ALPS - copy "model" info into alps_data struct
  Input: ALPS - document the alps.h data structures
  ...
2013-02-20 11:00:43 -08:00
Dmitry Torokhov 2d9f0d964b Merge branch 'next' into for-linus
Prepare first set of updates for 3.9 merge window.
2013-02-19 22:05:39 -08:00
Linus Torvalds e9cf59aeee Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov:
 "Two small driver fixups and a documentation update for managed input
  devices"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - fix wacom_set_report retry logic
  Input: document that unregistering managed devices is not necessary
  Input: lm8323 - fix checking PWM interrupt status
2013-02-18 10:23:40 -08:00
Stephen Warren 9eee07d39f Input: tegra-kbc - require CONFIG_OF, remove platform data
Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver. Platform data is
therefore no longer required. Delete the header that defines it, and
rework the driver to parse the device tree directly into struct
tegra_kbc.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-02-15 18:52:58 -08:00
Heiko Carstens d722260d23 Input: add couple of missing GENERIC_HARDIRQS dependencies
When removing the !S390 dependency from drivers/input/Kconfig
a couple of drivers don't compile because they have a dependency
on GENERIC_HARDIRQS.  So add the missing dependencies.
Fixes e.g. this one:

drivers/input/keyboard/lm8323.c: In function ‘lm8323_suspend’:
drivers/input/keyboard/lm8323.c:801:2: error: implicit declaration of function ‘irq_set_irq_wake’
	[-Werror=implicit-function-declaration]

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-02-13 20:21:07 -08:00
Grant Likely e80beb27d2 gpio: Make of_count_named_gpios() use new of_count_phandle_with_args()
This patch replaces the horribly coded of_count_named_gpios() with a
call to of_count_phandle_with_args() which is far more efficient. This
also changes the return value of of_gpio_count() & of_gpio_named_count()
from 'unsigned int' to 'int' so that it can return an error code. All
the users of that function are fixed up to correctly handle a negative
return value.

v2: Split GPIO portion into a separate patch

Tested-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
2013-02-13 10:11:53 +00:00
Prashant Gaikwad 61fd290d21 ARM: tegra: migrate to new clock code
Migrate Tegra clock support to drivers/clk/tegra, this involves
moving:
1. definition of tegra_cpu_car_ops to clk.c
2. definition of reset functions to clk-peripheral.c
3. change parent of cpu clock.
4. Remove legacy clock initialization.
5. Initialize clocks using DT.
6. Remove all instance of mach/clk.h

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
[swarren: use to_clk_periph_gate().]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:07 -07:00
Brian Swetland 6f2ac009f2 Input: goldfish - virtual input event driver
This device is a direct pipe from "hardware" to the input event subsystem,
allowing us to avoid having to route "keypad" style events through an
AT keyboard driver (gross!).

As with the other submissions this driver is cross architecture.

Signed-off-by: Mike A. Chan <mikechan@google.com>
[Tided up to work on x86]
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
[Ported to 3.4]
Signed-off-by: Tom Keel <thomas.keel@intel.com>
[Cleaned up for 3.7 and submission]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-25 00:06:43 -08:00
Thierry Reding 8d1cbc9883 Input: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 11:41:56 -08:00
Shawn Nematbakhsh be2d7e4233 Input: atkbd - fix multi-byte scancode handling on reconnect
On resume from suspend there is a possibility for multi-byte scancodes
to be handled incorrectly. atkbd_reconnect disables the processing of
scancodes in software by calling atkbd_disable, but the keyboard may
still be active because no disconnect command was sent. Later, software
handling is re-enabled. If a multi-byte scancode sent from the keyboard
straddles the re-enable, only the latter byte(s) will be handled.

In practice, this leads to cases where multi-byte break codes (ex. "e0
4d" - break code for right-arrow) are misread as make codes ("4d" - make
code for numeric 6), leading to one or more unwanted, untyped characters
being interpreted.

The solution implemented here involves sending command f5 (reset
disable) to the keyboard prior to disabling software handling of codes.
Later, the command to re-enable the keyboard is sent only after we are
prepared to handle scancodes.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-21 17:31:40 -08:00
Dmitry Torokhov 236d6a77ee Input: atkbd - fix a typo in a message
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17 00:28:07 -08:00
Laxman Dewangan 914e597682 Input: tegra-kbc - remove default keymap
Tegra KBC driver have the default key mapping for 16x8 configuration.
The key mapping can be provided through platform data or through DT
and the mapping varies from platform to platform, hence this default
mapping is not so useful. Remove the default mapping to reduce the code
lines of the driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17 00:28:02 -08:00
Laxman Dewangan 88390243a9 Input: tegra-kbc - add support for rows/columns configuration from dt
The NVIDIA's Tegra KBC has maximum 24 pins to make matrix keypad.
Any pin can be configured as row or column. The maximum column pin
can be 8 and maximum row pin can be 16.

Remove the assumption that all first 16 pins will be used as row
and remaining as columns and Add the property for configuring pins
to either row or column from DT. Update the devicetree binding
document accordingly.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17 00:28:00 -08:00
Laxman Dewangan 00eb81e56a Input: tegra-kbc - use devm_* for resource allocation
Use devm_* for memory, clock, irq, input device allocation. This reduces
code for freeing these resources.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17 00:27:57 -08:00
Laxman Dewangan 1c407a1b24 Input: tegra-kbc - fix build warning
Fix the following build warning when building driver with CONFIG_PM_SLEEP
not selected.

tegra-kbc.c:360:13: warning: 'tegra_kbc_set_keypress_interrupt' defined but not used [-Wunused-function]

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17 00:27:55 -08:00
Nickolai Zeldovich bec7a4bbec Input: lm8323 - fix checking PWM interrupt status
INT_PWM1 is already a bitmask, not the bit number, so shifting by INT_PWM1 is
incorrect.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-06 00:52:21 -08:00
Javier Martin 0e47e3dccf Input: qt2160 - add support for LEDs
Outputs x8..x0 of the qt2160 can have leds attached to it.
This patch handles those outputs using the generic LED
framework.

The PWM controls available in the chip are used to achieve
different levels of brightness.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-04 16:57:09 -08:00
Linus Torvalds 6ed1914982 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input update from Dmitry Torokhov:
 "Updates for the input subsystem.  Just a couple of driver fixes this
  time."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: gpio_keys - defer probing if GPIO probing is deferred
  Input: gpio_keys_polled - defer probing if GPIO probing is deferred
  Input: sentelic - only report position of first finger as ST coordinates
2013-01-04 10:30:11 -08:00
Greg Kroah-Hartman 0fe763c570 Drivers: misc: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:16 -08:00
Liu Ying 0e14235e6c Input: imx_keypad - add device tree support
This patch adds device tree support for imx keypad driver.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-03 12:41:31 -08:00
Dmitry Torokhov e324ce61ef Input: gpio_keys - defer probing if GPIO probing is deferred
If of_get_gpio_flags() returns an error (as in case when GPIO probe is
deferred) the driver would attempt to claim invalid GPIO. It should
propagate the error code up the stack instead so that the probe either
fails or will be retried later (in case of -EPROBE_DEFER).

Cc: stable@vger.kernel.org
Reported-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-24 09:51:30 -08:00
Gabor Juhos d46329a708 Input: gpio_keys_polled - defer probing if GPIO probing is deferred
If GPIO probing is deferred, the driver tries to claim an invalid GPIO line
which leads to an error message like this:

  gpio-keys-polled buttons.2: unable to claim gpio 4294966779, err=-22
  gpio-keys-polled: probe of buttons.2 failed with error -22

We should make sure that error code returned by of_get_gpio_flags (including
-EPROBE_DEFER) is propagated up the stack.

Cc: stable@vger.kernel.org
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-24 09:51:26 -08:00
Linus Torvalds 31564cbd77 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull second round of input updates from Dmitry Torokhov:
 "As usual, there are a couple of new drivers, input core now supports
  managed input devices (devres), a slew of drivers now have device tree
  support and a bunch of fixes and cleanups."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (71 commits)
  Input: walkera0701 - fix crash on startup
  Input: matrix-keymap - provide a proper module license
  Input: gpio_keys_polled - switch to using gpio_request_one()
  Input: gpio_keys - switch to using gpio_request_one()
  Input: wacom - fix touch support for Bamboo Fun CTH-461
  Input: xpad - add a few new VID/PID combinations
  Input: xpad - minor formatting fixes
  Input: gpio-keys-polled - honor 'autorepeat' setting in platform data
  Input: tca8418-keypad - switch to using managed resources
  Input: tca8418_keypad - increase severity of failures in probe()
  Input: tca8418_keypad - move device ID tables closer to where they are used
  Input: tca8418_keypad - use dev_get_platdata() to retrieve platform data
  Input: tca8418_keypad - use a temporary variable for parent device
  Input: tca8418_keypad - add support for shared interrupt
  Input: tca8418_keypad - add support for device tree bindings
  Input: remove Compaq iPAQ H3600 (Bitsy) touchscreen driver
  Input: bu21013_ts - add support for Device Tree booting
  Input: bu21013_ts - move GPIO init and exit functions into the driver
  Input: bu21013_ts - request regulator that actually exists
  ARM: ux500: Strip out duplicate touch screen platform information
  ...
2012-12-18 12:46:37 -08:00
Tony Lindgren 770b6cb4d2 ARM: OMAP: Fix drivers to depend on omap for internal devices
These devices are not available on other architectures, so
let's limit them to omap.

If the driver subsystem maintainers want to build test
system wide changes without building for each target,
it's easy to carry a test patch that just strips out the
depends entries from Kconfig files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-16 15:23:37 -08:00
Dmitry Torokhov da5ee074ce Input: gpio_keys_polled - switch to using gpio_request_one()
This saves us a few lines of code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-03 21:25:11 -08:00
Dmitry Torokhov 333e34bfe2 Input: gpio_keys - switch to using gpio_request_one()
This saves us a few lines of code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-03 21:25:06 -08:00
Alexander Shiyan 1a22e16fc3 Input: gpio-keys-polled - honor 'autorepeat' setting in platform data
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:31:26 -08:00
Dmitry Torokhov 16ff7cb184 Input: tca8418-keypad - switch to using managed resources
Let's switch to using devm_*() interfaces to manage our resources,
thus will simplify error unwinding a bit.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:30:49 -08:00
Dmitry Torokhov 91c5d67f17 Input: tca8418_keypad - increase severity of failures in probe()
Failures to build a keymap, request an IRQ, or register input device are
fatal for the driver, therefore the messages should have "error" severity
instead of "debug".

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:30:36 -08:00
Dmitry Torokhov 5cc0dfe043 Input: tca8418_keypad - move device ID tables closer to where they are used
This matches structure of most other input drivers.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:30:22 -08:00
Dmitry Torokhov cdbe8a8637 Input: tca8418_keypad - use dev_get_platdata() to retrieve platform data
We need to use proper accessor functions instead of directly poking into
various structures.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:30:03 -08:00
Dmitry Torokhov efce8a4121 Input: tca8418_keypad - use a temporary variable for parent device
Use a temporary variable for our parent device (coming from I2C client
structure); we'll be also using it during conversion to managed resources.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:29:17 -08:00
Alban Bedel bf7f5316cb Input: tca8418_keypad - add support for shared interrupt
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:29:05 -08:00
Alban Bedel e89e29b858 Input: tca8418_keypad - add support for device tree bindings
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-29 09:28:50 -08:00
Jonas Aaberg dda19a92f0 Input: gpio_keys - disable hardware on suspend
Disable hardware if active when suspending if the hw can not
wake the system from suspend.

[Dmitry Torokhov: use input_dev->users instead of a separate flag]

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Reviewed-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27 22:40:07 -08:00
Dmitry Torokhov 5b76d7b4cd Input: gpio_keys - report initial state when opening the device
Instead of reporting the initial stage when the device is registered we
should do it when the device is opened (so there are users).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27 22:40:01 -08:00
Sachin Kamat a57da34795 Input: samsung-keypad - switch to using managed resources
devm_* functions are device managed and make error handling and code
simpler. While at it also fix error exit paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27 22:38:37 -08:00
Vipul Kumar Samar 9336648978 Input: spear-keyboard - add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework.
Because for SPEAr we don't do anything in clk_{un}prepare() calls, just
call them once in probe/remove.

Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27 22:38:32 -08:00
Andreas Pretzsch 92aab96034 Input: imx_keypad - only set enabled columns to open-drain
In imx_keypad_inhibit(), all 8 columns were set to open-drain, in
contrast to the rest of the driver, where only the enabled columns
are modified/used.

Contrary to the normal expectation, this also affects column I/Os not
even mapped via IOMUX to the KPP hardware module but used as a GPIO.
Therefore only init enabled columns to open-drain and leave all others
with their default reset value of 0, i.e. totem-pole.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-25 00:10:18 -08:00
Dmitry Torokhov 6ea32387a0 Input: stmpe-keypad - add support for Device Tree bindings
This patch allows the STMPE driver to be successfully probed and
initialised when Device Tree support is enabled. Besides the usual
platform data changes, we also separate the process of filling in
the 'in use' pin bitmap, as we have to extract the information from
Device Tree in the DT boot case.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:21:49 -08:00
Bill Pemberton e2619cf78e Input: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:05:38 -08:00
Bill Pemberton 5298cc4cc7 Input: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:05:19 -08:00
Bill Pemberton 78f50c246f Input: remove use of __devinitconst
CONFIG_HOTPLUG is going away as an option so __devinitconst is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:04:08 -08:00
Bill Pemberton d6f6dfd941 Input: remove use of __devinitdata
CONFIG_HOTPLUG is going away as an option so __devinitdata is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:03:59 -08:00
Bill Pemberton 1cb0aa8817 Input: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24 00:03:48 -08:00