blob: 7b6d0d80ff8c197e9468c9695ee4253b6e278bc7 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass39f76112014-02-26 15:59:23 -07002/*
3 * Copyright (c) 2013 Google, Inc
Simon Glass39f76112014-02-26 15:59:23 -07004 */
5
6#ifndef __DM_DEMO_H
7#define __DM_DEMO_H
8
Simon Glass39f76112014-02-26 15:59:23 -07009/**
10 * struct dm_demo_pdata - configuration data for demo instance
11 *
12 * @colour: Color of the demo
13 * @sides: Numbers of sides
14 * @default_char: Default ASCII character to output (65 = 'A')
15 */
16struct dm_demo_pdata {
17 const char *colour;
18 int sides;
19 int default_char;
20};
21
22struct demo_ops {
Heiko Schocher54c5d082014-05-22 12:43:05 +020023 int (*hello)(struct udevice *dev, int ch);
24 int (*status)(struct udevice *dev, int *status);
Simon Glassa02af4a2015-01-05 20:05:31 -070025 int (*set_light)(struct udevice *dev, int light);
26 int (*get_light)(struct udevice *dev);
Simon Glass39f76112014-02-26 15:59:23 -070027};
28
Heiko Schocher54c5d082014-05-22 12:43:05 +020029int demo_hello(struct udevice *dev, int ch);
30int demo_status(struct udevice *dev, int *status);
Simon Glassa02af4a2015-01-05 20:05:31 -070031int demo_set_light(struct udevice *dev, int light);
32int demo_get_light(struct udevice *dev);
Simon Glass39f76112014-02-26 15:59:23 -070033int demo_list(void);
34
Heiko Schocher54c5d082014-05-22 12:43:05 +020035int demo_parse_dt(struct udevice *dev);
Simon Glass39f76112014-02-26 15:59:23 -070036
37#endif