Simon Glass | 39f7611 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 Google, Inc |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __DM_DEMO_H |
| 8 | #define __DM_DEMO_H |
| 9 | |
| 10 | #include <dm.h> |
| 11 | |
| 12 | /** |
| 13 | * struct dm_demo_pdata - configuration data for demo instance |
| 14 | * |
| 15 | * @colour: Color of the demo |
| 16 | * @sides: Numbers of sides |
| 17 | * @default_char: Default ASCII character to output (65 = 'A') |
| 18 | */ |
| 19 | struct dm_demo_pdata { |
| 20 | const char *colour; |
| 21 | int sides; |
| 22 | int default_char; |
| 23 | }; |
| 24 | |
| 25 | struct demo_ops { |
Heiko Schocher | 54c5d08 | 2014-05-22 12:43:05 +0200 | [diff] [blame] | 26 | int (*hello)(struct udevice *dev, int ch); |
| 27 | int (*status)(struct udevice *dev, int *status); |
Simon Glass | a02af4a | 2015-01-05 20:05:31 -0700 | [diff] [blame] | 28 | int (*set_light)(struct udevice *dev, int light); |
| 29 | int (*get_light)(struct udevice *dev); |
Simon Glass | 39f7611 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
Heiko Schocher | 54c5d08 | 2014-05-22 12:43:05 +0200 | [diff] [blame] | 32 | int demo_hello(struct udevice *dev, int ch); |
| 33 | int demo_status(struct udevice *dev, int *status); |
Simon Glass | a02af4a | 2015-01-05 20:05:31 -0700 | [diff] [blame] | 34 | int demo_set_light(struct udevice *dev, int light); |
| 35 | int demo_get_light(struct udevice *dev); |
Simon Glass | 39f7611 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 36 | int demo_list(void); |
| 37 | |
Heiko Schocher | 54c5d08 | 2014-05-22 12:43:05 +0200 | [diff] [blame] | 38 | int demo_parse_dt(struct udevice *dev); |
Simon Glass | 39f7611 | 2014-02-26 15:59:23 -0700 | [diff] [blame] | 39 | |
| 40 | #endif |