From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/5] SPI: Put SPI devices on their own bus bus
Date: Tue, 11 Sep 2012 16:26:37 +0200 [thread overview]
Message-ID: <20120911142637.GC6180@pengutronix.de> (raw)
In-Reply-To: <20120911140349.GK31207@game.jcrosoft.org>
On Tue, Sep 11, 2012 at 04:03:49PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 15:31 Tue 11 Sep , Sascha Hauer wrote:
> > This patch adds a SPI bus on which the SPI devices and drivers register.
> > This makes it cleaner as SPI devices won't accidently end up probed by
> > a platform_device driver.
> >
> > EXPORT_SYMBOL(spi_write_then_read);
> > +
> > +static int spi_match(struct device_d *dev, struct driver_d *drv)
> > +{
> > + return strcmp(dev->name, drv->name) ? -1 : 0;
> > +}
> > +
> > +static int spi_probe(struct device_d *dev)
> > +{
> > + return dev->driver->probe(dev);
> > +}
> > +
> > +static void spi_remove(struct device_d *dev)
> > +{
> > + dev->driver->remove(dev);
> > +}
> this is code is commonon with the generix drvier can we share it?
One of the next step in this area probably is to call a device->probe
function with a struct i2c_device / struct spi_device, so I don't think
it's worth the effort now.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-09-11 14:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 13:31 [PATCH] device/driver work Sascha Hauer
2012-09-11 13:31 ` [PATCH 1/5] mfd mc13xxx: Separate I2C and SPI probe Sascha Hauer
2012-09-11 13:31 ` [PATCH 2/5] SPI: Put SPI devices on their own bus bus Sascha Hauer
2012-09-11 14:03 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-11 14:26 ` Sascha Hauer [this message]
2012-09-11 13:31 ` [PATCH 3/5] I2C: Put I2C devices on their own bus Sascha Hauer
2012-09-11 14:04 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-11 14:27 ` Sascha Hauer
2012-09-11 15:56 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-11 16:10 ` Sascha Hauer
2012-09-11 17:24 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-12 6:47 ` Sascha Hauer
2012-09-11 13:31 ` [PATCH 4/5] driver: rewrite dev_printf as a function Sascha Hauer
2012-09-11 13:31 ` [PATCH 5/5] driver: Add platform_device_id mechanism Sascha Hauer
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=20120911142637.GC6180@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.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