gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / hid / hid-mcp2221.c
blobd958475f8c81b725b83d5477cd281a4fd1055f4c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * MCP2221A - Microchip USB to I2C Host Protocol Bridge
5 * Copyright (c) 2020, Rishi Gupta <gupt21@gmail.com>
7 * Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/20005565B.pdf
8 */
10 #include <linux/module.h>
11 #include <linux/err.h>
12 #include <linux/mutex.h>
13 #include <linux/completion.h>
14 #include <linux/delay.h>
15 #include <linux/hid.h>
16 #include <linux/hidraw.h>
17 #include <linux/i2c.h>
18 #include "hid-ids.h"
20 /* Commands codes in a raw output report */
21 enum {
22 MCP2221_I2C_WR_DATA = 0x90,
23 MCP2221_I2C_WR_NO_STOP = 0x94,
24 MCP2221_I2C_RD_DATA = 0x91,
25 MCP2221_I2C_RD_RPT_START = 0x93,
26 MCP2221_I2C_GET_DATA = 0x40,
27 MCP2221_I2C_PARAM_OR_STATUS = 0x10,
28 MCP2221_I2C_SET_SPEED = 0x20,
29 MCP2221_I2C_CANCEL = 0x10,
32 /* Response codes in a raw input report */
33 enum {
34 MCP2221_SUCCESS = 0x00,
35 MCP2221_I2C_ENG_BUSY = 0x01,
36 MCP2221_I2C_START_TOUT = 0x12,
37 MCP2221_I2C_STOP_TOUT = 0x62,
38 MCP2221_I2C_WRADDRL_TOUT = 0x23,
39 MCP2221_I2C_WRDATA_TOUT = 0x44,
40 MCP2221_I2C_WRADDRL_NACK = 0x25,
41 MCP2221_I2C_MASK_ADDR_NACK = 0x40,
42 MCP2221_I2C_WRADDRL_SEND = 0x21,
43 MCP2221_I2C_ADDR_NACK = 0x25,
44 MCP2221_I2C_READ_COMPL = 0x55,
48 * There is no way to distinguish responses. Therefore next command
49 * is sent only after response to previous has been received. Mutex
50 * lock is used for this purpose mainly.
52 struct mcp2221 {
53 struct hid_device *hdev;
54 struct i2c_adapter adapter;
55 struct mutex lock;
56 struct completion wait_in_report;
57 u8 *rxbuf;
58 u8 txbuf[64];
59 int rxbuf_idx;
60 int status;
61 u8 cur_i2c_clk_div;
65 * Default i2c bus clock frequency 400 kHz. Modify this if you
66 * want to set some other frequency (min 50 kHz - max 400 kHz).
68 static uint i2c_clk_freq = 400;
70 /* Synchronously send output report to the device */
71 static int mcp_send_report(struct mcp2221 *mcp,
72 u8 *out_report, size_t len)
74 u8 *buf;
75 int ret;
77 buf = kmemdup(out_report, len, GFP_KERNEL);
78 if (!buf)
79 return -ENOMEM;
81 /* mcp2221 uses interrupt endpoint for out reports */
82 ret = hid_hw_output_report(mcp->hdev, buf, len);
83 kfree(buf);
85 if (ret < 0)
86 return ret;
87 return 0;
91 * Send o/p report to the device and wait for i/p report to be
92 * received from the device. If the device does not respond,
93 * we timeout.
95 static int mcp_send_data_req_status(struct mcp2221 *mcp,
96 u8 *out_report, int len)
98 int ret;
99 unsigned long t;
101 reinit_completion(&mcp->wait_in_report);
103 ret = mcp_send_report(mcp, out_report, len);
104 if (ret)
105 return ret;
107 t = wait_for_completion_timeout(&mcp->wait_in_report,
108 msecs_to_jiffies(4000));
109 if (!t)
110 return -ETIMEDOUT;
112 return mcp->status;
115 /* Check pass/fail for actual communication with i2c slave */
116 static int mcp_chk_last_cmd_status(struct mcp2221 *mcp)
118 memset(mcp->txbuf, 0, 8);
119 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
121 return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
124 /* Cancels last command releasing i2c bus just in case occupied */
125 static int mcp_cancel_last_cmd(struct mcp2221 *mcp)
127 memset(mcp->txbuf, 0, 8);
128 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
129 mcp->txbuf[2] = MCP2221_I2C_CANCEL;
131 return mcp_send_data_req_status(mcp, mcp->txbuf, 8);
134 static int mcp_set_i2c_speed(struct mcp2221 *mcp)
136 int ret;
138 memset(mcp->txbuf, 0, 8);
139 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS;
140 mcp->txbuf[3] = MCP2221_I2C_SET_SPEED;
141 mcp->txbuf[4] = mcp->cur_i2c_clk_div;
143 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 8);
144 if (ret) {
145 /* Small delay is needed here */
146 usleep_range(980, 1000);
147 mcp_cancel_last_cmd(mcp);
150 return 0;
154 * An output report can contain minimum 1 and maximum 60 user data
155 * bytes. If the number of data bytes is more then 60, we send it
156 * in chunks of 60 bytes. Last chunk may contain exactly 60 or less
157 * bytes. Total number of bytes is informed in very first report to
158 * mcp2221, from that point onwards it first collect all the data
159 * from host and then send to i2c slave device.
161 static int mcp_i2c_write(struct mcp2221 *mcp,
162 struct i2c_msg *msg, int type, u8 last_status)
164 int ret, len, idx, sent;
166 idx = 0;
167 sent = 0;
168 if (msg->len < 60)
169 len = msg->len;
170 else
171 len = 60;
173 do {
174 mcp->txbuf[0] = type;
175 mcp->txbuf[1] = msg->len & 0xff;
176 mcp->txbuf[2] = msg->len >> 8;
177 mcp->txbuf[3] = (u8)(msg->addr << 1);
179 memcpy(&mcp->txbuf[4], &msg->buf[idx], len);
181 ret = mcp_send_data_req_status(mcp, mcp->txbuf, len + 4);
182 if (ret)
183 return ret;
185 usleep_range(980, 1000);
187 if (last_status) {
188 ret = mcp_chk_last_cmd_status(mcp);
189 if (ret)
190 return ret;
193 sent = sent + len;
194 if (sent >= msg->len)
195 break;
197 idx = idx + len;
198 if ((msg->len - sent) < 60)
199 len = msg->len - sent;
200 else
201 len = 60;
204 * Testing shows delay is needed between successive writes
205 * otherwise next write fails on first-try from i2c core.
206 * This value is obtained through automated stress testing.
208 usleep_range(980, 1000);
209 } while (len > 0);
211 return ret;
215 * Device reads all data (0 - 65535 bytes) from i2c slave device and
216 * stores it in device itself. This data is read back from device to
217 * host in multiples of 60 bytes using input reports.
219 static int mcp_i2c_smbus_read(struct mcp2221 *mcp,
220 struct i2c_msg *msg, int type, u16 smbus_addr,
221 u8 smbus_len, u8 *smbus_buf)
223 int ret;
224 u16 total_len;
226 mcp->txbuf[0] = type;
227 if (msg) {
228 mcp->txbuf[1] = msg->len & 0xff;
229 mcp->txbuf[2] = msg->len >> 8;
230 mcp->txbuf[3] = (u8)(msg->addr << 1);
231 total_len = msg->len;
232 mcp->rxbuf = msg->buf;
233 } else {
234 mcp->txbuf[1] = smbus_len;
235 mcp->txbuf[2] = 0;
236 mcp->txbuf[3] = (u8)(smbus_addr << 1);
237 total_len = smbus_len;
238 mcp->rxbuf = smbus_buf;
241 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 4);
242 if (ret)
243 return ret;
245 mcp->rxbuf_idx = 0;
247 do {
248 memset(mcp->txbuf, 0, 4);
249 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
251 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
252 if (ret)
253 return ret;
255 ret = mcp_chk_last_cmd_status(mcp);
256 if (ret)
257 return ret;
259 usleep_range(980, 1000);
260 } while (mcp->rxbuf_idx < total_len);
262 return ret;
265 static int mcp_i2c_xfer(struct i2c_adapter *adapter,
266 struct i2c_msg msgs[], int num)
268 int ret;
269 struct mcp2221 *mcp = i2c_get_adapdata(adapter);
271 hid_hw_power(mcp->hdev, PM_HINT_FULLON);
273 mutex_lock(&mcp->lock);
275 /* Setting speed before every transaction is required for mcp2221 */
276 ret = mcp_set_i2c_speed(mcp);
277 if (ret)
278 goto exit;
280 if (num == 1) {
281 if (msgs->flags & I2C_M_RD) {
282 ret = mcp_i2c_smbus_read(mcp, msgs, MCP2221_I2C_RD_DATA,
283 0, 0, NULL);
284 } else {
285 ret = mcp_i2c_write(mcp, msgs, MCP2221_I2C_WR_DATA, 1);
287 if (ret)
288 goto exit;
289 ret = num;
290 } else if (num == 2) {
291 /* Ex transaction; send reg address and read its contents */
292 if (msgs[0].addr == msgs[1].addr &&
293 !(msgs[0].flags & I2C_M_RD) &&
294 (msgs[1].flags & I2C_M_RD)) {
296 ret = mcp_i2c_write(mcp, &msgs[0],
297 MCP2221_I2C_WR_NO_STOP, 0);
298 if (ret)
299 goto exit;
301 ret = mcp_i2c_smbus_read(mcp, &msgs[1],
302 MCP2221_I2C_RD_RPT_START,
303 0, 0, NULL);
304 if (ret)
305 goto exit;
306 ret = num;
307 } else {
308 dev_err(&adapter->dev,
309 "unsupported multi-msg i2c transaction\n");
310 ret = -EOPNOTSUPP;
312 } else {
313 dev_err(&adapter->dev,
314 "unsupported multi-msg i2c transaction\n");
315 ret = -EOPNOTSUPP;
318 exit:
319 hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
320 mutex_unlock(&mcp->lock);
321 return ret;
324 static int mcp_smbus_write(struct mcp2221 *mcp, u16 addr,
325 u8 command, u8 *buf, u8 len, int type,
326 u8 last_status)
328 int data_len, ret;
330 mcp->txbuf[0] = type;
331 mcp->txbuf[1] = len + 1; /* 1 is due to command byte itself */
332 mcp->txbuf[2] = 0;
333 mcp->txbuf[3] = (u8)(addr << 1);
334 mcp->txbuf[4] = command;
336 switch (len) {
337 case 0:
338 data_len = 5;
339 break;
340 case 1:
341 mcp->txbuf[5] = buf[0];
342 data_len = 6;
343 break;
344 case 2:
345 mcp->txbuf[5] = buf[0];
346 mcp->txbuf[6] = buf[1];
347 data_len = 7;
348 break;
349 default:
350 memcpy(&mcp->txbuf[5], buf, len);
351 data_len = len + 5;
354 ret = mcp_send_data_req_status(mcp, mcp->txbuf, data_len);
355 if (ret)
356 return ret;
358 if (last_status) {
359 usleep_range(980, 1000);
361 ret = mcp_chk_last_cmd_status(mcp);
362 if (ret)
363 return ret;
366 return ret;
369 static int mcp_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
370 unsigned short flags, char read_write,
371 u8 command, int size,
372 union i2c_smbus_data *data)
374 int ret;
375 struct mcp2221 *mcp = i2c_get_adapdata(adapter);
377 hid_hw_power(mcp->hdev, PM_HINT_FULLON);
379 mutex_lock(&mcp->lock);
381 ret = mcp_set_i2c_speed(mcp);
382 if (ret)
383 goto exit;
385 switch (size) {
387 case I2C_SMBUS_QUICK:
388 if (read_write == I2C_SMBUS_READ)
389 ret = mcp_i2c_smbus_read(mcp, NULL, MCP2221_I2C_RD_DATA,
390 addr, 0, &data->byte);
391 else
392 ret = mcp_smbus_write(mcp, addr, command, NULL,
393 0, MCP2221_I2C_WR_DATA, 1);
394 break;
395 case I2C_SMBUS_BYTE:
396 if (read_write == I2C_SMBUS_READ)
397 ret = mcp_i2c_smbus_read(mcp, NULL, MCP2221_I2C_RD_DATA,
398 addr, 1, &data->byte);
399 else
400 ret = mcp_smbus_write(mcp, addr, command, NULL,
401 0, MCP2221_I2C_WR_DATA, 1);
402 break;
403 case I2C_SMBUS_BYTE_DATA:
404 if (read_write == I2C_SMBUS_READ) {
405 ret = mcp_smbus_write(mcp, addr, command, NULL,
406 0, MCP2221_I2C_WR_NO_STOP, 0);
407 if (ret)
408 goto exit;
410 ret = mcp_i2c_smbus_read(mcp, NULL,
411 MCP2221_I2C_RD_RPT_START,
412 addr, 1, &data->byte);
413 } else {
414 ret = mcp_smbus_write(mcp, addr, command, &data->byte,
415 1, MCP2221_I2C_WR_DATA, 1);
417 break;
418 case I2C_SMBUS_WORD_DATA:
419 if (read_write == I2C_SMBUS_READ) {
420 ret = mcp_smbus_write(mcp, addr, command, NULL,
421 0, MCP2221_I2C_WR_NO_STOP, 0);
422 if (ret)
423 goto exit;
425 ret = mcp_i2c_smbus_read(mcp, NULL,
426 MCP2221_I2C_RD_RPT_START,
427 addr, 2, (u8 *)&data->word);
428 } else {
429 ret = mcp_smbus_write(mcp, addr, command,
430 (u8 *)&data->word, 2,
431 MCP2221_I2C_WR_DATA, 1);
433 break;
434 case I2C_SMBUS_BLOCK_DATA:
435 if (read_write == I2C_SMBUS_READ) {
436 ret = mcp_smbus_write(mcp, addr, command, NULL,
437 0, MCP2221_I2C_WR_NO_STOP, 1);
438 if (ret)
439 goto exit;
441 mcp->rxbuf_idx = 0;
442 mcp->rxbuf = data->block;
443 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
444 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
445 if (ret)
446 goto exit;
447 } else {
448 if (!data->block[0]) {
449 ret = -EINVAL;
450 goto exit;
452 ret = mcp_smbus_write(mcp, addr, command, data->block,
453 data->block[0] + 1,
454 MCP2221_I2C_WR_DATA, 1);
456 break;
457 case I2C_SMBUS_I2C_BLOCK_DATA:
458 if (read_write == I2C_SMBUS_READ) {
459 ret = mcp_smbus_write(mcp, addr, command, NULL,
460 0, MCP2221_I2C_WR_NO_STOP, 1);
461 if (ret)
462 goto exit;
464 mcp->rxbuf_idx = 0;
465 mcp->rxbuf = data->block;
466 mcp->txbuf[0] = MCP2221_I2C_GET_DATA;
467 ret = mcp_send_data_req_status(mcp, mcp->txbuf, 1);
468 if (ret)
469 goto exit;
470 } else {
471 if (!data->block[0]) {
472 ret = -EINVAL;
473 goto exit;
475 ret = mcp_smbus_write(mcp, addr, command,
476 &data->block[1], data->block[0],
477 MCP2221_I2C_WR_DATA, 1);
479 break;
480 case I2C_SMBUS_PROC_CALL:
481 ret = mcp_smbus_write(mcp, addr, command,
482 (u8 *)&data->word,
483 2, MCP2221_I2C_WR_NO_STOP, 0);
484 if (ret)
485 goto exit;
487 ret = mcp_i2c_smbus_read(mcp, NULL,
488 MCP2221_I2C_RD_RPT_START,
489 addr, 2, (u8 *)&data->word);
490 break;
491 case I2C_SMBUS_BLOCK_PROC_CALL:
492 ret = mcp_smbus_write(mcp, addr, command, data->block,
493 data->block[0] + 1,
494 MCP2221_I2C_WR_NO_STOP, 0);
495 if (ret)
496 goto exit;
498 ret = mcp_i2c_smbus_read(mcp, NULL,
499 MCP2221_I2C_RD_RPT_START,
500 addr, I2C_SMBUS_BLOCK_MAX,
501 data->block);
502 break;
503 default:
504 dev_err(&mcp->adapter.dev,
505 "unsupported smbus transaction size:%d\n", size);
506 ret = -EOPNOTSUPP;
509 exit:
510 hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
511 mutex_unlock(&mcp->lock);
512 return ret;
515 static u32 mcp_i2c_func(struct i2c_adapter *adapter)
517 return I2C_FUNC_I2C |
518 I2C_FUNC_SMBUS_READ_BLOCK_DATA |
519 I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
520 (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_PEC);
523 static const struct i2c_algorithm mcp_i2c_algo = {
524 .master_xfer = mcp_i2c_xfer,
525 .smbus_xfer = mcp_smbus_xfer,
526 .functionality = mcp_i2c_func,
529 /* Gives current state of i2c engine inside mcp2221 */
530 static int mcp_get_i2c_eng_state(struct mcp2221 *mcp,
531 u8 *data, u8 idx)
533 int ret;
535 switch (data[idx]) {
536 case MCP2221_I2C_WRADDRL_NACK:
537 case MCP2221_I2C_WRADDRL_SEND:
538 ret = -ENXIO;
539 break;
540 case MCP2221_I2C_START_TOUT:
541 case MCP2221_I2C_STOP_TOUT:
542 case MCP2221_I2C_WRADDRL_TOUT:
543 case MCP2221_I2C_WRDATA_TOUT:
544 ret = -ETIMEDOUT;
545 break;
546 case MCP2221_I2C_ENG_BUSY:
547 ret = -EAGAIN;
548 break;
549 case MCP2221_SUCCESS:
550 ret = 0x00;
551 break;
552 default:
553 ret = -EIO;
556 return ret;
560 * MCP2221 uses interrupt endpoint for input reports. This function
561 * is called by HID layer when it receives i/p report from mcp2221,
562 * which is actually a response to the previously sent command.
564 * MCP2221A firmware specific return codes are parsed and 0 or
565 * appropriate negative error code is returned. Delayed response
566 * results in timeout error and stray reponses results in -EIO.
568 static int mcp2221_raw_event(struct hid_device *hdev,
569 struct hid_report *report, u8 *data, int size)
571 u8 *buf;
572 struct mcp2221 *mcp = hid_get_drvdata(hdev);
574 switch (data[0]) {
576 case MCP2221_I2C_WR_DATA:
577 case MCP2221_I2C_WR_NO_STOP:
578 case MCP2221_I2C_RD_DATA:
579 case MCP2221_I2C_RD_RPT_START:
580 switch (data[1]) {
581 case MCP2221_SUCCESS:
582 mcp->status = 0;
583 break;
584 default:
585 mcp->status = mcp_get_i2c_eng_state(mcp, data, 2);
587 complete(&mcp->wait_in_report);
588 break;
590 case MCP2221_I2C_PARAM_OR_STATUS:
591 switch (data[1]) {
592 case MCP2221_SUCCESS:
593 if ((mcp->txbuf[3] == MCP2221_I2C_SET_SPEED) &&
594 (data[3] != MCP2221_I2C_SET_SPEED)) {
595 mcp->status = -EAGAIN;
596 break;
598 if (data[20] & MCP2221_I2C_MASK_ADDR_NACK) {
599 mcp->status = -ENXIO;
600 break;
602 mcp->status = mcp_get_i2c_eng_state(mcp, data, 8);
603 break;
604 default:
605 mcp->status = -EIO;
607 complete(&mcp->wait_in_report);
608 break;
610 case MCP2221_I2C_GET_DATA:
611 switch (data[1]) {
612 case MCP2221_SUCCESS:
613 if (data[2] == MCP2221_I2C_ADDR_NACK) {
614 mcp->status = -ENXIO;
615 break;
617 if (!mcp_get_i2c_eng_state(mcp, data, 2)
618 && (data[3] == 0)) {
619 mcp->status = 0;
620 break;
622 if (data[3] == 127) {
623 mcp->status = -EIO;
624 break;
626 if (data[2] == MCP2221_I2C_READ_COMPL) {
627 buf = mcp->rxbuf;
628 memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
629 mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
630 mcp->status = 0;
631 break;
633 mcp->status = -EIO;
634 break;
635 default:
636 mcp->status = -EIO;
638 complete(&mcp->wait_in_report);
639 break;
641 default:
642 mcp->status = -EIO;
643 complete(&mcp->wait_in_report);
646 return 1;
649 static int mcp2221_probe(struct hid_device *hdev,
650 const struct hid_device_id *id)
652 int ret;
653 struct mcp2221 *mcp;
655 mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
656 if (!mcp)
657 return -ENOMEM;
659 ret = hid_parse(hdev);
660 if (ret) {
661 hid_err(hdev, "can't parse reports\n");
662 return ret;
665 ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
666 if (ret) {
667 hid_err(hdev, "can't start hardware\n");
668 return ret;
671 ret = hid_hw_open(hdev);
672 if (ret) {
673 hid_err(hdev, "can't open device\n");
674 goto err_hstop;
677 mutex_init(&mcp->lock);
678 init_completion(&mcp->wait_in_report);
679 hid_set_drvdata(hdev, mcp);
680 mcp->hdev = hdev;
682 /* Set I2C bus clock diviser */
683 if (i2c_clk_freq > 400)
684 i2c_clk_freq = 400;
685 if (i2c_clk_freq < 50)
686 i2c_clk_freq = 50;
687 mcp->cur_i2c_clk_div = (12000000 / (i2c_clk_freq * 1000)) - 3;
689 mcp->adapter.owner = THIS_MODULE;
690 mcp->adapter.class = I2C_CLASS_HWMON;
691 mcp->adapter.algo = &mcp_i2c_algo;
692 mcp->adapter.retries = 1;
693 mcp->adapter.dev.parent = &hdev->dev;
694 snprintf(mcp->adapter.name, sizeof(mcp->adapter.name),
695 "MCP2221 usb-i2c bridge on hidraw%d",
696 ((struct hidraw *)hdev->hidraw)->minor);
698 ret = i2c_add_adapter(&mcp->adapter);
699 if (ret) {
700 hid_err(hdev, "can't add usb-i2c adapter: %d\n", ret);
701 goto err_i2c;
703 i2c_set_adapdata(&mcp->adapter, mcp);
705 return 0;
707 err_i2c:
708 hid_hw_close(mcp->hdev);
709 err_hstop:
710 hid_hw_stop(mcp->hdev);
711 return ret;
714 static void mcp2221_remove(struct hid_device *hdev)
716 struct mcp2221 *mcp = hid_get_drvdata(hdev);
718 i2c_del_adapter(&mcp->adapter);
719 hid_hw_close(mcp->hdev);
720 hid_hw_stop(mcp->hdev);
723 static const struct hid_device_id mcp2221_devices[] = {
724 { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_MCP2221) },
727 MODULE_DEVICE_TABLE(hid, mcp2221_devices);
729 static struct hid_driver mcp2221_driver = {
730 .name = "mcp2221",
731 .id_table = mcp2221_devices,
732 .probe = mcp2221_probe,
733 .remove = mcp2221_remove,
734 .raw_event = mcp2221_raw_event,
737 /* Register with HID core */
738 module_hid_driver(mcp2221_driver);
740 MODULE_AUTHOR("Rishi Gupta <gupt21@gmail.com>");
741 MODULE_DESCRIPTION("MCP2221 Microchip HID USB to I2C master bridge");
742 MODULE_LICENSE("GPL v2");