summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-05 20:05:31 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:51 -0700
commita02af4aeece40e93bc7d79cd5dc912409efb7020 (patch)
tree799cf6f844e86be0164e4cc1649b62d1c9911eb5 /include
parent5d1c17e9a5803af9c65966e469437735ac29659e (diff)
downloadu-boot-imx-a02af4aeece40e93bc7d79cd5dc912409efb7020.zip
u-boot-imx-a02af4aeece40e93bc7d79cd5dc912409efb7020.tar.gz
u-boot-imx-a02af4aeece40e93bc7d79cd5dc912409efb7020.tar.bz2
dm: demo: Add a simple GPIO demonstration
Add a new 'demo light' command which uses GPIOs to control imaginary lights. Each light is assigned a bit number in the overall value. This provides an example driver for using the new GPIO API. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/dm-demo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm-demo.h b/include/dm-demo.h
index a24fec6..03722d0 100644
--- a/include/dm-demo.h
+++ b/include/dm-demo.h
@@ -25,10 +25,14 @@ struct dm_demo_pdata {
struct demo_ops {
int (*hello)(struct udevice *dev, int ch);
int (*status)(struct udevice *dev, int *status);
+ int (*set_light)(struct udevice *dev, int light);
+ int (*get_light)(struct udevice *dev);
};
int demo_hello(struct udevice *dev, int ch);
int demo_status(struct udevice *dev, int *status);
+int demo_set_light(struct udevice *dev, int light);
+int demo_get_light(struct udevice *dev);
int demo_list(void);
int demo_parse_dt(struct udevice *dev);