tkey: Allow using the selected TKey from luks

Export the function which sets the current TKey so that the luks command
can work with 'tkey connect'.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-27 07:03:32 -07:00
parent 96761bb6d0
commit 6873d2bf79
2 changed files with 8 additions and 1 deletions

View File

@@ -22,7 +22,7 @@
/* Static device pointer set by tkey connect command */
static struct udevice *tkey_dev;
static struct udevice *tkey_get_device(void)
struct udevice *tkey_get_device(void)
{
struct udevice *dev;
int ret;

View File

@@ -327,4 +327,11 @@ int tkey_emul_set_app_mode_for_test(struct udevice *dev, bool app_mode);
*/
int tkey_emul_set_connected_for_test(struct udevice *dev, bool connected);
/**
* tkey_get_device() - Get the current TKey device
*
* Return: Pointer to TKey device, or NULL if not found
*/
struct udevice *tkey_get_device(void);
#endif /* _TKEY_UCLASS_H */