All of lore.kernel.org
 help / color / mirror / Atom feed
* Add missing device ID for mid-2013 Macbook Air 6,1
@ 2013-08-24 14:17 Ian Munsie
  2013-08-24 14:17 ` [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air Ian Munsie
  2013-08-24 14:17 ` [PATCH 2/2] Input: bcm5974: " Ian Munsie
  0 siblings, 2 replies; 8+ messages in thread
From: Ian Munsie @ 2013-08-24 14:17 UTC (permalink / raw)
  To: Henrik Rydberg, Dmitry Torokhov, Jiri Kosina; +Cc: linux-input, linux-kernel

I recently got a new mid-2013 Macbook Air, which seems to use a device ID that
is missing from the kernel. From lsusb:
Bus 001 Device 003: ID 05ac:0290 Apple, Inc.

This generation of Macbook Air already has three IDs listed in the kernel
(0x0291, 0x0292 and 0x0293) as WELLSPRING8, so I've added 0x0290 to that list
as WELLSPRING8A. It looks like these generally come in triplets of consecutive
device IDs, so it's not clear to me why there would be an extra one in this
generation (and only -1 from the existing IDs which doesn't leave room for
additional ISO & JIS layouts if they are numbered consecutively).

With these patches the Fn key now works for me, as does the multitouch
functionality of the touchpad.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air
  2013-08-24 14:17 Add missing device ID for mid-2013 Macbook Air 6,1 Ian Munsie
@ 2013-08-24 14:17 ` Ian Munsie
  2013-08-24 23:26   ` Dmitry Torokhov
  2013-08-25  7:11   ` Henrik Rydberg
  2013-08-24 14:17 ` [PATCH 2/2] Input: bcm5974: " Ian Munsie
  1 sibling, 2 replies; 8+ messages in thread
From: Ian Munsie @ 2013-08-24 14:17 UTC (permalink / raw)
  To: Henrik Rydberg, Dmitry Torokhov, Jiri Kosina
  Cc: linux-input, linux-kernel, Ian Munsie

This patch adds a device ID found for mid-2013 Macbook Air 6,1 from
lsusb:

Bus 001 Device 003: ID 05ac:0290 Apple, Inc.

Since IDs already exist for this generation Macbook air as WELLSPRING8,
name this one WELLSPRING8A. This only adds an ANSI version since it's
device ID is only one less than the existing WELLSPRING8 IDs.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
---
 drivers/hid/hid-apple.c | 2 ++
 drivers/hid/hid-core.c  | 2 ++
 drivers/hid/hid-ids.h   | 1 +
 3 files changed, 5 insertions(+)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index c7710b5..9e5e9dd 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -530,6 +530,8 @@ static const struct hid_device_id apple_devices[] = {
 		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS),
 		.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI),
+		.driver_data = APPLE_HAS_FN },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 36668d1..5ebcfac 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1550,6 +1550,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
@@ -2195,6 +2196,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
 	{ }
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index ffe4c7a..442a877 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -135,6 +135,7 @@
 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI  0x0255
 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
+#define USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI	0x0290
 #define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI	0x0291
 #define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO	0x0292
 #define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS	0x0293
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] Input: bcm5974: Add another device ID for the mid-2013 Macbook Air
  2013-08-24 14:17 Add missing device ID for mid-2013 Macbook Air 6,1 Ian Munsie
  2013-08-24 14:17 ` [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air Ian Munsie
@ 2013-08-24 14:17 ` Ian Munsie
  1 sibling, 0 replies; 8+ messages in thread
From: Ian Munsie @ 2013-08-24 14:17 UTC (permalink / raw)
  To: Henrik Rydberg, Dmitry Torokhov, Jiri Kosina
  Cc: linux-input, linux-kernel, Ian Munsie

This patch adds a device ID found for mid-2013 Macbook Air 6,1 from
lsusb:

Bus 001 Device 003: ID 05ac:0290 Apple, Inc.

Since IDs already exist for this generation Macbook air as WELLSPRING8,
name this one WELLSPRING8A. This only adds an ANSI version since it's
device ID is only one less than the existing WELLSPRING8 IDs.

Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
---
 drivers/input/mouse/bcm5974.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 4ef4d5e..fcd2f3f 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -88,6 +88,8 @@
 #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI	0x0259
 #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO	0x025a
 #define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS	0x025b
+/* MacbookAir6,1 (unibody, June 2013) */
+#define USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI	0x0290
 /* MacbookAir6,2 (unibody, June 2013) */
 #define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI	0x0291
 #define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO	0x0292
@@ -149,6 +151,8 @@ static const struct usb_device_id bcm5974_table[] = {
 	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
 	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
 	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
+	/* MacbookAir6,1 */
+	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI),
 	/* MacbookAir6,2 */
 	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI),
 	BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING8_ISO),
@@ -424,6 +428,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
 		{ SN_COORD, -150, 6600 },
 		{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
 	},
+	{
+		USB_DEVICE_ID_APPLE_WELLSPRING8A_ANSI,
+		0,
+		0,
+		HAS_INTEGRATED_BUTTON,
+		0, sizeof(struct bt_data),
+		0x83, TYPE3, FINGER_TYPE3, FINGER_TYPE3 + SIZEOF_ALL_FINGERS,
+		{ SN_PRESSURE, 0, 300 },
+		{ SN_WIDTH, 0, 2048 },
+		{ SN_COORD, -4620, 5140 },
+		{ SN_COORD, -150, 6600 },
+		{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
+	},
 	{}
 };
 
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air
  2013-08-24 14:17 ` [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air Ian Munsie
@ 2013-08-24 23:26   ` Dmitry Torokhov
  2013-08-25  6:56     ` Henrik Rydberg
  2013-08-25  7:11   ` Henrik Rydberg
  1 sibling, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2013-08-24 23:26 UTC (permalink / raw)
  To: Ian Munsie; +Cc: Henrik Rydberg, Jiri Kosina, linux-input, linux-kernel

Hi Ian,

On Sun, Aug 25, 2013 at 12:17:52AM +1000, Ian Munsie wrote:
> This patch adds a device ID found for mid-2013 Macbook Air 6,1 from
> lsusb:
> 
> Bus 001 Device 003: ID 05ac:0290 Apple, Inc.
> 
> Since IDs already exist for this generation Macbook air as WELLSPRING8,
> name this one WELLSPRING8A. This only adds an ANSI version since it's
> device ID is only one less than the existing WELLSPRING8 IDs.
> 
> Signed-off-by: Ian Munsie <darkstarsword@gmail.com>

Thank you for the patch!

Jiri, can I take it through my tree for 3.11?

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air
  2013-08-24 23:26   ` Dmitry Torokhov
@ 2013-08-25  6:56     ` Henrik Rydberg
  0 siblings, 0 replies; 8+ messages in thread
From: Henrik Rydberg @ 2013-08-25  6:56 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Ian Munsie, Jiri Kosina, linux-input, linux-kernel

On Sat, Aug 24, 2013 at 04:26:30PM -0700, Dmitry Torokhov wrote:
> Hi Ian,
> 
> On Sun, Aug 25, 2013 at 12:17:52AM +1000, Ian Munsie wrote:
> > This patch adds a device ID found for mid-2013 Macbook Air 6,1 from
> > lsusb:
> > 
> > Bus 001 Device 003: ID 05ac:0290 Apple, Inc.
> > 
> > Since IDs already exist for this generation Macbook air as WELLSPRING8,
> > name this one WELLSPRING8A. This only adds an ANSI version since it's
> > device ID is only one less than the existing WELLSPRING8 IDs.
> > 
> > Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
> 
> Thank you for the patch!
> 
> Jiri, can I take it through my tree for 3.11?

Wait, we probably want to resolve the USB ID inconsistency first. :-)

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air
  2013-08-24 14:17 ` [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air Ian Munsie
  2013-08-24 23:26   ` Dmitry Torokhov
@ 2013-08-25  7:11   ` Henrik Rydberg
  2013-08-26  1:50     ` Ian Munsie
  1 sibling, 1 reply; 8+ messages in thread
From: Henrik Rydberg @ 2013-08-25  7:11 UTC (permalink / raw)
  To: Ian Munsie
  Cc: Brad Ford, Linus G Thiel, Dmitry Torokhov, Jiri Kosina,
	linux-input, linux-kernel

Hi Ian,

> This patch adds a device ID found for mid-2013 Macbook Air 6,1 from
> lsusb:
> 
> Bus 001 Device 003: ID 05ac:0290 Apple, Inc.
> 
> Since IDs already exist for this generation Macbook air as WELLSPRING8,
> name this one WELLSPRING8A. This only adds an ANSI version since it's
> device ID is only one less than the existing WELLSPRING8 IDs.

This seems to indicate that we got the ANSI/ISO numbers wrong in a
recent patch. IIRC, there was doubt already when the patch was
applied (Linus T CC'd). Most likely the right patch is this:

diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 4ef4d5e..a73f961 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -89,9 +89,9 @@
 #define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO   0x025a
 #define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS   0x025b
 /* MacbookAir6,2 (unibody, June 2013) */
-#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI   0x0291
-#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO    0x0292
-#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS    0x0293
+#define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI   0x0290
+#define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO    0x0291
+#define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS    0x0292
 
 #define BCM5974_DEVICE(prod) {                                 \
        .match_flags = (USB_DEVICE_ID_MATCH_DEVICE |            \

Brad, Linus, does the above patch work for you as well as for Ian?

Thanks,
Henrik

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air
  2013-08-25  7:11   ` Henrik Rydberg
@ 2013-08-26  1:50     ` Ian Munsie
       [not found]       ` <CAG4XgJTX13d9-2X7g7Dpi+O6nFhsufAijAnVpAczwrkiLrrZng@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Ian Munsie @ 2013-08-26  1:50 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Brad Ford, Linus G Thiel, Dmitry Torokhov, Jiri Kosina,
	linux-input, linux-kernel

> Brad, Linus, does the above patch work for you as well as for Ian?

That would work fine for me, but I guess we need confirmation from
someone with the ISO or JIS layouts.

Cheers,
-Ian

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air
       [not found]       ` <CAG4XgJTX13d9-2X7g7Dpi+O6nFhsufAijAnVpAczwrkiLrrZng@mail.gmail.com>
@ 2013-09-01 12:59         ` Henrik Rydberg
  0 siblings, 0 replies; 8+ messages in thread
From: Henrik Rydberg @ 2013-09-01 12:59 UTC (permalink / raw)
  To: Linus G Thiel
  Cc: Ian Munsie, Brad Ford, Dmitry Torokhov, Jiri Kosina, linux-input,
	linux-kernel

On Mon, Aug 26, 2013 at 02:51:32PM +0200, Linus G Thiel wrote:
> I'm on an ISO layout, this is what makes sense to me and it also works fine
> on my laptop (6,2 with Swedish layout).
> 
> 
> On Mon, Aug 26, 2013 at 3:50 AM, Ian Munsie <darkstarsword@gmail.com> wrote:
> 
> > > Brad, Linus, does the above patch work for you as well as for Ian?
> >
> > That would work fine for me, but I guess we need confirmation from
> > someone with the ISO or JIS layouts.
> >
> > Cheers,
> > -Ian

Thanks for the tests, we will assume it works for Brad as well. I will send a new patch.

Henrik

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-09-01 12:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-24 14:17 Add missing device ID for mid-2013 Macbook Air 6,1 Ian Munsie
2013-08-24 14:17 ` [PATCH 1/2] HID: apple: Add another device ID for the mid-2013 Macbook Air Ian Munsie
2013-08-24 23:26   ` Dmitry Torokhov
2013-08-25  6:56     ` Henrik Rydberg
2013-08-25  7:11   ` Henrik Rydberg
2013-08-26  1:50     ` Ian Munsie
     [not found]       ` <CAG4XgJTX13d9-2X7g7Dpi+O6nFhsufAijAnVpAczwrkiLrrZng@mail.gmail.com>
2013-09-01 12:59         ` Henrik Rydberg
2013-08-24 14:17 ` [PATCH 2/2] Input: bcm5974: " Ian Munsie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.