Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2013 Google, Inc |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 6 | #include <dm.h> |
| 7 | #include <dm-demo.h> |
| 8 | |
| 9 | static const struct dm_demo_pdata red_square = { |
| 10 | .colour = "red", |
| 11 | .sides = 4. |
| 12 | }; |
| 13 | static const struct dm_demo_pdata green_triangle = { |
| 14 | .colour = "green", |
| 15 | .sides = 3. |
| 16 | }; |
| 17 | static const struct dm_demo_pdata yellow_hexagon = { |
| 18 | .colour = "yellow", |
| 19 | .sides = 6. |
| 20 | }; |
| 21 | |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 22 | U_BOOT_DRVINFO(demo0) = { |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 23 | .name = "demo_shape_drv", |
Simon Glass | 71fa5b4 | 2020-12-03 16:55:18 -0700 | [diff] [blame] | 24 | .plat = &red_square, |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 25 | }; |
| 26 | |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 27 | U_BOOT_DRVINFO(demo1) = { |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 28 | .name = "demo_simple_drv", |
Simon Glass | 71fa5b4 | 2020-12-03 16:55:18 -0700 | [diff] [blame] | 29 | .plat = &red_square, |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 32 | U_BOOT_DRVINFO(demo2) = { |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 33 | .name = "demo_shape_drv", |
Simon Glass | 71fa5b4 | 2020-12-03 16:55:18 -0700 | [diff] [blame] | 34 | .plat = &green_triangle, |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 37 | U_BOOT_DRVINFO(demo3) = { |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 38 | .name = "demo_simple_drv", |
Simon Glass | 71fa5b4 | 2020-12-03 16:55:18 -0700 | [diff] [blame] | 39 | .plat = &yellow_hexagon, |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 40 | }; |
| 41 | |
Simon Glass | 1d8364a | 2020-12-28 20:34:54 -0700 | [diff] [blame] | 42 | U_BOOT_DRVINFO(demo4) = { |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 43 | .name = "demo_shape_drv", |
Simon Glass | 71fa5b4 | 2020-12-03 16:55:18 -0700 | [diff] [blame] | 44 | .plat = &yellow_hexagon, |
Simon Glass | 63b1757 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 45 | }; |