Lines Matching +full:uuid +full:- +full:dev
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * wm831x-otp.c -- OTP for Wolfson WM831x PMICs
41 static ssize_t unique_id_show(struct device *dev, in unique_id_show() argument
44 struct wm831x *wm831x = dev_get_drvdata(dev); in unique_id_show()
59 char uuid[WM831X_UNIQUE_ID_LEN]; in wm831x_otp_init() local
62 ret = device_create_file(wm831x->dev, &dev_attr_unique_id); in wm831x_otp_init()
64 dev_err(wm831x->dev, "Unique ID attribute not created: %d\n", in wm831x_otp_init()
67 ret = wm831x_unique_id_read(wm831x, uuid); in wm831x_otp_init()
69 add_device_randomness(uuid, sizeof(uuid)); in wm831x_otp_init()
71 dev_err(wm831x->dev, "Failed to read UUID: %d\n", ret); in wm831x_otp_init()
78 device_remove_file(wm831x->dev, &dev_attr_unique_id); in wm831x_otp_exit()