mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: stephen@streetfiresound.com
Cc: eemike@gmail.com, Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH/RFC] simple SPI controller on PXA2xx SSP port, refresh
Date: Sat, 5 Nov 2005 12:58:30 -0800	[thread overview]
Message-ID: <200511051258.30539.david-b@pacbell.net> (raw)
In-Reply-To: <1131157728.426.113.camel@localhost.localdomain>

On Friday 04 November 2005 6:28 pm, Stephen Street wrote:
> My understanding also.  Let's at least do the renames.

Consider it done.

I'll leave "controller_data" in board_info and spi_device too.
You're right ... plus, we need to let that be separate from the
controller platform_data for hotplugging usage, spi_new_device()
and such.


> Occupying some spare cycles is the idea that what we really need is the
> ability to sub-class spi_device and spi_master via structure embedding.
> This would be in the spirit of the 2.6 driver model and would map to the
> platform_device model better.  

Not really.  "Struture embedding" is used more by bus infrastruture than
by driver infrastructure ... and even there, it's more often done by
sharing storage.  And spi_master supports that usage:

	/* at the top of probe(dev) */
        struct spi_master       *master;
        struct MYSOC_DATA       *data;

        master = spi_alloc_master(dev, sizeof *data);
        if (!master)
                return -ENODEV;

        data = class_get_devdata(&master->cdev);

That's because spi_master is a class view of the underlying "dev",
used to access the controller hardware.  (Likely a platform_device
created as part of board setup.)

A difference for normal spi_device nodes is that the drivers you'd
presumably want to "subclass" spi_device isn't responsible for
creating the device note.  It might however create a class device
node, and that could end up looking much like that spi_master snippet.

- Dave


  reply	other threads:[~2005-11-05 20:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-04  0:15 David Brownell
2005-11-04 18:52 ` Stephen Street
2005-11-04 20:16   ` David Brownell
2005-11-04 23:38     ` Stephen Street
2005-11-05  0:54       ` David Brownell
2005-11-05  2:28         ` Stephen Street
2005-11-05 20:58           ` David Brownell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-25 23:48 stephen
2005-10-27 11:33 ` Mike Lee
2005-10-27 16:41   ` Stephen Street
2005-10-29 18:25     ` Mike Lee
2005-11-01 18:35       ` Stephen Street
2005-11-03  9:37         ` Mike Lee
2005-11-04 18:11           ` Stephen Street
2005-11-04 20:36             ` Mark Underwood
2005-11-07 20:43               ` Mark Underwood

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=200511051258.30539.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=eemike@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephen@streetfiresound.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®