public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 11/16] dm: Add a demonstration/example driver
Date: Fri, 28 Jun 2013 23:46:47 +0200	[thread overview]
Message-ID: <201306282346.47659.marex@denx.de> (raw)
In-Reply-To: <1371613960-28678-12-git-send-email-sjg@chromium.org>

Dear Simon Glass,

> As an example of how to write a uclass and a driver, provide a demo version
> of each, accessible through the 'demo' command.
> 
> To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO.
> 
> The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and
> CONFIG_DM_DEMO_SHAPE.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
> Signed-off-by: Viktor K?iv?k <viktor.krivak@gmail.com>
> Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
> ---
> Changes in v3:
> - Fix up demo command help
> - Update demo driver to use device tree
> 
> Changes in v2: None

[...]

> +U_BOOT_DEVICE(demo4) = {
> +	.name = "demo_shape_drv",
> +	.platform_data = &yellow_hexagon,
> +};

So this is static instantiation of the drivers?

[...]

> +U_BOOT_DRIVER(demo_simple_drv) = {
> +	.name	= "demo_simple_drv",
> +	.of_match = demo_shape_id,
> +	.id	= UCLASS_DEMO,
> +	.probe	= demo_shape_probe,
> +	.ops	= &simple_ops,
> +	.ops	= &simple_ops,

This .ops is here twice ;-)

> +	.platform_data_auto_alloc_size = sizeof(struct dm_demo_pdata),
> +};

[...]

Best regards,
Marek Vasut

  reply	other threads:[~2013-06-28 21:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  3:52 [U-Boot] [PATCH v3 0/16] Driver model implementation, tests, demo and GPIO Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 01/16] sandbox: Make map_to_sysmem() use a constant pointer Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 02/16] sandbox: Correct data sizes and printf() strings in fdtdec.c Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 03/16] sandbox: config: Don't use 64-bit physical memory Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 04/16] sandbox: Build a device tree file for sandbox Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 05/16] Add cmd_process_error() to report and process errors Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 06/16] sandbox: config: Enable driver model Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 07/16] dm: Add base driver model support Simon Glass
2013-06-28 20:53   ` Marek Vasut
2013-10-18 16:44     ` Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 08/16] dm: Set up driver model after relocation Simon Glass
2013-06-28 20:53   ` Marek Vasut
2013-10-18 16:45     ` Simon Glass
2013-10-19  0:45       ` Marek Vasut
2013-06-19  3:52 ` [U-Boot] [PATCH v3 09/16] dm: Add basic tests Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 10/16] dm: Add a 'dm' command for testing Simon Glass
2013-06-28 20:57   ` Marek Vasut
2013-10-18 17:00     ` Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 11/16] dm: Add a demonstration/example driver Simon Glass
2013-06-28 21:46   ` Marek Vasut [this message]
2013-10-18 19:44     ` Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 12/16] dm: Add GPIO support and tests Simon Glass
2013-06-28 21:51   ` Marek Vasut
2013-10-18 19:46     ` Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 13/16] sandbox: Convert GPIOs to use driver model Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 14/16] dm: Enable gpio command to support " Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 15/16] dm: Add README for " Simon Glass
2013-06-28 21:26   ` Marek Vasut
2013-10-18 17:05     ` Simon Glass
2013-06-19  3:52 ` [U-Boot] [PATCH v3 16/16] dm: Move old driver model documentation into an 'old-docs' directory Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201306282346.47659.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox