1. 30 10月, 2020 17 次提交
  2. 29 10月, 2020 20 次提交
  3. 28 10月, 2020 3 次提交
    • P
      test: mux-cmd: Add tests for the 'mux' command · 15995ac3
      Pratyush Yadav 提交于
      Tests tests run the three mux subcommands: list, select, and deselect,
      and verify that the commands do what we expect.
      Signed-off-by: NPratyush Yadav <p.yadav@ti.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      15995ac3
    • P
      cmd: Add a mux command · 05115abe
      Pratyush Yadav 提交于
      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: NPratyush Yadav <p.yadav@ti.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      05115abe
    • J
      test: Add tests for the multiplexer framework · 739592cc
      Jean-Jacques Hiblot 提交于
      Provide tests to check the behavior of the multiplexer framework.
      
      Two sets of tests are added. One is using an emulated multiplexer driver
      that can be used to test basic functionality like select, deselect, etc.
      The other is using the mmio mux which adds tests specific to it.
      Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
      Signed-off-by: NPratyush Yadav <p.yadav@ti.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      739592cc