lkml.org 
[lkml]   [2011]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9] spi: New driver for Altera SPI
On Tue, Feb 15, 2011 at 03:04:49PM +0800, Thomas Chou wrote:
> Dear Ryan,
>
> On 02/14/2011 10:20 AM, Ryan Mallon wrote:
> >On 02/14/2011 03:10 PM, Thomas Chou wrote:
> >>This patch adds a new SPI driver to support the Altera SOPC Builder
> >>SPI component. It uses the bitbanging library.
> >>
> >>Signed-off-by: Thomas Chou<thomas@wytron.com.tw>
> >>---
> >
> >>+struct altera_spi {
> >>+ /* bitbang has to be first */
> >>+ struct spi_bitbang bitbang;
> >
> >Is this still true? I had a quick look and can't see anything which
> >relies on spi_bitbang being the first entry. Things like this should be
> >using container_of so that position in the struct is irrelevant.
> >
> >~Ryan
> >
>
> Yes, sadly true. This is due to the implementation of the bitbanging
> library, spi_bitbang.c, which assumes the struct spi_bitbang is the
> first of drvdata. Though it could be changed in the future (beyond
> this little driver), every bitbanging library user has to follow
> this for now.

Should be easy to fix if it is indeed still true (I haven't dug deep
enough to find the design error yet). Anybody want to volunteer?

g.



\
 
 \ /
  Last update: 2011-02-15 20:45    [W:0.081 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site