linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] added API: spi_message_compile/optimize/hint/...
Date: Wed, 20 Nov 2013 16:24:49 +0000	[thread overview]
Message-ID: <20131120162449.GJ2674@sirena.org.uk> (raw)
In-Reply-To: <05C64EF6-0F3B-4CBC-A462-45ED8F1564A7-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]

On Wed, Nov 20, 2013 at 04:27:06PM +0100, Martin Sperl wrote:

> As mentioned before I will take the opportunity to move the flags into
> spi_transfer for optimization hints, because there is where the change 
> really happens...

These are set by the caller?

> The current bits come to my mind:
> #define SPI_OPTIMIZE_FIXED_TX_BUF	(1<<0)
> #define SPI_OPTIMIZE_FIXED_TX_DMA	((1<<1)|(1<<0))
> #define SPI_OPTIMIZE_FIXED_RX_BUF	(1<<2)
> #define SPI_OPTIMIZE_FIXED_RX_DMA	((1<<3)|(1<<2))
> #define SPI_OPTIMIZE_FIXED_LEN		(1<<4)
> #define SPI_OPTIMIZE_FIXED_DELAY	(1<<5)
> #define SPI_OPTIMIZE_FIXED_SPEED	(1<<6)
> #define SPI_OPTIMIZE_FIXED_BITS		(1<<7)
> #define SPI_OPTIMIZE_FIXED_ALL		(-1)

> The flags argument now is of type gfp_t to allow for memory allocation
> policies.

I'd be tempted to start with assuming everything is fixed and then add
flags to mark things as variable rather than the other way around since
that's the most conservative option and should permit the greatest level
of optimisation.

> I will provide the patches as soon as I have pulled your tree - only
> problem is that I can not really compile it on this tree on my RPI...

You should at least be able to do build tests, it's OK if you can't do
runtime tests - I can do validation myself, as can other people working
with -next.

> Each of those unfortunately would require a separate create/free function
> to populate the caches. So generalizing this into spi_master would blow up
> this structure... But then these cache structures would need to sit 
> somewhere anyway, so adding them to the master would need to happen
> one way or another... But then maybe there are different ideas for something
> like this (but I assume a driver making use of this would be required first)

Yes, there's some tricky issues here...  let's have a think about it and
try to do this incrementally.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-11-20 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 18:33 [PATCH] added API: spi_message_compile/optimize/hint/ Martin Sperl
     [not found] ` <0C7D5B1E-E561-4F52-BEA8-572EB0CA26A6-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2013-11-19 19:25   ` Mark Brown
2013-11-20  9:11   ` martin sperl
2013-11-20 11:29   ` Mark Brown
     [not found]     ` <20131120112920.GX2674-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-20 15:27       ` Martin Sperl
     [not found]         ` <05C64EF6-0F3B-4CBC-A462-45ED8F1564A7-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2013-11-20 16:24           ` Mark Brown [this message]
     [not found]             ` <20131120162449.GJ2674-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-20 18:42               ` Martin Sperl
     [not found]                 ` <9DE09AF6-AD13-45DE-A36F-BD65E619C342-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2013-11-21 19:10                   ` Mark Brown
     [not found]                     ` <20131121191004.GH8120-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-22  6:53                       ` Martin Sperl

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=20131120162449.GJ2674@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).