ソースを参照

efDataStatistics functionDefinition.c 吉超博 commit at 2020-10-26

吉超博 4 年 前
コミット
fe6b6db360

+ 28 - 0
efDataStatistics/alarmProcessingDataCalculation/functionDefinition.c

@@ -189,3 +189,31 @@ static struct platform_device latch1_gpio_device = {
 	.resource	= latch1_resources,
 	.num_resources	= ARRAY_SIZE(latch1_resources),
 	.dev		= {
+		.platform_data	= &latch1_pdata,
+	},
+};
+
+static struct resource latch2_resources[] = {
+	[0] = {
+		.name	= "dat",
+		.start	= LATCH2_PHYS,
+		.end	= LATCH2_PHYS + (AMS_DELTA_LATCH2_NGPIO - 1) / 8,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct bgpio_pdata latch2_pdata = {
+	.base	= AMS_DELTA_LATCH2_GPIO_BASE,
+	.ngpio	= AMS_DELTA_LATCH2_NGPIO,
+};
+
+static struct platform_device latch2_gpio_device = {
+	.name		= "basic-mmio-gpio",
+	.id		= 1,
+	.resource	= latch2_resources,
+	.num_resources	= ARRAY_SIZE(latch2_resources),
+	.dev		= {
+		.platform_data	= &latch2_pdata,
+	},
+};
+