blob: c9a82c7e52c202dd429d0ad27683b17858c36d6d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass63b17572014-02-26 15:59:23 -07002/*
3 * Copyright (c) 2013 Google, Inc
Simon Glass63b17572014-02-26 15:59:23 -07004 */
5
6#ifndef __DM_DEMO_H
7#define __DM_DEMO_H
8
9#include <dm.h>
10
11/**
12 * struct dm_demo_pdata - configuration data for demo instance
13 *
14 * @colour: Color of the demo
15 * @sides: Numbers of sides
16 * @default_char: Default ASCII character to output (65 = 'A')
17 */
18struct dm_demo_pdata {
19 const char *colour;
20 int sides;
21 int default_char;
22};
23
24struct demo_ops {
Heiko Schocherb74fcb42014-05-22 12:43:05 +020025 int (*hello)(struct udevice *dev, int ch);
26 int (*status)(struct udevice *dev, int *status);
Simon Glass120834d2015-01-05 20:05:31 -070027 int (*set_light)(struct udevice *dev, int light);
28 int (*get_light)(struct udevice *dev);
Simon Glass63b17572014-02-26 15:59:23 -070029};
30
Heiko Schocherb74fcb42014-05-22 12:43:05 +020031int demo_hello(struct udevice *dev, int ch);
32int demo_status(struct udevice *dev, int *status);
Simon Glass120834d2015-01-05 20:05:31 -070033int demo_set_light(struct udevice *dev, int light);
34int demo_get_light(struct udevice *dev);
Simon Glass63b17572014-02-26 15:59:23 -070035int demo_list(void);
36
Heiko Schocherb74fcb42014-05-22 12:43:05 +020037int demo_parse_dt(struct udevice *dev);
Simon Glass63b17572014-02-26 15:59:23 -070038
39#endif