All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmd: pwm: Remove additional pwm description
@ 2021-08-10 13:50 Michal Simek
  2021-08-12 21:46 ` Simon Glass
  2021-08-23  6:51 ` Michal Simek
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Simek @ 2021-08-10 13:50 UTC (permalink / raw)
  To: u-boot, git; +Cc: Pragnesh Patel, Simon Glass

The first name is taken from command name that's why shouldn't be listed in
help. And commands shouldn't be listed with <> which means value but value
itself is command name.
Also add description for commands to make it clear what it does.

Before
pwm pwm <invert> <pwm_dev_num> <channel> <polarity>
pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>
...

After:
pwm invert <pwm_dev_num> <channel> <polarity> - invert polarity
pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM
pwm enable <pwm_dev_num> <channel> - enable PWM output
pwm disable <pwm_dev_num> <channel> - disable PWM output

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 cmd/pwm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/cmd/pwm.c b/cmd/pwm.c
index 87d840a2b9bd..7947e61aeedb 100644
--- a/cmd/pwm.c
+++ b/cmd/pwm.c
@@ -108,7 +108,8 @@ static int do_pwm(struct cmd_tbl *cmdtp, int flag, int argc,
 
 U_BOOT_CMD(pwm, 6, 0, do_pwm,
 	   "control pwm channels",
-	   "pwm <invert> <pwm_dev_num> <channel> <polarity>\n"
-	   "pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>\n"
-	   "pwm <enable/disable> <pwm_dev_num> <channel>\n"
+	   "invert <pwm_dev_num> <channel> <polarity> - invert polarity\n"
+	   "pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM\n"
+	   "pwm enable <pwm_dev_num> <channel> - enable PWM output\n"
+	   "pwm disable <pwm_dev_num> <channel> - eisable PWM output\n"
 	   "Note: All input values are in decimal");
-- 
2.32.0


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

* Re: [PATCH] cmd: pwm: Remove additional pwm description
  2021-08-10 13:50 [PATCH] cmd: pwm: Remove additional pwm description Michal Simek
@ 2021-08-12 21:46 ` Simon Glass
  2021-08-23  6:51 ` Michal Simek
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-08-12 21:46 UTC (permalink / raw)
  To: Michal Simek; +Cc: U-Boot Mailing List, git, Pragnesh Patel

On Tue, 10 Aug 2021 at 07:50, Michal Simek <michal.simek@xilinx.com> wrote:
>
> The first name is taken from command name that's why shouldn't be listed in
> help. And commands shouldn't be listed with <> which means value but value
> itself is command name.
> Also add description for commands to make it clear what it does.
>
> Before
> pwm pwm <invert> <pwm_dev_num> <channel> <polarity>
> pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>
> ...
>
> After:
> pwm invert <pwm_dev_num> <channel> <polarity> - invert polarity
> pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM
> pwm enable <pwm_dev_num> <channel> - enable PWM output
> pwm disable <pwm_dev_num> <channel> - disable PWM output
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  cmd/pwm.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* Re: [PATCH] cmd: pwm: Remove additional pwm description
  2021-08-10 13:50 [PATCH] cmd: pwm: Remove additional pwm description Michal Simek
  2021-08-12 21:46 ` Simon Glass
@ 2021-08-23  6:51 ` Michal Simek
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2021-08-23  6:51 UTC (permalink / raw)
  To: U-Boot, git; +Cc: Pragnesh Patel, Simon Glass

út 10. 8. 2021 v 15:50 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> The first name is taken from command name that's why shouldn't be listed in
> help. And commands shouldn't be listed with <> which means value but value
> itself is command name.
> Also add description for commands to make it clear what it does.
>
> Before
> pwm pwm <invert> <pwm_dev_num> <channel> <polarity>
> pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>
> ...
>
> After:
> pwm invert <pwm_dev_num> <channel> <polarity> - invert polarity
> pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM
> pwm enable <pwm_dev_num> <channel> - enable PWM output
> pwm disable <pwm_dev_num> <channel> - disable PWM output
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  cmd/pwm.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/cmd/pwm.c b/cmd/pwm.c
> index 87d840a2b9bd..7947e61aeedb 100644
> --- a/cmd/pwm.c
> +++ b/cmd/pwm.c
> @@ -108,7 +108,8 @@ static int do_pwm(struct cmd_tbl *cmdtp, int flag, int argc,
>
>  U_BOOT_CMD(pwm, 6, 0, do_pwm,
>            "control pwm channels",
> -          "pwm <invert> <pwm_dev_num> <channel> <polarity>\n"
> -          "pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>\n"
> -          "pwm <enable/disable> <pwm_dev_num> <channel>\n"
> +          "invert <pwm_dev_num> <channel> <polarity> - invert polarity\n"
> +          "pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM\n"
> +          "pwm enable <pwm_dev_num> <channel> - enable PWM output\n"
> +          "pwm disable <pwm_dev_num> <channel> - eisable PWM output\n"
>            "Note: All input values are in decimal");
> --
> 2.32.0
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

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

end of thread, other threads:[~2021-08-23  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 13:50 [PATCH] cmd: pwm: Remove additional pwm description Michal Simek
2021-08-12 21:46 ` Simon Glass
2021-08-23  6:51 ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.