xref: /openbmc/u-boot/drivers/demo/demo-pdata.c (revision d9b23e26)
1 /*
2  * Copyright (c) 2013 Google, Inc
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <dm.h>
9 #include <dm-demo.h>
10 
11 static const struct dm_demo_pdata red_square = {
12 	.colour = "red",
13 	.sides = 4.
14 };
15 static const struct dm_demo_pdata green_triangle = {
16 	.colour = "green",
17 	.sides = 3.
18 };
19 static const struct dm_demo_pdata yellow_hexagon = {
20 	.colour = "yellow",
21 	.sides = 6.
22 };
23 
24 U_BOOT_DEVICE(demo0) = {
25 	.name = "demo_shape_drv",
26 	.platdata = &red_square,
27 };
28 
29 U_BOOT_DEVICE(demo1) = {
30 	.name = "demo_simple_drv",
31 	.platdata = &red_square,
32 };
33 
34 U_BOOT_DEVICE(demo2) = {
35 	.name = "demo_shape_drv",
36 	.platdata = &green_triangle,
37 };
38 
39 U_BOOT_DEVICE(demo3) = {
40 	.name = "demo_simple_drv",
41 	.platdata = &yellow_hexagon,
42 };
43 
44 U_BOOT_DEVICE(demo4) = {
45 	.name = "demo_shape_drv",
46 	.platdata = &yellow_hexagon,
47 };
48