summaryrefslogtreecommitdiff
path: root/drivers/platform/cznic/turris-omnia-mcu-base.c
diff options
context:
space:
mode:
authorMarek BehĂșn <kabel@kernel.org>2024-07-01 13:30:08 +0200
committerArnd Bergmann <arnd@arndb.de>2024-07-01 15:46:37 +0200
commit41bb142a4028949a0c8c505f7f4963067b0a739f (patch)
treebcc3aeca8bc9412ee6f400d166770a468313afbe /drivers/platform/cznic/turris-omnia-mcu-base.c
parentab89fb5fb92c77a9486b6769bc8681251f094c67 (diff)
platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG
Add support for true random number generator provided by the MCU. New Omnia boards come without the Atmel SHA204-A chip. Instead the crypto functionality is provided by new microcontroller, which has a TRNG peripheral. Signed-off-by: Marek BehĂșn <kabel@kernel.org> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20240701113010.16447-7-kabel@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/platform/cznic/turris-omnia-mcu-base.c')
-rw-r--r--drivers/platform/cznic/turris-omnia-mcu-base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/platform/cznic/turris-omnia-mcu-base.c b/drivers/platform/cznic/turris-omnia-mcu-base.c
index 2d8e5c9a8dd1..c68a7a84a951 100644
--- a/drivers/platform/cznic/turris-omnia-mcu-base.c
+++ b/drivers/platform/cznic/turris-omnia-mcu-base.c
@@ -381,7 +381,11 @@ static int omnia_mcu_probe(struct i2c_client *client)
if (err)
return err;
- return omnia_mcu_register_gpiochip(mcu);
+ err = omnia_mcu_register_gpiochip(mcu);
+ if (err)
+ return err;
+
+ return omnia_mcu_register_trng(mcu);
}
static const struct of_device_id of_omnia_mcu_match[] = {