@@ -4,6 +4,12 @@
menu "Multifunction device drivers"
+config DM_MISC
+ bool "Enable Driver Model for Misc drivers"
+ depends on DM
+ help
+ Enable driver model for miscellaneous devices.
+
config CMD_CROS_EC
bool "Enable crosec command"
depends on CROS_EC
@@ -5,6 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
+obj-$(CONFIG_DM_MISC) += misc-uclass.o
obj-$(CONFIG_ALI152X) += ali512x.o
obj-$(CONFIG_DS4510) += ds4510.o
obj-$(CONFIG_CBMEM_CONSOLE) += cbmem_console.o
new file mode 100644
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <misc.h>
+
+UCLASS_DRIVER(misc) = {
+ .id = UCLASS_MISC,
+ .name = "misc",
+};
@@ -39,6 +39,7 @@ enum uclass_id {
UCLASS_LED, /* Light-emitting diode (LED) */
UCLASS_LPC, /* x86 'low pin count' interface */
UCLASS_MASS_STORAGE, /* Mass storage device */
+ UCLASS_MISC, /* Miscellaneous device */
UCLASS_MMC, /* SD / MMC card or chip */
UCLASS_MOD_EXP, /* RSA Mod Exp device */
UCLASS_PCH, /* x86 platform controller hub */
Implement a Miscellaneous uclass with generic read or write operations. This class is used only for those do not fit other more general classes. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> --- drivers/misc/Kconfig | 6 ++++++ drivers/misc/Makefile | 1 + drivers/misc/misc-uclass.c | 14 ++++++++++++++ include/dm/uclass-id.h | 1 + 4 files changed, 22 insertions(+) create mode 100644 drivers/misc/misc-uclass.c