display: Introduce resource-driver 57/296757/3
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 3 Aug 2023 06:07:11 +0000 (15:07 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 9 Aug 2023 07:55:00 +0000 (16:55 +0900)
Add skeleton resource-driver for the display.

Change-Id: I716c208ed55b89636d4c3ecc394d8f6938abecc6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/display/resource-display.c [new file with mode: 0644]

diff --git a/src/display/resource-display.c b/src/display/resource-display.c
new file mode 100644 (file)
index 0000000..520605a
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * deviced
+ *
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include <libsyscommon/resource-manager.h>
+#include <libsyscommon/resource-type.h>
+#include <system/syscommon-plugin-deviced-display.h>
+
+#include "shared/common.h"
+
+static const struct syscommon_resman_resource_attribute display_attrs[] = {
+};
+
+static const struct syscommon_resman_resource_driver deviced_display_driver = {
+       .name           = "display",
+       .type           = DEVICED_RESOURCE_TYPE_DISPLAY,
+       /* FIXME: It could support multiple display */
+       .flag           = SYSCOMMON_RESMAN_RESOURCE_DRIVER_FLAG_COUNT_ONLY_ONE,
+       .attrs          = display_attrs,
+       .num_attrs      = ARRAY_SIZE(display_attrs),
+};
+SYSCOMMON_RESMAN_RESOURCE_DRIVER_REGISTER(&deviced_display_driver);