public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands
@ 2018-11-28 23:39 Boris Brezillon
  2018-11-28 23:39 ` [U-Boot] [PATCH v2 1/6] common: command: Fix command auto-completion Boris Brezillon
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Boris Brezillon @ 2018-11-28 23:39 UTC (permalink / raw)
  To: u-boot

Hello,

Here is the 2nd version of the sub-cmd patchset. This version
simplifies the sub-cmd declaration syntax and allows per
sub-cmd maxargs and repeatable check.

I also added a patch showing how simple it is to convert an existing
command to this infrastructure. I converting a bunch of other cmds [1]
but I keep that for later, as I don't want to scare reviewers with a
20+ patch series.

Regards,

Boris

[1]https://github.com/bbrezillon/u-boot/commits/sub-cmds

Changes since v1:
- Drop a few params in the subcmd macro def
- Get repeatable and maxargs info from the subcmd instead of the main
  one
- Convert the adc command

Boris Brezillon (6):
  common: command: Fix command auto-completion
  common: command: Expose a generic helper to auto-complete sub commands
  common: command: Rework the 'cmd is repeatable' logic
  command: commands: Add macros to declare commands with subcmds
  cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands
  cmd: adc: Use the sub-command infrastructure

 cmd/adc.c         |  31 +--
 cmd/dtimg.c       |   2 +-
 cmd/help.c        |   2 +-
 cmd/mmc.c         |   4 +-
 cmd/mtd.c         | 476 +++++++++++++++++++++++++++-------------------
 common/command.c  |  68 ++++++-
 include/command.h | 133 ++++++++++++-
 7 files changed, 476 insertions(+), 240 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-11-29 15:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-28 23:39 [U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands Boris Brezillon
2018-11-28 23:39 ` [U-Boot] [PATCH v2 1/6] common: command: Fix command auto-completion Boris Brezillon
2018-11-29 14:19   ` Tom Rini
2018-11-28 23:39 ` [U-Boot] [PATCH v2 2/6] common: command: Expose a generic helper to auto-complete sub commands Boris Brezillon
2018-11-29 14:19   ` Tom Rini
2018-11-29 15:16   ` Boris Brezillon
2018-11-28 23:39 ` [U-Boot] [PATCH v2 3/6] common: command: Rework the 'cmd is repeatable' logic Boris Brezillon
2018-11-29 14:19   ` Tom Rini
2018-11-28 23:39 ` [U-Boot] [PATCH v2 4/6] command: commands: Add macros to declare commands with subcmds Boris Brezillon
2018-11-29 14:20   ` Tom Rini
2018-11-29 15:22   ` Boris Brezillon
2018-11-28 23:39 ` [U-Boot] [PATCH v2 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands Boris Brezillon
2018-11-29 14:21   ` Tom Rini
2018-11-28 23:39 ` [U-Boot] [PATCH v2 6/6] cmd: adc: Use the sub-command infrastructure Boris Brezillon
2018-11-29 14:21   ` Tom Rini
2018-11-29 15:26 ` [U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox