Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e345ac6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input updates from Dmitry Torokhov:
 "A few new haptic/button drivers, a rudimentary support for laptops
  using FocalTech touchpads; xpad driver will bind to more devices, and
  a few other driver fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: soc_button_array - convert to platform bus
  Input: palmas-pwrbutton - fix typo in the license string
  Input: palmas-pwrbutton - use IRQF_ONESHOT
  Input: psmouse - add support for detecting FocalTech PS/2 touchpads
  Input: psmouse - add psmouse_matches_pnp_id helper function
  Input: joystick - use ktime for measuring timing
  Input: add haptic driver on max77693
  Input: introduce palmas-pwrbutton
  Input: add support for the DRV2667 haptic driver
  Input: xpad - sync device IDs with xboxdrv
  Input: xpad - add VID/PID for Razer Sabertooth
  Input: cros_ec_keyb - optimize ghosting algorithm
  Input: drv260x - fix binding document
  Input: drv260x - add check for ERM mode and LRA Libraries
  Input: drv260x - remove unused defines
  Input: drv260x - add TI drv260x haptics driver
parents 39520eea 447a8b85
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
* Texas Instruments - drv260x Haptics driver family

Required properties:
	- compatible - One of:
		"ti,drv2604" - DRV2604
		"ti,drv2605" - DRV2605
		"ti,drv2605l" - DRV2605L
	- reg -  I2C slave address
	- vbat-supply - Required supply regulator
	- mode - Power up mode of the chip (defined in include/dt-bindings/input/ti-drv260x.h)
		DRV260X_LRA_MODE - Linear Resonance Actuator mode (Piezoelectric)
		DRV260X_LRA_NO_CAL_MODE - This is a LRA Mode but there is no calibration
				sequence during init.  And the device is configured for real
				time playback mode (RTP mode).
		DRV260X_ERM_MODE - Eccentric Rotating Mass mode (Rotary vibrator)
	- library-sel - These are ROM based waveforms pre-programmed into the IC.
				This should be set to set the library to use at power up.
				(defined in include/dt-bindings/input/ti-drv260x.h)
		DRV260X_LIB_EMPTY - Do not use a pre-programmed library
		DRV260X_ERM_LIB_A - Pre-programmed Library
		DRV260X_ERM_LIB_B - Pre-programmed Library
		DRV260X_ERM_LIB_C - Pre-programmed Library
		DRV260X_ERM_LIB_D - Pre-programmed Library
		DRV260X_ERM_LIB_E - Pre-programmed Library
		DRV260X_ERM_LIB_F - Pre-programmed Library
		DRV260X_LIB_LRA - Pre-programmed LRA Library

Optional properties:
	- enable-gpio - gpio pin to enable/disable the device.
	- vib-rated-mv - The rated voltage of the actuator in millivolts.
			  If this is not set then the value will be defaulted to
			  3.2 v.
	- vib-overdrive-mv - The overdrive voltage of the actuator in millivolts.
			  If this is not set then the value will be defaulted to
			  3.2 v.
Example:

haptics: haptics@5a {
	compatible = "ti,drv2605l";
	reg = <0x5a>;
	vbat-supply = <&vbat>;
	enable-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
	mode = <DRV260X_LRA_MODE>;
	library-sel = <DRV260X_LIB_LRA>;
	vib-rated-mv = <3200>;
	vib-overdriver-mv = <3200>;
}

For more product information please see the link below:
http://www.ti.com/product/drv2605
+17 −0
Original line number Diff line number Diff line
* Texas Instruments - drv2667 Haptics driver

Required properties:
	- compatible - "ti,drv2667" - DRV2667
	- reg -  I2C slave address
	- vbat-supply - Required supply regulator

Example:

haptics: haptics@59 {
	compatible = "ti,drv2667";
	reg = <0x59>;
	vbat-supply = <&vbat>;
};

For more product information please see the link below:
http://www.ti.com/product/drv2667
+36 −0
Original line number Diff line number Diff line
Texas Instruments Palmas family power button module

This module is part of the Palmas family of PMICs. For more details
about the whole chip see:
Documentation/devicetree/bindings/mfd/palmas.txt.

This module provides a simple power button event via an Interrupt.

Required properties:
- compatible: should be one of the following
   - "ti,palmas-pwrbutton": For Palmas compatible power on button
- interrupt-parent: Parent interrupt device, must be handle of palmas node.
- interrupts: Interrupt number of power button submodule on device.

Optional Properties:

- ti,palmas-long-press-seconds: Duration in seconds which the power
  button should be kept pressed for Palmas to power off automatically.
  NOTE: This depends on OTP support and POWERHOLD signal configuration
  on platform. Valid values are 6, 8, 10 and 12.
- ti,palmas-pwron-debounce-milli-seconds: Duration in milliseconds
  which the power button should be kept pressed for Palmas to register
  a press for debouncing purposes. NOTE: This depends on specific
  Palmas variation capability. Valid values are 15, 100, 500 and 1000.

Example:

&palmas {
	palmas_pwr_button: pwrbutton {
		compatible = "ti,palmas-pwrbutton";
		interrupt-parent = <&tps659038>;
		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
		ti,palmas-long-press-seconds = <12>;
		ti,palmas-pwron-debounce-milli-seconds = <15>;
	};
};
+0 −2
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@
#include <linux/ctype.h>

static const struct acpi_device_id acpi_pnp_device_ids[] = {
	/* soc_button_array */
	{"PNP0C40"},
	/* pata_isapnp */
	{"PNP0600"},		/* Generic ESDI/IDE/ATA compatible hard disk controller */
	/* floppy */
+40 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <linux/workqueue.h>
#include <linux/sched.h>	/* HZ */
#include <linux/mutex.h>
#include <linux/timekeeping.h>

/*#include <asm/io.h>*/

@@ -30,6 +31,10 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Generic gameport layer");
MODULE_LICENSE("GPL");

static bool use_ktime = true;
module_param(use_ktime, bool, 0400);
MODULE_PARM_DESC(use_ktime, "Use ktime for measuring I/O speed");

/*
 * gameport_mutex protects entire gameport subsystem and is taken
 * every time gameport port or driver registrered or unregistered.
@@ -75,6 +80,38 @@ static unsigned int get_time_pit(void)
 */

static int gameport_measure_speed(struct gameport *gameport)
{
	unsigned int i, t, tx;
	u64 t1, t2, t3;
	unsigned long flags;

	if (gameport_open(gameport, NULL, GAMEPORT_MODE_RAW))
		return 0;

	tx = ~0;

	for (i = 0; i < 50; i++) {
		local_irq_save(flags);
		t1 = ktime_get_ns();
		for (t = 0; t < 50; t++)
			gameport_read(gameport);
		t2 = ktime_get_ns();
		t3 = ktime_get_ns();
		local_irq_restore(flags);
		udelay(i * 10);
		t = (t2 - t1) - (t3 - t2);
		if (t < tx)
			tx = t;
	}

	gameport_close(gameport);
	t = 1000000 * 50;
	if (tx)
		t /= tx;
	return t;
}

static int old_gameport_measure_speed(struct gameport *gameport)
{
#if defined(__i386__)

@@ -521,7 +558,9 @@ static void gameport_add_port(struct gameport *gameport)
	if (gameport->parent)
		gameport->parent->child = gameport;

	gameport->speed = gameport_measure_speed(gameport);
	gameport->speed = use_ktime ?
		gameport_measure_speed(gameport) :
		old_gameport_measure_speed(gameport);

	list_add_tail(&gameport->node, &gameport_list);

Loading