diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hid.h | 5 | ||||
| -rw-r--r-- | include/linux/hiddev.h | 12 | ||||
| -rw-r--r-- | include/linux/i2c/i2c-hid.h | 6 |
3 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 28f38e2b8f30..5be325d890d9 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -268,6 +268,8 @@ struct hid_item { | |||
| 268 | #define HID_CP_APPLICATIONLAUNCHBUTTONS 0x000c0180 | 268 | #define HID_CP_APPLICATIONLAUNCHBUTTONS 0x000c0180 |
| 269 | #define HID_CP_GENERICGUIAPPLICATIONCONTROLS 0x000c0200 | 269 | #define HID_CP_GENERICGUIAPPLICATIONCONTROLS 0x000c0200 |
| 270 | 270 | ||
| 271 | #define HID_DG_DEVICECONFIG 0x000d000e | ||
| 272 | #define HID_DG_DEVICESETTINGS 0x000d0023 | ||
| 271 | #define HID_DG_CONFIDENCE 0x000d0047 | 273 | #define HID_DG_CONFIDENCE 0x000d0047 |
| 272 | #define HID_DG_WIDTH 0x000d0048 | 274 | #define HID_DG_WIDTH 0x000d0048 |
| 273 | #define HID_DG_HEIGHT 0x000d0049 | 275 | #define HID_DG_HEIGHT 0x000d0049 |
| @@ -322,7 +324,7 @@ struct hid_item { | |||
| 322 | #define HID_QUIRK_MULTI_INPUT 0x00000040 | 324 | #define HID_QUIRK_MULTI_INPUT 0x00000040 |
| 323 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 | 325 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 |
| 324 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 | 326 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 |
| 325 | #define HID_QUIRK_NO_INIT_INPUT_REPORTS 0x00000200 | 327 | /* 0x00000200 reserved for backward compatibility, was NO_INIT_INPUT_REPORTS */ |
| 326 | #define HID_QUIRK_ALWAYS_POLL 0x00000400 | 328 | #define HID_QUIRK_ALWAYS_POLL 0x00000400 |
| 327 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 329 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
| 328 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 | 330 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 |
| @@ -541,7 +543,6 @@ struct hid_device { /* device report descriptor */ | |||
| 541 | struct list_head inputs; /* The list of inputs */ | 543 | struct list_head inputs; /* The list of inputs */ |
| 542 | void *hiddev; /* The hiddev structure */ | 544 | void *hiddev; /* The hiddev structure */ |
| 543 | void *hidraw; | 545 | void *hidraw; |
| 544 | int minor; /* Hiddev minor number */ | ||
| 545 | 546 | ||
| 546 | int open; /* is the device open by anyone? */ | 547 | int open; /* is the device open by anyone? */ |
| 547 | char name[128]; /* Device name */ | 548 | char name[128]; /* Device name */ |
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index a5dd8148660b..921622222957 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h | |||
| @@ -32,6 +32,18 @@ | |||
| 32 | * In-kernel definitions. | 32 | * In-kernel definitions. |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | struct hiddev { | ||
| 36 | int minor; | ||
| 37 | int exist; | ||
| 38 | int open; | ||
| 39 | struct mutex existancelock; | ||
| 40 | wait_queue_head_t wait; | ||
| 41 | struct hid_device *hid; | ||
| 42 | struct list_head list; | ||
| 43 | spinlock_t list_lock; | ||
| 44 | bool initialized; | ||
| 45 | }; | ||
| 46 | |||
| 35 | struct hid_device; | 47 | struct hid_device; |
| 36 | struct hid_usage; | 48 | struct hid_usage; |
| 37 | struct hid_field; | 49 | struct hid_field; |
diff --git a/include/linux/i2c/i2c-hid.h b/include/linux/i2c/i2c-hid.h index 7aa901d92058..1fb088239d12 100644 --- a/include/linux/i2c/i2c-hid.h +++ b/include/linux/i2c/i2c-hid.h | |||
| @@ -14,9 +14,13 @@ | |||
| 14 | 14 | ||
| 15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 16 | 16 | ||
| 17 | struct regulator; | ||
| 18 | |||
| 17 | /** | 19 | /** |
| 18 | * struct i2chid_platform_data - used by hid over i2c implementation. | 20 | * struct i2chid_platform_data - used by hid over i2c implementation. |
| 19 | * @hid_descriptor_address: i2c register where the HID descriptor is stored. | 21 | * @hid_descriptor_address: i2c register where the HID descriptor is stored. |
| 22 | * @supply: regulator for powering on the device. | ||
| 23 | * @post_power_delay_ms: delay after powering on before device is usable. | ||
| 20 | * | 24 | * |
| 21 | * Note that it is the responsibility of the platform driver (or the acpi 5.0 | 25 | * Note that it is the responsibility of the platform driver (or the acpi 5.0 |
| 22 | * driver, or the flattened device tree) to setup the irq related to the gpio in | 26 | * driver, or the flattened device tree) to setup the irq related to the gpio in |
| @@ -31,6 +35,8 @@ | |||
| 31 | */ | 35 | */ |
| 32 | struct i2c_hid_platform_data { | 36 | struct i2c_hid_platform_data { |
| 33 | u16 hid_descriptor_address; | 37 | u16 hid_descriptor_address; |
| 38 | struct regulator *supply; | ||
| 39 | int post_power_delay_ms; | ||
| 34 | }; | 40 | }; |
| 35 | 41 | ||
| 36 | #endif /* __LINUX_I2C_HID_H */ | 42 | #endif /* __LINUX_I2C_HID_H */ |
