[PATCH] cmd: Add a pwm command

Simon Glass sjg at chromium.org
Tue Nov 24 17:53:58 CET 2020


Hi,

On Tue, 24 Nov 2020 at 06:23, Tom Rini <trini at konsulko.com> wrote:
>
> On Tue, Nov 24, 2020 at 12:41:34PM +0000, Pragnesh Patel wrote:
> >
> >
> > >-----Original Message-----
> > >From: Tom Rini <trini at konsulko.com>
> > >Sent: 23 November 2020 21:22
> > >To: Pragnesh Patel <pragnesh.patel at openfive.com>
> > >Cc: u-boot at lists.denx.de; atish.patra at wdc.com; palmerdabbelt at google.com;
> > >bmeng.cn at gmail.com; Paul Walmsley ( Sifive) <paul.walmsley at sifive.com>;
> > >anup.patel at wdc.com; Sagar Kadam <sagar.kadam at openfive.com>;
> > >rick at andestech.com; Simon Glass <sjg at chromium.org>; Heinrich Schuchardt
> > ><xypron.glpk at gmx.de>; Bin Meng <bin.meng at windriver.com>; Miquel Raynal
> > ><miquel.raynal at bootlin.com>; Patrick Delaunay <patrick.delaunay at st.com>;
> > >Sam Protsenko <joe.skb7 at gmail.com>; Philippe Reynes
> > ><philippe.reynes at softathome.com>; Frédéric Danis
> > ><frederic.danis at collabora.com>; Patrice Chotard <patrice.chotard at st.com>;
> > >Vladimir Olovyannikov <vladimir.olovyannikov at broadcom.com>; Ramon Fried
> > ><rfried.dev at gmail.com>; Eugeniu Rosca <roscaeugeniu at gmail.com>
> > >Subject: Re: [PATCH] cmd: Add a pwm command
> > >
> > >On Mon, Nov 23, 2020 at 01:38:41PM +0530, Pragnesh Patel wrote:
> > >
> > >> Add the command "pwm" for controlling the pwm channels. This command
> > >> provides pwm invert/config/enable/disable functionalities via PWM
> > >> uclass drivers
> > >>
> > >> Signed-off-by: Pragnesh Patel <pragnesh.patel at sifive.com>
> > >> ---
> > >>  cmd/Kconfig  |   6 +++
> > >>  cmd/Makefile |   1 +
> > >>  cmd/pwm.c    | 119
> > >+++++++++++++++++++++++++++++++++++++++++++++++++++
> > >>  3 files changed, 126 insertions(+)
> > >>  create mode 100644 cmd/pwm.c
> > >
> > >Can you please add some tests and dt fragments to sandbox for this?
> >
> > There is already a "test/dm/pwm.c".
>
> Right, but for the new command as well please, similar to
> test/py/tests/test_gpio.py.

I would be happier with a C test like [1] as it is faster and allows
debugging, etc.

Regards,
Simon

[1] test/cmd/mem_search.c


More information about the U-Boot mailing list