View | Details | Raw Unified | Return to bug 60181 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/hid/hid-apple.c (+6 lines)
Lines 529-534 static const struct hid_device_id apple_ Link Here
529
		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
529
		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
530
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
530
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
531
		.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
531
		.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
532
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI),
533
		.driver_data = APPLE_HAS_FN },
534
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO),
535
		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
536
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS),
537
		.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
532
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
538
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
533
		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
539
		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
534
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
540
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
(-)a/drivers/hid/hid-core.c (+6 lines)
Lines 1566-1571 static const struct hid_device_id hid_ha Link Here
1566
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
1566
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
1567
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
1567
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
1568
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
1568
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
1569
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) },
1570
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) },
1571
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) },
1569
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
1572
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
1570
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
1573
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
1571
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
1574
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
Lines 2178-2183 static const struct hid_device_id hid_mo Link Here
2178
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
2181
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
2179
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
2182
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
2180
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
2183
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
2184
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) },
2185
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) },
2186
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) },
2181
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
2187
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
2182
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
2188
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
2183
	{ }
2189
	{ }
(-)a/drivers/hid/hid-ids.h (+3 lines)
Lines 135-140 Link Here
135
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
135
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
136
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI  0x0255
136
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI  0x0255
137
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
137
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
138
#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI	0x0291
139
#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO	0x0292
140
#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS	0x0293
138
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
141
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
139
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
142
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
140
#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL	0x8241
143
#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL	0x8241
(-)a/drivers/input/mouse/bcm5974.c (-2 / +40 lines)
Lines 88-93 Link Here
88
#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI	0x0259
88
#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI	0x0259
89
#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO	0x025a
89
#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO	0x025a
90
#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS	0x025b
90
#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS	0x025b
91
/* MacbookAir6,2 (unibody, June 2013) */
92
#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI	0x0291
93
#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO	0x0292
94
#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS	0x0293
91
95
92
#define BCM5974_DEVICE(prod) {					\
96
#define BCM5974_DEVICE(prod) {					\
93
	.match_flags = (USB_DEVICE_ID_MATCH_DEVICE |		\
97
	.match_flags = (USB_DEVICE_ID_MATCH_DEVICE |		\
Lines 145-150 static const struct usb_device_id bcm597 Link Here
145
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
149
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
146
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
150
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
147
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
151
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
152
	/* MacbookAir6,2 */
153
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI),
154
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING8_ISO),
155
	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING8_JIS),
148
	/* Terminating entry */
156
	/* Terminating entry */
149
	{}
157
	{}
150
};
158
};
Lines 172-186 struct bt_data { Link Here
172
/* trackpad header types */
180
/* trackpad header types */
173
enum tp_type {
181
enum tp_type {
174
	TYPE1,			/* plain trackpad */
182
	TYPE1,			/* plain trackpad */
175
	TYPE2			/* button integrated in trackpad */
183
	TYPE2,			/* button integrated in trackpad */
184
	TYPE3			/* something new */
176
};
185
};
177
186
178
/* trackpad finger data offsets, le16-aligned */
187
/* trackpad finger data offsets, le16-aligned */
179
#define FINGER_TYPE1		(13 * sizeof(__le16))
188
#define FINGER_TYPE1		(13 * sizeof(__le16))
180
#define FINGER_TYPE2		(15 * sizeof(__le16))
189
#define FINGER_TYPE2		(15 * sizeof(__le16))
190
#define FINGER_TYPE3		(19 * sizeof(__le16))
181
191
182
/* trackpad button data offsets */
192
/* trackpad button data offsets */
183
#define BUTTON_TYPE2		15
193
#define BUTTON_TYPE2		15
194
#define BUTTON_TYPE3		11
184
195
185
/* list of device capability bits */
196
/* list of device capability bits */
186
#define HAS_INTEGRATED_BUTTON	1
197
#define HAS_INTEGRATED_BUTTON	1
Lines 400-405 static const struct bcm5974_config bcm59 Link Here
400
		{ SN_COORD, -150, 6730 },
411
		{ SN_COORD, -150, 6730 },
401
		{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
412
		{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
402
	},
413
	},
414
	{
415
		USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI,
416
		USB_DEVICE_ID_APPLE_WELLSPRING8_ISO,
417
		USB_DEVICE_ID_APPLE_WELLSPRING8_JIS,
418
		HAS_INTEGRATED_BUTTON,
419
		0, sizeof(struct bt_data),
420
		0x83, TYPE3, FINGER_TYPE3, FINGER_TYPE3 + SIZEOF_ALL_FINGERS,
421
		{ SN_PRESSURE, 0, 300 },
422
		{ SN_WIDTH, 0, 2048 },
423
		{ SN_COORD, -4620, 5140 },
424
		{ SN_COORD, -150, 6600 },
425
		{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
426
	},
403
	{}
427
	{}
404
};
428
};
405
429
Lines 556-561 static int report_tp_state(struct bcm597 Link Here
556
		int ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
580
		int ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
557
		input_report_key(input, BTN_LEFT, ibt);
581
		input_report_key(input, BTN_LEFT, ibt);
558
	}
582
	}
583
	/* type 3 encodes the button in field[11] */
584
	else if (c->tp_type == TYPE3) {
585
		int ibt;
586
		const __le16 *data_array;
587
588
		data_array = (const __le16 *)(dev->tp_data);
589
		ibt = !!(raw2int(data_array[BUTTON_TYPE3]) & 0x100);
590
		input_report_key(input, BTN_LEFT, ibt);
591
	}
559
592
560
	input_sync(input);
593
	input_sync(input);
561
594
Lines 572-580 static int report_tp_state(struct bcm597 Link Here
572
605
573
static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
606
static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
574
{
607
{
575
	char *data = kmalloc(8, GFP_KERNEL);
576
	int retval = 0, size;
608
	int retval = 0, size;
609
	char *data;
610
611
	/* Type 3 does not require a mode switch */
612
	if (dev->cfg.tp_type == TYPE3)
613
		return 0;
577
614
615
	data = kmalloc(8, GFP_KERNEL);
578
	if (!data) {
616
	if (!data) {
579
		dev_err(&dev->intf->dev, "out of memory\n");
617
		dev_err(&dev->intf->dev, "out of memory\n");
580
		retval = -ENOMEM;
618
		retval = -ENOMEM;

Return to bug 60181