From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nm29-vm0.bullet.mail.ne1.yahoo.com ([98.138.91.43]:22508 "HELO nm29-vm0.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750947Ab0K1GaN (ORCPT ); Sun, 28 Nov 2010 01:30:13 -0500 Subject: Re: [PATCH v2] USB: Add MSM USB Device Controller driver From: David Brownell In-Reply-To: <4CF10EF0.4010309@codeaurora.org> References: <20101110021259.GA16558@codeaurora.org> <320241.1412.qm@web180311.mail.gq1.yahoo.com> <4CE6B0E0.2030900@parrot.com> <4CF10EF0.4010309@codeaurora.org> Content-Type: text/plain; charset="ISO-8859-1" Date: Sat, 27 Nov 2010 22:30:09 -0800 Message-ID: <1290925809.2529.313.camel@helium> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: Pavan Kondeti Cc: Matthieu CASTET , Brian Swetland , "greg@kroah.com" , "linux-usb@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , Mike Lockwood > implementing specific hooks needed for MSM. I am relying on > gadget_is_xxx() macro for MSM specific workarounds. NEVER DO THAT from inside controller drivers. (If the code isn't specific to the msm silicon, and works on other vendors' implementations too, it'd misbehave anyway. Those calls are for gadget drivers, e.g. to embed knowledge about controller issues which can't be detected by looking at what's advertised by the gadget controller device. Using them isn't encouraged. Controller drivers should see what hardware they're talking to by actually talking to the chip and detecting any quirks (be they revision-specific or otherwise). In some cases platform_data will be the way to package such information. - Dave