diff options
Diffstat (limited to 'drivers/hid/hid-elo.c')
-rw-r--r-- | drivers/hid/hid-elo.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c index f042a6cf8b18..4e49462870ab 100644 --- a/drivers/hid/hid-elo.c +++ b/drivers/hid/hid-elo.c | |||
@@ -181,7 +181,40 @@ fail: | |||
181 | */ | 181 | */ |
182 | static bool elo_broken_firmware(struct usb_device *dev) | 182 | static bool elo_broken_firmware(struct usb_device *dev) |
183 | { | 183 | { |
184 | return use_fw_quirk && le16_to_cpu(dev->descriptor.bcdDevice) == 0x10d; | 184 | struct usb_device *hub = dev->parent; |
185 | struct usb_device *child = NULL; | ||
186 | u16 fw_lvl = le16_to_cpu(dev->descriptor.bcdDevice); | ||
187 | u16 child_vid, child_pid; | ||
188 | int i; | ||
189 | |||
190 | if (!use_fw_quirk) | ||
191 | return false; | ||
192 | if (fw_lvl != 0x10d) | ||
193 | return false; | ||
194 | |||
195 | /* iterate sibling devices of the touch controller */ | ||
196 | usb_hub_for_each_child(hub, i, child) { | ||
197 | child_vid = le16_to_cpu(child->descriptor.idVendor); | ||
198 | child_pid = le16_to_cpu(child->descriptor.idProduct); | ||
199 | |||
200 | /* | ||
201 | * If one of the devices below is present attached as a sibling of | ||
202 | * the touch controller then this is a newer IBM 4820 monitor that | ||
203 | * does not need the IBM-requested workaround if fw level is | ||
204 | * 0x010d - aka 'M'. | ||
205 | * No other HW can have this combination. | ||
206 | */ | ||
207 | if (child_vid==0x04b3) { | ||
208 | switch (child_pid) { | ||
209 | case 0x4676: /* 4820 21x Video */ | ||
210 | case 0x4677: /* 4820 51x Video */ | ||
211 | case 0x4678: /* 4820 2Lx Video */ | ||
212 | case 0x4679: /* 4820 5Lx Video */ | ||
213 | return false; | ||
214 | } | ||
215 | } | ||
216 | } | ||
217 | return true; | ||
185 | } | 218 | } |
186 | 219 | ||
187 | static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id) | 220 | static int elo_probe(struct hid_device *hdev, const struct hid_device_id *id) |