summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-02-21 07:43:45 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-21 07:43:45 +0100
commitb83407415e5a2d28a7876b936f1c682d62a0372a (patch)
treef5f9dd201feec42f7527f9f069aef56eca8c6aa2 /include/linux
parent9fd550e388e2181a6cb9abe9ba06ae25897902fd (diff)
parent7eedf79ba92912455954ec178822f0a03e9c28e3 (diff)
downloadbarebox-b83407415e5a2d28a7876b936f1c682d62a0372a.tar.gz
barebox-b83407415e5a2d28a7876b936f1c682d62a0372a.tar.xz
Merge branch 'for-next/imx'
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sys_soc.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/linux/sys_soc.h b/include/linux/sys_soc.h
new file mode 100644
index 0000000000..fd597ae540
--- /dev/null
+++ b/include/linux/sys_soc.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) ST-Ericsson SA 2011
+ * Author: Lee Jones <lee.jones@linaro.org> for ST-Ericsson.
+ */
+#ifndef __SOC_BUS_H
+#define __SOC_BUS_H
+
+#include <linux/device.h>
+
+struct soc_device_attribute {
+ const char *machine;
+ const char *family;
+ const char *revision;
+ const char *serial_number;
+ const char *soc_id;
+ const void *data;
+};
+
+/**
+ * soc_device_register - register SoC as a device
+ * @soc_plat_dev_attr: Attributes passed from platform to be attributed to a SoC
+ */
+struct soc_device *soc_device_register(
+ struct soc_device_attribute *soc_plat_dev_attr);
+
+/**
+ * soc_device_unregister - unregister SoC device
+ * @dev: SoC device to be unregistered
+ */
+void soc_device_unregister(struct soc_device *soc_dev);
+
+/**
+ * soc_device_to_device - helper function to fetch struct device
+ * @soc: Previously registered SoC device container
+ */
+struct device *soc_device_to_device(struct soc_device *soc);
+
+#endif /* __SOC_BUS_H */