From: Roland Stigge <stigge@antcom.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kevin.wells@nxp.com, srinivas.bakki@nxp.com,
stern@rowland.harvard.edu, linux-arm-kernel@lists.infradead.org,
arnd@arndb.de
Subject: Re: [PATCH v5 1/3] USB: Add driver for NXP ISP1301 USB transceiver
Date: Wed, 25 Apr 2012 10:19:33 +0200 [thread overview]
Message-ID: <4F97B395.9020501@antcom.de> (raw)
In-Reply-To: <20120424232044.GA2657@kroah.com>
Hi Greg,
thanks for reviewing! I integrated all of your suggestions into the
patch update, except ...
On 04/25/2012 01:20 AM, Greg KH wrote:
> On Sat, Apr 21, 2012 at 11:57:42AM +0200, Roland Stigge wrote:
>> This very-lowlevel driver registers the NXP ISP1301 chip via the I2C subsystem.
>> The chip is the USB transceiver shared by ohci-nxp, lpc32xx_udc (gadget) and
>> isp1301_omap.
>>
>> Following patches let the respective USB host and gadget drivers use this
>> driver, instead of duplicating ISP1301 handling.
>>
>> Signed-off-by: Roland Stigge <stigge@antcom.de>
>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>>
>> include/linux/usb/isp1301.h | 84 ++++++++++++++++++++++
>
> Why this file? You have a lot of register stuff in here that should be
> in the .c file, right? Only put what other files need in this .h file,
> which shouldn't be much at all from what I can tell.
Right. At first sight, it doesn't look very elegant that the driver
exposes the ISP1301 register set to the drivers using it. I discussed
this design previously with Arnd on the mailing list and we agreed on
the following: ISP1301 is a very low level driver that primarily
separates out the I2C client registration of the ISP1301 chip (including
instantiation via DT), used by other drivers, but it's still just a kind
of helper driver for some OHCI and USB device drivers. Consider the
ISP1301 driver as a register set extension of ohci-nxp, lpc32xx-udc and
isp1301_omap, which in turn know best what to do with the low level
functionality (individual ISP1301 registers and timing, see the
different initialization strategies in those drivers). Those drivers
previously internally duplicated ISP1301 register definitions which is
solved by the new isp1301 driver.
Initially, I actually had register get/set functions defined in
isp1301.h but it turned out that those trivial wrappers around standard
i2c_smbus_*() better had been removed.
So what do you think?
Thanks in advance,
Roland
next prev parent reply other threads:[~2012-04-25 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-21 9:57 [PATCH v5 1/3] USB: Add driver for NXP ISP1301 USB transceiver Roland Stigge
2012-04-21 9:57 ` [PATCH v5 2/3] USB: gadget driver for LPC32xx Roland Stigge
2012-04-21 9:57 ` [PATCH v5 3/3] USB: ohci-nxp: Use isp1301 driver Roland Stigge
2012-04-24 23:20 ` [PATCH v5 1/3] USB: Add driver for NXP ISP1301 USB transceiver Greg KH
2012-04-25 8:19 ` Roland Stigge [this message]
2012-04-25 18:35 ` Greg KH
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=4F97B395.9020501@antcom.de \
--to=stigge@antcom.de \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kevin.wells@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=srinivas.bakki@nxp.com \
--cc=stern@rowland.harvard.edu \
/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