[lkml]   [2012]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] USB: gadget driver for LPC32xx
Hi Arnd,

On 03/20/2012 02:01 PM, Arnd Bergmann wrote:
>> Maybe the right thing is a common low-level isp1301 interface defining
>> all the registers and providing low-level (I2C) access functions,
>> leaving all the "higher level"/"board specific" functions up to the
>> existing drivers?
>> (I guess you meant drivers/usb/otg/isp1301_omap.c ?)
> Yes, that sounds like a very good idea. Can you describe which part of
> the function isp1301 does? It's not clear how the layering between
> that and the platform driver should end up.

The ISP1301 is a relatively simple transceiver where the actual
differential USB signals end up being generated/decoded. It contains
some registers and is controlled via I2C to manipulate electrical
settings (pull up / power etc.).

At a first glance, I found the following drivers to be using it:

ohci-nxp (was: ohci-pnx4008 + ohci-lpc32xx)
lpc32xx_udc (WIP)

The common functions that all of them are using are some low-level
functions like read/write byte, read/write word. (For ohci-nxp, I used
smbus commands.) I propose exporting just the defines for all the
registers and their bits together with some accessor functions.

Would those be the correct places for header and driver:



As an example usage, I would let the next update of the lpc32xx_udc use
it and separately provide patches to make the other drivers above also
use it.

Thanks in advance,


 \ /
  Last update: 2012-03-20 19:23    [W:0.041 / U:3.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site