lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEktqcv3NEZKmxBdCjf29JbSbFfTzZB9p0yXF+btVrNYO5XU4w@mail.gmail.com>
Date:   Sun, 21 May 2023 13:35:23 +0200
From:   Börge Strümpfel <boerge.struempfel@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     bstruempfel@...ratronik.de, festevam@...il.com,
        amit.kumar-mahapatra@....com, broonie@...nel.org,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        NXP Linux Team <linux-imx@....com>,
        linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 4/4] spi: spidev_test Add three missing spi mode bits

Am So., 21. Mai 2023 um 11:00 Uhr schrieb Andy Shevchenko
<andy.shevchenko@...il.com>:
>
> On Sat, May 20, 2023 at 10:09 PM Boerge Struempfel
> <boerge.struempfel@...il.com> wrote:
> >
> > Added the three missing spi mode bits SPI_3WIRE_HIZ, SPI_RX_CPHA_FLIP,
> > and SPI_MOSI_IDLE_LOW. Due to the length of the new options, the
> > indentation of the options in the help message was also adjusted for all
> > other options.
>
> Actually since you are touching all of them in the user-visible
> output, you may also reshuffle them to be grouped logically. I'm not
> sure if the switch-case ordering would be nice to have shuffled as
> well. If so, in this case it might be better to have it as a
> preparatory patch before you adding new options (and hence take care
> of indentation in the first patch). That said, just think about it,
> I'm not insisting.
>

Thanks for the suggestion. I tried coming up with a logical way of
ordering, but I am having some difficulties deciding. What do you
think of the following order?

general device settings
" -D --device device to use (default /dev/spidev1.1)\n"
" -s --speed max speed (Hz)\n"
" -d --delay delay (usec)\n"
" -l --loop loopback\n"

spi mode
" -H --cpha clock phase\n"
" -O --cpol clock polarity\n"
" -F --rx-cpha-flip flip CPHA on Rx only xfer\n"

number of wires for transmission
" -2 --dual dual transfer\n"
" -4 --quad quad transfer\n"
" -8 --octal octal transfer\n"
" -3 --3wire SI/SO signals shared\n"
" -Z --3wire-hiz high impedance turnaround\n"

additional parameters
" -b --bpw bits per word\n"
" -L --lsb least significant bit first\n"
" -C --cs-high chip select active high\n"
" -N --no-cs no chip select\n"
" -R --ready slave pulls low to pause\n"
" -M --mosi-idle-low leave mosi line low when idle\n"

data
" -i --input input data from a file (e.g. \"test.bin\")\n"
" -o --output output data to a file (e.g. \"results.bin\")\n"
" -p Send data (e.g. \"1234\\xde\\xad\")\n"
" -S --size transfer size\n"
" -I --iter iterations\n");

misc
" -v --verbose Verbose (show tx buffer)\n"

--
Kind regards,
Börge Strümpfel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ