From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v4 6/7] cmd: Add a mux command
Date: Wed, 28 Oct 2020 14:50:55 -0400 [thread overview]
Message-ID: <20201028185055.GS5340@bill-the-cat> (raw)
In-Reply-To: <20201016104636.14138-7-p.yadav@ti.com>
On Fri, Oct 16, 2020 at 04:16:35PM +0530, Pratyush Yadav wrote:
> This command lets the user list, select, and deselect mux controllers
> introduced with the mux framework on the fly. It has 3 subcommands:
> list, select, and deselect.
>
> List: Lists all the mux present on the system. The muxes are listed for
> each chip. The chip is identified by its device name. Each chip can have
> a number of mux controllers. Each is listed in sequence and is assigned
> a sequential ID based on its position in the mux chip. It lists details
> like ID, whether the mux is currently selected or not, the current
> state, the idle state, and the number of states.
>
> A sample output would look something like:
>
> => mux list
> a-mux-controller:
> ID Selected Current State Idle State Num States
> 0 no unknown as-is 0x4
> 1 no 0x2 0x2 0x10
> 2 no 0x73 0x73 0x100
>
> another-mux-controller:
> ID Selected Current State Idle State Num States
> 0 no 0x1 0x1 0x4
> 1 no 0x2 0x2 0x4
>
> Select: Selects a given mux and puts it in the specified state. This
> subcommand takes 3 arguments: mux chip, mux ID, state to set
> the mux in. The arguments mux chip and mux ID are used to identify which
> mux needs to be selected, and then it is selected to the given state.
> The mux needs to be deselected before it can be selected again in
> another state. The state should be a hexadecimal number.
>
> For example:
> => mux list
> a-mux-controller:
> ID Selected Current State Idle State Num States
> 0 no 0x1 0x1 0x4
> 1 no 0x1 0x1 0x4
> => mux select a-mux-controller 0 0x3
> => mux list
> a-mux-controller:
> ID Selected Current State Idle State Num States
> 0 yes 0x3 0x1 0x4
> 1 no 0x1 0x1 0x4
>
> Deselect: Deselects a given mux and puts it in its idle state. This
> subcommand takes 2 arguments: the mux chip and mux ID to identify which
> mux needs to be deselected. So in the above example, we can deselect mux
> 0 using:
>
> => mux deselect a-mux-controller 0
> => mux list
> a-mux-controller:
> ID Selected Current State Idle State Num States
> 0 no 0x1 0x1 0x4
> 1 no 0x1 0x1 0x4
>
> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201028/08ca1586/attachment.sig>
next prev parent reply other threads:[~2020-10-28 18:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 10:46 [PATCH v4 0/7] drivers: Add a framework for MUX drivers Pratyush Yadav
2020-10-16 10:46 ` [PATCH v4 1/7] drivers: Add a new framework for multiplexer devices Pratyush Yadav
2020-10-28 18:50 ` Tom Rini
2020-10-16 10:46 ` [PATCH v4 2/7] dm: board: complete the initialization of the muxes in initr_dm() Pratyush Yadav
2020-10-28 18:50 ` Tom Rini
2020-10-16 10:46 ` [PATCH v4 3/7] drivers: mux: mmio-based syscon mux controller Pratyush Yadav
2020-10-28 18:50 ` Tom Rini
2020-10-16 10:46 ` [PATCH v4 4/7] Kconfig: Increase the pre-relocation memory Pratyush Yadav
2020-10-27 4:52 ` Simon Glass
2020-10-28 18:50 ` Tom Rini
2020-10-16 10:46 ` [PATCH v4 5/7] test: Add tests for the multiplexer framework Pratyush Yadav
2020-10-27 4:52 ` Simon Glass
2020-10-28 18:50 ` Tom Rini
2020-10-16 10:46 ` [PATCH v4 6/7] cmd: Add a mux command Pratyush Yadav
2020-10-27 4:52 ` Simon Glass
2020-10-28 18:50 ` Tom Rini [this message]
2020-10-16 10:46 ` [PATCH v4 7/7] test: mux-cmd: Add tests for the 'mux' command Pratyush Yadav
2020-10-27 4:52 ` Simon Glass
2020-10-28 18:51 ` Tom Rini
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=20201028185055.GS5340@bill-the-cat \
--to=trini@konsulko.com \
--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