From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] introduce spi command
Date: Fri, 2 Nov 2012 17:45:31 +0100 [thread overview]
Message-ID: <20121102164531.GT29599@game.jcrosoft.org> (raw)
In-Reply-To: <1351873560.417163578@f213.mail.ru>
On 20:26 Fri 02 Nov , Alexander Shiyan wrote:
> Fri, 2 Nov 2012 17:17:40 +0100 от Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> > usefull to debug spi
> >
> > The command allow to read/write on a spi device
> >
> > Usage: spi [OPTION] [data to write 0xXX]
> > write/read spi device.
> > -b <bus_num> spi bus number (default = 0)
> > -r <count> to read
> > -c <cs> chip select (default = 0)
> > -m <mode> spi mode (default = 0)
> > -f <hz> max_speed_hz (default = 1MHz)
> > -w <bit> bits_per_word (default = 8)
> > -v verbose
> ...
> > +static int do_spi(int argc, char *argv[])
> > +{
> > + struct spi_device spi;
> > + int bus = 0;
> > + int read = 0;
> > + int verbose = 0;
> > + int opt, count, i, ret;
> > +
> > + u8 *tx_buf, *rx_buf;
> > +
> > + memset(&spi, 0, sizeof(struct spi_device));
> > +
> > + spi.max_speed_hz = 1 * 1000 * 1000;
> > + spi.bits_per_word = 8;
>
> I suggest using the default data from master for these parameters.
no otherwise we can not write the help and bits_et_word it's default value at
spi framework level is 8
and thh max_speed_hz is slow already
and it has always been the device to control it no the master
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-11-02 16:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 16:06 [PATCH 0/2] add " Jean-Christophe PLAGNIOL-VILLARD
2012-11-02 16:17 ` [PATCH 1/2] spi: introduce spi_get_master Jean-Christophe PLAGNIOL-VILLARD
2012-11-02 16:17 ` [PATCH 2/2] introduce spi command Jean-Christophe PLAGNIOL-VILLARD
2012-11-02 16:26 ` Alexander Shiyan
2012-11-02 16:45 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-11-03 21:39 ` Sascha Hauer
2012-11-02 19:01 ` [PATCH 0/2] add " Sascha Hauer
2012-11-03 7:36 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-04 8:54 [PATCH 0/2 v2] " Jean-Christophe PLAGNIOL-VILLARD
2012-11-04 8:59 ` [PATCH 1/2] spi: introduce spi_get_master Jean-Christophe PLAGNIOL-VILLARD
2012-11-04 8:59 ` [PATCH 2/2] introduce spi command Jean-Christophe PLAGNIOL-VILLARD
2012-11-05 9:29 [PATCH 0/2 v3] add " Jean-Christophe PLAGNIOL-VILLARD
2012-11-05 9:36 ` [PATCH 1/2] spi: introduce spi_get_master Jean-Christophe PLAGNIOL-VILLARD
2012-11-05 9:36 ` [PATCH 2/2] introduce spi command Jean-Christophe PLAGNIOL-VILLARD
2012-11-05 18:21 [PATCH 0/2 v4] add " Jean-Christophe PLAGNIOL-VILLARD
2012-11-05 18:30 ` [PATCH 1/2] spi: introduce spi_get_master Jean-Christophe PLAGNIOL-VILLARD
2012-11-05 18:30 ` [PATCH 2/2] introduce spi command Jean-Christophe PLAGNIOL-VILLARD
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=20121102164531.GT29599@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=shc_work@mail.ru \
/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