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

Commit 01f7e67a authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Merge branch 'next' into for-linus

Prepare second round of input updates for 4.18 merge window.
parents fc573af6 c258e84b
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
Spreadtrum SC27xx PMIC Vibrator

Required properties:
- compatible: should be "sprd,sc2731-vibrator".
- reg: address of vibrator control register.

Example :

	sc2731_pmic: pmic@0 {
		compatible = "sprd,sc2731";
		reg = <0>;
		spi-max-frequency = <26000000>;
		interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-controller;
		#interrupt-cells = <2>;
		#address-cells = <1>;
		#size-cells = <0>;

		vibrator@eb4 {
			compatible = "sprd,sc2731-vibrator";
			reg = <0xeb4>;
		};
	};
+8 −4
Original line number Diff line number Diff line
@@ -131,8 +131,10 @@ EXPORT_SYMBOL(input_mt_destroy_slots);
 * inactive, or if the tool type is changed, a new tracking id is
 * assigned to the slot. The tool type is only reported if the
 * corresponding absbit field is set.
 *
 * Returns true if contact is active.
 */
void input_mt_report_slot_state(struct input_dev *dev,
bool input_mt_report_slot_state(struct input_dev *dev,
				unsigned int tool_type, bool active)
{
	struct input_mt *mt = dev->mt;
@@ -140,22 +142,24 @@ void input_mt_report_slot_state(struct input_dev *dev,
	int id;

	if (!mt)
		return;
		return false;

	slot = &mt->slots[mt->slot];
	slot->frame = mt->frame;

	if (!active) {
		input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
		return;
		return false;
	}

	id = input_mt_get_value(slot, ABS_MT_TRACKING_ID);
	if (id < 0 || input_mt_get_value(slot, ABS_MT_TOOL_TYPE) != tool_type)
	if (id < 0)
		id = input_mt_new_trkid(mt);

	input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, id);
	input_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, tool_type);

	return true;
}
EXPORT_SYMBOL(input_mt_report_slot_state);

+5 −4
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ struct event_dev {
static irqreturn_t events_interrupt(int irq, void *dev_id)
{
	struct event_dev *edev = dev_id;
	unsigned type, code, value;
	unsigned int type, code, value;

	type = __raw_readl(edev->addr + REG_READ);
	code = __raw_readl(edev->addr + REG_READ);
@@ -57,7 +57,7 @@ static irqreturn_t events_interrupt(int irq, void *dev_id)
}

static void events_import_bits(struct event_dev *edev,
			unsigned long bits[], unsigned type, size_t count)
			unsigned long bits[], unsigned int type, size_t count)
{
	void __iomem *addr = edev->addr;
	int i, j;
@@ -99,6 +99,7 @@ static void events_import_abs_params(struct event_dev *edev)

		for (j = 0; j < ARRAY_SIZE(val); j++) {
			int offset = (i * ARRAY_SIZE(val) + j) * sizeof(u32);

			val[j] = __raw_readl(edev->addr + REG_DATA + offset);
		}

@@ -112,7 +113,7 @@ static int events_probe(struct platform_device *pdev)
	struct input_dev *input_dev;
	struct event_dev *edev;
	struct resource *res;
	unsigned keymapnamelen;
	unsigned int keymapnamelen;
	void __iomem *addr;
	int irq;
	int i;
@@ -150,7 +151,7 @@ static int events_probe(struct platform_device *pdev)
	for (i = 0; i < keymapnamelen; i++)
		edev->name[i] = __raw_readb(edev->addr + REG_DATA + i);

	pr_debug("events_probe() keymap=%s\n", edev->name);
	pr_debug("%s: keymap=%s\n", __func__, edev->name);

	input_dev->name = edev->name;
	input_dev->id.bustype = BUS_HOST;
+10 −0
Original line number Diff line number Diff line
@@ -841,4 +841,14 @@ config INPUT_RAVE_SP_PWRBUTTON
	  To compile this driver as a module, choose M here: the
	  module will be called rave-sp-pwrbutton.

config INPUT_SC27XX_VIBRA
	tristate "Spreadtrum sc27xx vibrator support"
	depends on MFD_SC27XX_PMIC || COMPILE_TEST
	select INPUT_FF_MEMLESS
	help
	  This option enables support for Spreadtrum sc27xx vibrator driver.

	  To compile this driver as a module, choose M here. The module will
	  be called sc27xx_vibra.

endif
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ obj-$(CONFIG_INPUT_RETU_PWRBUTTON) += retu-pwrbutton.o
obj-$(CONFIG_INPUT_AXP20X_PEK)		+= axp20x-pek.o
obj-$(CONFIG_INPUT_GPIO_ROTARY_ENCODER)	+= rotary_encoder.o
obj-$(CONFIG_INPUT_RK805_PWRKEY)	+= rk805-pwrkey.o
obj-$(CONFIG_INPUT_SC27XX_VIBRA)	+= sc27xx-vibra.o
obj-$(CONFIG_INPUT_SGI_BTNS)		+= sgi_btns.o
obj-$(CONFIG_INPUT_SIRFSOC_ONKEY)	+= sirfsoc-onkey.o
obj-$(CONFIG_INPUT_SOC_BUTTON_ARRAY)	+= soc_button_array.o
Loading