2 * Copyright (c) 2013 Google, Inc
5 * Pavel Herrmann <morpheus.ibis@gmail.com>
7 * SPDX-License-Identifier: GPL-2.0+
16 static int simple_hello(struct udevice
*dev
, int ch
)
18 const struct dm_demo_pdata
*pdata
= dev_get_platdata(dev
);
20 printf("Hello from %08x: %s %d\n", map_to_sysmem(dev
), pdata
->colour
,
26 static const struct demo_ops simple_ops
= {
27 .hello
= simple_hello
,
30 static int demo_shape_ofdata_to_platdata(struct udevice
*dev
)
32 /* Parse the data that is common with all demo devices */
33 return demo_parse_dt(dev
);
36 static const struct udevice_id demo_shape_id
[] = {
41 U_BOOT_DRIVER(demo_simple_drv
) = {
42 .name
= "demo_simple_drv",
43 .of_match
= demo_shape_id
,
45 .ofdata_to_platdata
= demo_shape_ofdata_to_platdata
,
47 .platdata_auto_alloc_size
= sizeof(struct dm_demo_pdata
),