History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID updates from Jiri Kosina: - support for U2F Zero device, from Andrej Shadura - logitech-dj has historically been treating devices behind non-unifying receivers as generic devices, using the HID emulation in the receiver. That had several shortcomings (special keys handling, battery level monitoring, etc). The driver has been reworked to enumarate (and directly communicate with) the devices behind the receiver, to avoid the (too) generic HID implementation in the receiver itself. All the work done by Benjamin Tissoires and Hans de Goede. - restructuring of intel-ish driver in order to allow for multiple clients of the ISH implementation, from Srinivas Pandruvada - several other smaller fixes and assorted device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (68 commits) HID: logitech-dj: fix spelling in printk HID: input: fix assignment of .value HID: input: make sure the wheel high resolution multiplier is set HID: logitech-dj: add usbhid dependency in Kconfig HID: logitech-hidpp: add support for HID++ 1.0 consumer keys reports HID: logitech-hidpp: add support for HID++ 1.0 extra mouse buttons reports HID: logitech-hidpp: add support for HID++ 1.0 wheel reports HID: logitech-hidpp: make hidpp10_set_register_bit a bit more generic HID: logitech-hidpp: add input_device ptr to struct hidpp_device HID: logitech-hidpp: do not hardcode very long report length HID: logitech-hidpp: handle devices attached to 27MHz wireless receivers HID: logitech-hidpp: use RAP instead of FAP to get the protocol version HID: logitech-hidpp: remove unused origin_is_hid_core function parameter HID: logitech-hidpp: remove double assignment from __hidpp_send_report HID: logitech-hidpp: do not make failure to get the name fatal HID: logitech-hidpp: ignore very-short or empty names HID: logitech-hidpp: make .probe usbhid capable HID: logitech-hidpp: allow non HID++ devices to be handled by this module HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver HID: logitech-dj: make appending of the HID++ descriptors conditional ...

Linus Torvalds committed 7 years ago

Commit b4dd05d2 parents 80104bb 63b6f0b29 files · +3518 −690Browse files

Showing the changes to include/linux (2 of 29 files). Show all

Unified · Split

2 files
  1. include/linux/hid.h +3 −1
  2. include/linux/intel-ish-client-if.h +112 −0
include/linux/hid.h+3−1
@@ -382,6 +382,7 @@ struct hid_item { · 381 unmodified lines
382#define HID_GROUP_WACOM 0x0101382#define HID_GROUP_WACOM 0x0101
383#define HID_GROUP_LOGITECH_DJ_DEVICE 0x0102383#define HID_GROUP_LOGITECH_DJ_DEVICE 0x0102
384#define HID_GROUP_STEAM 0x0103384#define HID_GROUP_STEAM 0x0103
385#define HID_GROUP_LOGITECH_27MHZ_DEVICE 0x0104
385 386
386/*387/*
387 * HID protocol status388 * HID protocol status
@@ -417,6 +418,7 @@ struct hid_global { · 29 unmodified lines
417 418
418struct hid_local {419struct hid_local {
419 unsigned usage[HID_MAX_USAGES]; /* usage array */420 unsigned usage[HID_MAX_USAGES]; /* usage array */
421 u8 usage_size[HID_MAX_USAGES]; /* usage size array */
420 unsigned collection_index[HID_MAX_USAGES]; /* collection index array */422 unsigned collection_index[HID_MAX_USAGES]; /* collection index array */
421 unsigned usage_index;423 unsigned usage_index;
422 unsigned usage_minimum;424 unsigned usage_minimum;
@@ -893,7 +895,7 @@ struct hid_field *hidinput_get_led_field(struct hid_device *hid); · 470 unmodified lines
893unsigned int hidinput_count_leds(struct hid_device *hid);895unsigned int hidinput_count_leds(struct hid_device *hid);
894__s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code);896__s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code);
895void hid_output_report(struct hid_report *report, __u8 *data);897void hid_output_report(struct hid_report *report, __u8 *data);
896void __hid_request(struct hid_device *hid, struct hid_report *rep, int reqtype);898int __hid_request(struct hid_device *hid, struct hid_report *rep, int reqtype);
897u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags);899u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags);
898struct hid_device *hid_allocate_device(void);900struct hid_device *hid_allocate_device(void);
899struct hid_report *hid_register_report(struct hid_device *device,901struct hid_report *hid_register_report(struct hid_device *device,
include/linux/intel-ish-client-if.h+112−0
@@ -0,0 +1,112 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Intel ISH client Interface definitions
4 *
5 * Copyright (c) 2019, Intel Corporation.
6 */
7
8#ifndef _INTEL_ISH_CLIENT_IF_H_
9#define _INTEL_ISH_CLIENT_IF_H_
10
11struct ishtp_cl_device;
12struct ishtp_device;
13struct ishtp_cl;
14struct ishtp_fw_client;
15
16/* Client state */
17enum cl_state {
18 ISHTP_CL_INITIALIZING = 0,
19 ISHTP_CL_CONNECTING,
20 ISHTP_CL_CONNECTED,
21 ISHTP_CL_DISCONNECTING,
22 ISHTP_CL_DISCONNECTED
23};
24
25/**
26 * struct ishtp_cl_device - ISHTP device handle
27 * @driver: driver instance on a bus
28 * @name: Name of the device for probe
29 * @probe: driver callback for device probe
30 * @remove: driver callback on device removal
31 *
32 * Client drivers defines to get probed/removed for ISHTP client device.
33 */
34struct ishtp_cl_driver {
35 struct device_driver driver;
36 const char *name;
37 const guid_t *guid;
38 int (*probe)(struct ishtp_cl_device *dev);
39 int (*remove)(struct ishtp_cl_device *dev);
40 int (*reset)(struct ishtp_cl_device *dev);
41 const struct dev_pm_ops *pm;
42};
43
44/**
45 * struct ishtp_msg_data - ISHTP message data struct
46 * @size: Size of data in the *data
47 * @data: Pointer to data
48 */
49struct ishtp_msg_data {
50 uint32_t size;
51 unsigned char *data;
52};
53
54/*
55 * struct ishtp_cl_rb - request block structure
56 * @list: Link to list members
57 * @cl: ISHTP client instance
58 * @buffer: message header
59 * @buf_idx: Index into buffer
60 * @read_time: unused at this time
61 */
62struct ishtp_cl_rb {
63 struct list_head list;
64 struct ishtp_cl *cl;
65 struct ishtp_msg_data buffer;
66 unsigned long buf_idx;
67 unsigned long read_time;
68};
69
70int ishtp_cl_driver_register(struct ishtp_cl_driver *driver,
71 struct module *owner);
72void ishtp_cl_driver_unregister(struct ishtp_cl_driver *driver);
73int ishtp_register_event_cb(struct ishtp_cl_device *device,
74 void (*read_cb)(struct ishtp_cl_device *));
75
76/* Get the device * from ishtp device instance */
77struct device *ishtp_device(struct ishtp_cl_device *cl_device);
78/* Trace interface for clients */
79void *ishtp_trace_callback(struct ishtp_cl_device *cl_device);
80/* Get device pointer of PCI device for DMA acces */
81struct device *ishtp_get_pci_device(struct ishtp_cl_device *cl_device);
82
83struct ishtp_cl *ishtp_cl_allocate(struct ishtp_cl_device *cl_device);
84void ishtp_cl_free(struct ishtp_cl *cl);
85int ishtp_cl_link(struct ishtp_cl *cl);
86void ishtp_cl_unlink(struct ishtp_cl *cl);
87int ishtp_cl_disconnect(struct ishtp_cl *cl);
88int ishtp_cl_connect(struct ishtp_cl *cl);
89int ishtp_cl_send(struct ishtp_cl *cl, uint8_t *buf, size_t length);
90int ishtp_cl_flush_queues(struct ishtp_cl *cl);
91int ishtp_cl_io_rb_recycle(struct ishtp_cl_rb *rb);
92bool ishtp_cl_tx_empty(struct ishtp_cl *cl);
93struct ishtp_cl_rb *ishtp_cl_rx_get_rb(struct ishtp_cl *cl);
94void *ishtp_get_client_data(struct ishtp_cl *cl);
95void ishtp_set_client_data(struct ishtp_cl *cl, void *data);
96struct ishtp_device *ishtp_get_ishtp_device(struct ishtp_cl *cl);
97void ishtp_set_tx_ring_size(struct ishtp_cl *cl, int size);
98void ishtp_set_rx_ring_size(struct ishtp_cl *cl, int size);
99void ishtp_set_connection_state(struct ishtp_cl *cl, int state);
100void ishtp_cl_set_fw_client_id(struct ishtp_cl *cl, int fw_client_id);
101
102void ishtp_put_device(struct ishtp_cl_device *cl_dev);
103void ishtp_get_device(struct ishtp_cl_device *cl_dev);
104void ishtp_set_drvdata(struct ishtp_cl_device *cl_device, void *data);
105void *ishtp_get_drvdata(struct ishtp_cl_device *cl_device);
106int ishtp_register_event_cb(struct ishtp_cl_device *device,
107 void (*read_cb)(struct ishtp_cl_device *));
108struct ishtp_fw_client *ishtp_fw_cl_get_client(struct ishtp_device *dev,
109 const guid_t *uuid);
110int ishtp_get_fw_client_id(struct ishtp_fw_client *fw_client);
111int ish_hw_reset(struct ishtp_device *dev);
112#endif /* _INTEL_ISH_CLIENT_IF_H_ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t