1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright 2020 Google Inc.
5 * Based on Infineon TPM driver by Peter Huewe.
7 * cr50 is a firmware for H1 secure modules that requires special
8 * handling for the I2C interface.
10 * - Use an interrupt for transaction status instead of hardcoded delays.
11 * - Must use write+wait+read read protocol.
12 * - All 4 bytes of status register must be read/written at once.
13 * - Burst count max is 63 bytes, and burst count behaves slightly differently
14 * than other I2C TPMs.
15 * - When reading from FIFO the full burstcnt must be read instead of just
16 * reading header and determining the remainder.
19 #include <linux/acpi.h>
20 #include <linux/bug.h>
21 #include <linux/completion.h>
22 #include <linux/i2c.h>
23 #include <linux/interrupt.h>
24 #include <linux/module.h>
26 #include <linux/slab.h>
27 #include <linux/wait.h>
29 #include "tpm_tis_core.h"
31 #define TPM_CR50_MAX_BUFSIZE 64
32 #define TPM_CR50_TIMEOUT_SHORT_MS 2 /* Short timeout during transactions */
33 #define TPM_CR50_TIMEOUT_NOIRQ_MS 20 /* Timeout for TPM ready without IRQ */
34 #define TPM_CR50_I2C_DID_VID 0x00281ae0L /* Device and vendor ID for Cr50 H1 */
35 #define TPM_TI50_DT_I2C_DID_VID 0x504a6666L /* Device and vendor ID for Ti50 DT */
36 #define TPM_TI50_OT_I2C_DID_VID 0x50666666L /* Device and vendor ID for TI50 OT */
37 #define TPM_CR50_I2C_MAX_RETRIES 3 /* Max retries due to I2C errors */
38 #define TPM_CR50_I2C_RETRY_DELAY_LO 55 /* Min usecs between retries on I2C */
39 #define TPM_CR50_I2C_RETRY_DELAY_HI 65 /* Max usecs between retries on I2C */
40 #define TPM_CR50_I2C_DEFAULT_LOC 0
42 #define TPM_I2C_ACCESS(l) (0x0000 | ((l) << 4))
43 #define TPM_I2C_STS(l) (0x0001 | ((l) << 4))
44 #define TPM_I2C_DATA_FIFO(l) (0x0005 | ((l) << 4))
45 #define TPM_I2C_DID_VID(l) (0x0006 | ((l) << 4))
48 * struct tpm_i2c_cr50_priv_data - Driver private data.
49 * @irq: Irq number used for this chip.
50 * If irq <= 0, then a fixed timeout is used instead of waiting for irq.
51 * @tpm_ready: Struct used by irq handler to signal R/W readiness.
52 * @buf: Buffer used for i2c writes, with i2c address prepended to content.
54 * Private driver struct used by kernel threads and interrupt context.
56 struct tpm_i2c_cr50_priv_data
{
58 struct completion tpm_ready
;
59 u8 buf
[TPM_CR50_MAX_BUFSIZE
];
63 * tpm_cr50_i2c_int_handler() - cr50 interrupt handler.
64 * @dummy: Unused parameter.
65 * @tpm_info: TPM chip information.
67 * The cr50 interrupt handler signals waiting threads that the
68 * interrupt has been asserted. It does not do any interrupt triggered
69 * processing but is instead used to avoid fixed delays.
72 * IRQ_HANDLED signifies irq was handled by this device.
74 static irqreturn_t
tpm_cr50_i2c_int_handler(int dummy
, void *tpm_info
)
76 struct tpm_chip
*chip
= tpm_info
;
77 struct tpm_i2c_cr50_priv_data
*priv
= dev_get_drvdata(&chip
->dev
);
79 complete(&priv
->tpm_ready
);
85 * tpm_cr50_i2c_wait_tpm_ready() - Wait for tpm to signal ready.
88 * Wait for completion interrupt if available, otherwise use a fixed
89 * delay for the TPM to be ready.
93 * - -errno: A POSIX error code.
95 static int tpm_cr50_i2c_wait_tpm_ready(struct tpm_chip
*chip
)
97 struct tpm_i2c_cr50_priv_data
*priv
= dev_get_drvdata(&chip
->dev
);
99 /* Use a safe fixed delay if interrupt is not supported */
100 if (priv
->irq
<= 0) {
101 msleep(TPM_CR50_TIMEOUT_NOIRQ_MS
);
105 /* Wait for interrupt to indicate TPM is ready to respond */
106 if (!wait_for_completion_timeout(&priv
->tpm_ready
, chip
->timeout_a
)) {
107 dev_warn(&chip
->dev
, "Timeout waiting for TPM ready\n");
115 * tpm_cr50_i2c_enable_tpm_irq() - Enable TPM irq.
118 static void tpm_cr50_i2c_enable_tpm_irq(struct tpm_chip
*chip
)
120 struct tpm_i2c_cr50_priv_data
*priv
= dev_get_drvdata(&chip
->dev
);
123 reinit_completion(&priv
->tpm_ready
);
124 enable_irq(priv
->irq
);
129 * tpm_cr50_i2c_disable_tpm_irq() - Disable TPM irq.
132 static void tpm_cr50_i2c_disable_tpm_irq(struct tpm_chip
*chip
)
134 struct tpm_i2c_cr50_priv_data
*priv
= dev_get_drvdata(&chip
->dev
);
137 disable_irq(priv
->irq
);
141 * tpm_cr50_i2c_transfer_message() - Transfer a message over i2c.
142 * @dev: Device information.
143 * @adapter: I2C adapter.
144 * @msg: Message to transfer.
146 * Call unlocked i2c transfer routine with the provided parameters and
147 * retry in case of bus errors.
151 * - -errno: A POSIX error code.
153 static int tpm_cr50_i2c_transfer_message(struct device
*dev
,
154 struct i2c_adapter
*adapter
,
160 for (try = 0; try < TPM_CR50_I2C_MAX_RETRIES
; try++) {
161 rc
= __i2c_transfer(adapter
, msg
, 1);
163 return 0; /* Successfully transferred the message */
165 dev_warn(dev
, "i2c transfer failed (attempt %d/%d): %d\n",
166 try + 1, TPM_CR50_I2C_MAX_RETRIES
, rc
);
167 usleep_range(TPM_CR50_I2C_RETRY_DELAY_LO
, TPM_CR50_I2C_RETRY_DELAY_HI
);
170 /* No i2c message transferred */
175 * tpm_cr50_i2c_read() - Read from TPM register.
177 * @addr: Register address to read from.
178 * @buffer: Read destination, provided by caller.
179 * @len: Number of bytes to read.
181 * Sends the register address byte to the TPM, then waits until TPM
182 * is ready via interrupt signal or timeout expiration, then 'len'
183 * bytes are read from TPM response into the provided 'buffer'.
187 * - -errno: A POSIX error code.
189 static int tpm_cr50_i2c_read(struct tpm_chip
*chip
, u8 addr
, u8
*buffer
, size_t len
)
191 struct i2c_client
*client
= to_i2c_client(chip
->dev
.parent
);
192 struct i2c_msg msg_reg_addr
= {
193 .addr
= client
->addr
,
197 struct i2c_msg msg_response
= {
198 .addr
= client
->addr
,
205 /* Prepare for completion interrupt */
206 tpm_cr50_i2c_enable_tpm_irq(chip
);
208 /* Send the register address byte to the TPM */
209 rc
= tpm_cr50_i2c_transfer_message(&chip
->dev
, client
->adapter
, &msg_reg_addr
);
213 /* Wait for TPM to be ready with response data */
214 rc
= tpm_cr50_i2c_wait_tpm_ready(chip
);
218 /* Read response data from the TPM */
219 rc
= tpm_cr50_i2c_transfer_message(&chip
->dev
, client
->adapter
, &msg_response
);
222 tpm_cr50_i2c_disable_tpm_irq(chip
);
231 * tpm_cr50_i2c_write()- Write to TPM register.
233 * @addr: Register address to write to.
234 * @buffer: Data to write.
235 * @len: Number of bytes to write.
237 * The provided address is prepended to the data in 'buffer', the
238 * combined address+data is sent to the TPM, then wait for TPM to
239 * indicate it is done writing.
243 * - -errno: A POSIX error code.
245 static int tpm_cr50_i2c_write(struct tpm_chip
*chip
, u8 addr
, u8
*buffer
,
248 struct tpm_i2c_cr50_priv_data
*priv
= dev_get_drvdata(&chip
->dev
);
249 struct i2c_client
*client
= to_i2c_client(chip
->dev
.parent
);
250 struct i2c_msg msg
= {
251 .addr
= client
->addr
,
257 if (len
> TPM_CR50_MAX_BUFSIZE
- 1)
260 /* Prepend the 'register address' to the buffer */
262 memcpy(priv
->buf
+ 1, buffer
, len
);
264 /* Prepare for completion interrupt */
265 tpm_cr50_i2c_enable_tpm_irq(chip
);
267 /* Send write request buffer with address */
268 rc
= tpm_cr50_i2c_transfer_message(&chip
->dev
, client
->adapter
, &msg
);
272 /* Wait for TPM to be ready, ignore timeout */
273 tpm_cr50_i2c_wait_tpm_ready(chip
);
276 tpm_cr50_i2c_disable_tpm_irq(chip
);
285 * tpm_cr50_check_locality() - Verify if required TPM locality is active.
287 * @loc: Locality to be verified
291 * - -errno: A POSIX error code.
293 static int tpm_cr50_check_locality(struct tpm_chip
*chip
, int loc
)
295 u8 mask
= TPM_ACCESS_VALID
| TPM_ACCESS_ACTIVE_LOCALITY
;
299 rc
= tpm_cr50_i2c_read(chip
, TPM_I2C_ACCESS(loc
), &buf
, sizeof(buf
));
303 if ((buf
& mask
) == mask
)
310 * tpm_cr50_release_locality() - Release TPM locality.
312 * @loc: Locality to be released
316 * - -errno: A POSIX error code.
318 static int tpm_cr50_release_locality(struct tpm_chip
*chip
, int loc
)
320 struct i2c_client
*client
= to_i2c_client(chip
->dev
.parent
);
321 u8 mask
= TPM_ACCESS_VALID
| TPM_ACCESS_REQUEST_PENDING
;
322 u8 addr
= TPM_I2C_ACCESS(loc
);
326 rc
= tpm_cr50_i2c_read(chip
, addr
, &buf
, sizeof(buf
));
330 if ((buf
& mask
) == mask
) {
331 buf
= TPM_ACCESS_ACTIVE_LOCALITY
;
332 rc
= tpm_cr50_i2c_write(chip
, addr
, &buf
, sizeof(buf
));
336 i2c_unlock_bus(client
->adapter
, I2C_LOCK_SEGMENT
);
341 * tpm_cr50_request_locality() - Request TPM locality.
343 * @loc: Locality to be requested.
347 * - -errno: A POSIX error code.
349 static int tpm_cr50_request_locality(struct tpm_chip
*chip
, int loc
)
351 struct i2c_client
*client
= to_i2c_client(chip
->dev
.parent
);
352 u8 buf
= TPM_ACCESS_REQUEST_USE
;
356 i2c_lock_bus(client
->adapter
, I2C_LOCK_SEGMENT
);
358 if (tpm_cr50_check_locality(chip
, loc
) == loc
)
361 rc
= tpm_cr50_i2c_write(chip
, TPM_I2C_ACCESS(loc
), &buf
, sizeof(buf
));
365 stop
= jiffies
+ chip
->timeout_a
;
367 if (tpm_cr50_check_locality(chip
, loc
) == loc
)
370 msleep(TPM_CR50_TIMEOUT_SHORT_MS
);
371 } while (time_before(jiffies
, stop
));
376 i2c_unlock_bus(client
->adapter
, I2C_LOCK_SEGMENT
);
381 * tpm_cr50_i2c_tis_status() - Read cr50 tis status.
384 * cr50 requires all 4 bytes of status register to be read.
389 static u8
tpm_cr50_i2c_tis_status(struct tpm_chip
*chip
)
393 if (tpm_cr50_i2c_read(chip
, TPM_I2C_STS(chip
->locality
), buf
, sizeof(buf
)) < 0)
400 * tpm_cr50_i2c_tis_set_ready() - Set status register to ready.
403 * cr50 requires all 4 bytes of status register to be written.
405 static void tpm_cr50_i2c_tis_set_ready(struct tpm_chip
*chip
)
407 u8 buf
[4] = { TPM_STS_COMMAND_READY
};
409 tpm_cr50_i2c_write(chip
, TPM_I2C_STS(chip
->locality
), buf
, sizeof(buf
));
410 msleep(TPM_CR50_TIMEOUT_SHORT_MS
);
414 * tpm_cr50_i2c_get_burst_and_status() - Get burst count and status.
416 * @mask: Status mask.
417 * @burst: Return value for burst.
418 * @status: Return value for status.
420 * cr50 uses bytes 3:2 of status register for burst count and
421 * all 4 bytes must be read.
425 * - -errno: A POSIX error code.
427 static int tpm_cr50_i2c_get_burst_and_status(struct tpm_chip
*chip
, u8 mask
,
428 size_t *burst
, u32
*status
)
435 /* wait for burstcount */
436 stop
= jiffies
+ chip
->timeout_b
;
439 if (tpm_cr50_i2c_read(chip
, TPM_I2C_STS(chip
->locality
), buf
, sizeof(buf
)) < 0) {
440 msleep(TPM_CR50_TIMEOUT_SHORT_MS
);
445 *burst
= le16_to_cpup((__le16
*)(buf
+ 1));
447 if ((*status
& mask
) == mask
&&
448 *burst
> 0 && *burst
<= TPM_CR50_MAX_BUFSIZE
- 1)
451 msleep(TPM_CR50_TIMEOUT_SHORT_MS
);
452 } while (time_before(jiffies
, stop
));
454 dev_err(&chip
->dev
, "Timeout reading burst and status\n");
459 * tpm_cr50_i2c_tis_recv() - TPM reception callback.
461 * @buf: Reception buffer.
462 * @buf_len: Buffer length to read.
465 * - >= 0: Number of read bytes.
466 * - -errno: A POSIX error code.
468 static int tpm_cr50_i2c_tis_recv(struct tpm_chip
*chip
, u8
*buf
, size_t buf_len
)
471 u8 mask
= TPM_STS_VALID
| TPM_STS_DATA_AVAIL
;
472 size_t burstcnt
, cur
, len
, expected
;
473 u8 addr
= TPM_I2C_DATA_FIFO(chip
->locality
);
477 if (buf_len
< TPM_HEADER_SIZE
)
480 rc
= tpm_cr50_i2c_get_burst_and_status(chip
, mask
, &burstcnt
, &status
);
484 if (burstcnt
> buf_len
|| burstcnt
< TPM_HEADER_SIZE
) {
486 "Unexpected burstcnt: %zu (max=%zu, min=%d)\n",
487 burstcnt
, buf_len
, TPM_HEADER_SIZE
);
492 /* Read first chunk of burstcnt bytes */
493 rc
= tpm_cr50_i2c_read(chip
, addr
, buf
, burstcnt
);
495 dev_err(&chip
->dev
, "Read of first chunk failed\n");
499 /* Determine expected data in the return buffer */
500 expected
= be32_to_cpup((__be32
*)(buf
+ 2));
501 if (expected
> buf_len
) {
502 dev_err(&chip
->dev
, "Buffer too small to receive i2c data\n");
507 /* Now read the rest of the data */
509 while (cur
< expected
) {
510 /* Read updated burst count and check status */
511 rc
= tpm_cr50_i2c_get_burst_and_status(chip
, mask
, &burstcnt
, &status
);
515 len
= min_t(size_t, burstcnt
, expected
- cur
);
516 rc
= tpm_cr50_i2c_read(chip
, addr
, buf
+ cur
, len
);
518 dev_err(&chip
->dev
, "Read failed\n");
525 /* Ensure TPM is done reading data */
526 rc
= tpm_cr50_i2c_get_burst_and_status(chip
, TPM_STS_VALID
, &burstcnt
, &status
);
529 if (status
& TPM_STS_DATA_AVAIL
) {
530 dev_err(&chip
->dev
, "Data still available\n");
538 /* Abort current transaction if still pending */
539 if (tpm_cr50_i2c_tis_status(chip
) & TPM_STS_COMMAND_READY
)
540 tpm_cr50_i2c_tis_set_ready(chip
);
546 * tpm_cr50_i2c_tis_send() - TPM transmission callback.
548 * @buf: Buffer to send.
549 * @len: Buffer length.
553 * - -errno: A POSIX error code.
555 static int tpm_cr50_i2c_tis_send(struct tpm_chip
*chip
, u8
*buf
, size_t len
)
557 size_t burstcnt
, limit
, sent
= 0;
558 u8 tpm_go
[4] = { TPM_STS_GO
};
563 /* Wait until TPM is ready for a command */
564 stop
= jiffies
+ chip
->timeout_b
;
565 while (!(tpm_cr50_i2c_tis_status(chip
) & TPM_STS_COMMAND_READY
)) {
566 if (time_after(jiffies
, stop
)) {
571 tpm_cr50_i2c_tis_set_ready(chip
);
575 u8 mask
= TPM_STS_VALID
;
577 /* Wait for data if this is not the first chunk */
579 mask
|= TPM_STS_DATA_EXPECT
;
581 /* Read burst count and check status */
582 rc
= tpm_cr50_i2c_get_burst_and_status(chip
, mask
, &burstcnt
, &status
);
587 * Use burstcnt - 1 to account for the address byte
588 * that is inserted by tpm_cr50_i2c_write()
590 limit
= min_t(size_t, burstcnt
- 1, len
);
591 rc
= tpm_cr50_i2c_write(chip
, TPM_I2C_DATA_FIFO(chip
->locality
),
594 dev_err(&chip
->dev
, "Write failed\n");
602 /* Ensure TPM is not expecting more data */
603 rc
= tpm_cr50_i2c_get_burst_and_status(chip
, TPM_STS_VALID
, &burstcnt
, &status
);
606 if (status
& TPM_STS_DATA_EXPECT
) {
607 dev_err(&chip
->dev
, "Data still expected\n");
612 /* Start the TPM command */
613 rc
= tpm_cr50_i2c_write(chip
, TPM_I2C_STS(chip
->locality
), tpm_go
,
616 dev_err(&chip
->dev
, "Start command failed\n");
622 /* Abort current transaction if still pending */
623 if (tpm_cr50_i2c_tis_status(chip
) & TPM_STS_COMMAND_READY
)
624 tpm_cr50_i2c_tis_set_ready(chip
);
630 * tpm_cr50_i2c_req_canceled() - Callback to notify a request cancel.
632 * @status: Status given by the cancel callback.
635 * True if command is ready, False otherwise.
637 static bool tpm_cr50_i2c_req_canceled(struct tpm_chip
*chip
, u8 status
)
639 return status
== TPM_STS_COMMAND_READY
;
642 static bool tpm_cr50_i2c_is_firmware_power_managed(struct device
*dev
)
647 /* This flag should default true when the device property is not present */
648 ret
= device_property_read_u8(dev
, "firmware-power-managed", &val
);
655 static const struct tpm_class_ops cr50_i2c
= {
656 .flags
= TPM_OPS_AUTO_STARTUP
,
657 .status
= &tpm_cr50_i2c_tis_status
,
658 .recv
= &tpm_cr50_i2c_tis_recv
,
659 .send
= &tpm_cr50_i2c_tis_send
,
660 .cancel
= &tpm_cr50_i2c_tis_set_ready
,
661 .req_complete_mask
= TPM_STS_DATA_AVAIL
| TPM_STS_VALID
,
662 .req_complete_val
= TPM_STS_DATA_AVAIL
| TPM_STS_VALID
,
663 .req_canceled
= &tpm_cr50_i2c_req_canceled
,
664 .request_locality
= &tpm_cr50_request_locality
,
665 .relinquish_locality
= &tpm_cr50_release_locality
,
669 static const struct acpi_device_id cr50_i2c_acpi_id
[] = {
673 MODULE_DEVICE_TABLE(acpi
, cr50_i2c_acpi_id
);
677 static const struct of_device_id of_cr50_i2c_match
[] = {
678 { .compatible
= "google,cr50", },
681 MODULE_DEVICE_TABLE(of
, of_cr50_i2c_match
);
685 * tpm_cr50_vid_to_name() - Maps VID to name.
686 * @vendor: Vendor identifier to map to name
689 * A valid string for the vendor or empty string
691 static const char *tpm_cr50_vid_to_name(u32 vendor
)
694 case TPM_CR50_I2C_DID_VID
:
696 case TPM_TI50_DT_I2C_DID_VID
:
698 case TPM_TI50_OT_I2C_DID_VID
:
706 * tpm_cr50_i2c_probe() - Driver probe function.
707 * @client: I2C client information.
711 * - -errno: A POSIX error code.
713 static int tpm_cr50_i2c_probe(struct i2c_client
*client
)
715 struct tpm_i2c_cr50_priv_data
*priv
;
716 struct device
*dev
= &client
->dev
;
717 struct tpm_chip
*chip
;
723 if (!i2c_check_functionality(client
->adapter
, I2C_FUNC_I2C
))
726 chip
= tpmm_chip_alloc(dev
, &cr50_i2c
);
728 return PTR_ERR(chip
);
730 priv
= devm_kzalloc(dev
, sizeof(*priv
), GFP_KERNEL
);
734 /* cr50 is a TPM 2.0 chip */
735 chip
->flags
|= TPM_CHIP_FLAG_TPM2
;
736 if (tpm_cr50_i2c_is_firmware_power_managed(dev
))
737 chip
->flags
|= TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED
;
739 /* Default timeouts */
740 chip
->timeout_a
= msecs_to_jiffies(TIS_SHORT_TIMEOUT
);
741 chip
->timeout_b
= msecs_to_jiffies(TIS_LONG_TIMEOUT
);
742 chip
->timeout_c
= msecs_to_jiffies(TIS_SHORT_TIMEOUT
);
743 chip
->timeout_d
= msecs_to_jiffies(TIS_SHORT_TIMEOUT
);
745 dev_set_drvdata(&chip
->dev
, priv
);
746 init_completion(&priv
->tpm_ready
);
748 if (client
->irq
> 0) {
749 rc
= devm_request_irq(dev
, client
->irq
, tpm_cr50_i2c_int_handler
,
750 IRQF_TRIGGER_FALLING
| IRQF_ONESHOT
|
752 dev
->driver
->name
, chip
);
754 dev_err(dev
, "Failed to probe IRQ %d\n", client
->irq
);
758 priv
->irq
= client
->irq
;
760 dev_warn(dev
, "No IRQ, will use %ums delay for TPM ready\n",
761 TPM_CR50_TIMEOUT_NOIRQ_MS
);
764 loc
= tpm_cr50_request_locality(chip
, TPM_CR50_I2C_DEFAULT_LOC
);
766 dev_err(dev
, "Could not request locality\n");
770 /* Read four bytes from DID_VID register */
771 rc
= tpm_cr50_i2c_read(chip
, TPM_I2C_DID_VID(loc
), buf
, sizeof(buf
));
773 dev_err(dev
, "Could not read vendor id\n");
774 if (tpm_cr50_release_locality(chip
, loc
))
775 dev_err(dev
, "Could not release locality\n");
779 rc
= tpm_cr50_release_locality(chip
, loc
);
781 dev_err(dev
, "Could not release locality\n");
785 vendor
= le32_to_cpup((__le32
*)buf
);
786 if (vendor
!= TPM_CR50_I2C_DID_VID
&&
787 vendor
!= TPM_TI50_DT_I2C_DID_VID
&&
788 vendor
!= TPM_TI50_OT_I2C_DID_VID
) {
789 dev_err(dev
, "Vendor ID did not match! ID was %08x\n", vendor
);
793 dev_info(dev
, "%s TPM 2.0 (i2c 0x%02x irq %d id 0x%x)\n",
794 tpm_cr50_vid_to_name(vendor
),
795 client
->addr
, client
->irq
, vendor
>> 16);
796 return tpm_chip_register(chip
);
800 * tpm_cr50_i2c_remove() - Driver remove function.
801 * @client: I2C client information.
805 * - -errno: A POSIX error code.
807 static void tpm_cr50_i2c_remove(struct i2c_client
*client
)
809 struct tpm_chip
*chip
= i2c_get_clientdata(client
);
810 struct device
*dev
= &client
->dev
;
813 dev_crit(dev
, "Could not get client data at remove, memory corruption ahead\n");
817 tpm_chip_unregister(chip
);
820 static SIMPLE_DEV_PM_OPS(cr50_i2c_pm
, tpm_pm_suspend
, tpm_pm_resume
);
822 static struct i2c_driver cr50_i2c_driver
= {
823 .probe
= tpm_cr50_i2c_probe
,
824 .remove
= tpm_cr50_i2c_remove
,
828 .acpi_match_table
= ACPI_PTR(cr50_i2c_acpi_id
),
829 .of_match_table
= of_match_ptr(of_cr50_i2c_match
),
833 module_i2c_driver(cr50_i2c_driver
);
835 MODULE_DESCRIPTION("cr50 TPM I2C Driver");
836 MODULE_LICENSE("GPL");