diff --git a/sw/host/opentitanlib/src/tpm/driver.rs b/sw/host/opentitanlib/src/tpm/driver.rs index b1d6d70dd4119..210d193225643 100644 --- a/sw/host/opentitanlib/src/tpm/driver.rs +++ b/sw/host/opentitanlib/src/tpm/driver.rs @@ -394,7 +394,7 @@ impl I2cDriver { } fn try_read_register(&self, register: Register, data: &mut [u8]) -> Result<()> { - if self.gsc_ready_pin.is_some() { + if self.gsc_ready_pin.is_none() { // Do two I2C transfers in one call, for lowest latency. self.i2c.run_transaction( None, /* default addr */ diff --git a/sw/host/opentitantool/src/command/i2c.rs b/sw/host/opentitantool/src/command/i2c.rs index 05bf564481855..663349cd7160d 100644 --- a/sw/host/opentitantool/src/command/i2c.rs +++ b/sw/host/opentitantool/src/command/i2c.rs @@ -278,7 +278,7 @@ impl CommandDispatch for I2cTpm { Some(pin) => Some((transport.gpio_pin(pin)?, transport.gpio_monitoring()?)), None => None, }; - let tpm_driver = Box::new(tpm::I2cDriver::new( + let tpm_driver: Box = Box::new(tpm::I2cDriver::new( context.params.create(transport, "TPM")?, ready_pin, )?);