All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next 03/11] mei: bus: Initial implementation for I/O routines
Date: Mon, 11 Feb 2013 17:12:48 +0100	[thread overview]
Message-ID: <1684430.yK4oBgpgAE@wuerfel> (raw)
In-Reply-To: <20130211154812.GU20996@sortiz-mobl>

On Monday 11 February 2013 16:48:12 Samuel Ortiz wrote:
> 
> > If so, how do you know which transport to use?
> Through the mei_bus_client ops. Device drivers get a mei_bus_client pointer
> from their probe routine and the ops pointers there (If any) are set by
> whoever creates the device. In the NFC case mei/nfc.c does that and implements
> the NFC specific transport code for this technology. mei/nfc.c is also the
> part of the code that actually adds the device to the bus.

Ok.

> So when a device driver wants e.g. to send its payload through the MEI bus, it
> calls mei_bus_send() which takes the device driver mei_bus client pointer as
> its first argument.
> Then the payload may go through mei_bus_client->send() first which will eventually
> physically sent the newly built frame through mei_send(). Some ME blocks don't require any
> additional transport layer and in that case the device driver payload will go
> straight to mei_send() since the mei_bus_client ops will be NULL.
> 
> Does that make more sense now ?

Yes, so it's not actually as complicated as I thought, because
the operations are already known by the bus driver (in the
normal sense of that word, meaning the driver that creates
the device not the one driving it) at the time when the device is
created.

In that case, please ignore my original comment and put the
struct mei_bus_ops (mei_transport_ops?) back, ideally as a
"const" member of the struct mei_bus_device (to be called
mei_device then), so you can declare the structure statically
and constant in the driver that has the functions.

	Arnd

  reply	other threads:[~2013-02-11 16:12 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 21:03 [char-misc-next 00/11] Add MEI BUS and NFC Device Tomas Winkler
2013-02-07 21:03 ` [char-misc-next 01/11] mei: bus: Initial MEI bus type implementation Tomas Winkler
2013-02-07 22:29   ` Arnd Bergmann
2013-02-07 22:41   ` Arnd Bergmann
2013-02-07 22:59     ` Samuel Ortiz
2013-02-07 23:07       ` Winkler, Tomas
2013-02-07 21:03 ` [char-misc-next 02/11] mei: bus: Implement driver registration Tomas Winkler
2013-02-07 22:30   ` Arnd Bergmann
2013-02-07 21:03 ` [char-misc-next 03/11] mei: bus: Initial implementation for I/O routines Tomas Winkler
2013-02-07 22:34   ` Arnd Bergmann
2013-02-07 22:55     ` Samuel Ortiz
2013-02-11 11:52       ` Arnd Bergmann
2013-02-11 12:58         ` Samuel Ortiz
2013-02-11 15:08           ` Arnd Bergmann
2013-02-11 15:48             ` Samuel Ortiz
2013-02-11 16:12               ` Arnd Bergmann [this message]
2013-02-07 21:03 ` [char-misc-next 04/11] mei: bus: Add bus related structures to mei_cl Tomas Winkler
2013-02-07 21:03 ` [char-misc-next 05/11] mei: bus: Call bus routines from the core code Tomas Winkler
2013-02-07 22:37   ` Arnd Bergmann
2013-02-07 22:57     ` Winkler, Tomas
2013-02-07 23:09       ` Arnd Bergmann
2013-02-07 22:57     ` Samuel Ortiz
2013-02-07 21:03 ` [char-misc-next 06/11] mei: bus: Synchronous API for the data transmission Tomas Winkler
2013-02-07 21:03 ` [char-misc-next 07/11] mei: bus: Implement bus driver data setter/getter Tomas Winkler
2013-02-07 22:38   ` Arnd Bergmann
2013-02-07 22:58     ` Samuel Ortiz
2013-02-07 23:57       ` Samuel Ortiz
2013-02-11 14:58         ` Arnd Bergmann
2013-02-11 15:29           ` Samuel Ortiz
2013-02-11 16:03             ` Greg KH
2013-02-11 16:05               ` Samuel Ortiz
2013-02-07 21:03 ` [char-misc-next 08/11] mei: nfc: Initial nfc implementation Tomas Winkler
2013-02-07 22:26   ` Arnd Bergmann
2013-02-07 22:41     ` Samuel Ortiz
2013-02-07 21:03 ` [char-misc-next 09/11] mei: nfc: Connect also the regular ME client Tomas Winkler
2013-02-07 21:03 ` [char-misc-next 10/11] mei: nfc: Add NFC device to the MEI bus Tomas Winkler
2013-02-07 21:03 ` [char-misc-next 11/11] mei: nfc: Implement MEI bus IO ops Tomas Winkler

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=1684430.yK4oBgpgAE@wuerfel \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=tomas.winkler@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.