i2c: tegra: Use internal reset when reset property is not available
authorAkhil R <akhilrajeev@nvidia.com>
Thu, 10 Jul 2025 13:12:05 +0000 (18:42 +0530)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 29 Jul 2025 22:30:48 +0000 (00:30 +0200)
commit635bf3c8853359a987c5c909d424df92a0d3016a
treedf005f476826425fcdfb78a25fbd39473eb1dc0b
parentffdd20555cc6fcb15e8a57d442c458034d169c7b
i2c: tegra: Use internal reset when reset property is not available

For controllers that has an internal software reset, make the reset
property optional. This provides and option to use I2C in systems
that choose to restrict reset control from Linux or not to implement
the ACPI _RST method.

Internal reset was not required when the reset control was mandatory.
But on platforms where the resets are outside the control of Linux,
this had to be implemented by just returning success from BPMP or with
an empty _RST method in the ACPI table, basically ignoring the reset.

While the internal reset is not identical to the hard reset of the
controller, this will reset all the internal state of the controller
including FIFOs. This may slightly alter the behaviour in systems
which were ignoring the reset but it should not cause any functional
difference since all the required I2C registers are configured after
this reset, just as in boot. Considering that this sequence is hit
during the boot or during the I2C recovery path from an error, the
internal reset provides a better alternative than just ignoring the
reset.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250710131206.2316-3-akhilrajeev@nvidia.com
drivers/i2c/busses/i2c-tegra.c