---
name: "input_mt_init_slots"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/input_mt_init_slots"
---

# input\_mt\_init\_slots(9)

initialize MT input slots

## NAME

input\_mt\_init\_slots - initialize MT input slots

## SYNOPSIS

**int input\_mt\_init\_slots(struct input\_dev \*** *dev***, unsigned int** *num\_slots***, unsigned int** *flags***);**

## ARGUMENTS

*dev*

input device supporting MT events and finger tracking

*num\_slots*

number of slots used by the device

*flags*

mt tasks to handle in core

## DESCRIPTION

This function allocates all necessary memory for MT slot handling in the input device, prepares the ABS\_MT\_SLOT and ABS\_MT\_TRACKING\_ID events for use and sets up appropriate buffers. Depending on the flags set, it also performs pointer emulation and frame synchronization.

May be called repeatedly. Returns -EINVAL if attempting to reinitialize with a different number of slots.

## COPYRIGHT
