From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH v4 03/22] usb: ulpi: Support device discovery via DT Date: Mon, 12 Sep 2016 15:05:01 -0700 Message-ID: <147371790115.20135.5378574586724662470@sboyd-linaro> References: <20160907213519.27340-1-stephen.boyd@linaro.org> <20160907213519.27340-4-stephen.boyd@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20160907213519.27340-4-stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Heikki Krogerus Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andy Gross , Bjorn Andersson , Neil Armstrong , Arnd Bergmann , Felipe Balbi , Peter Chen , Greg Kroah-Hartman , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring List-Id: linux-arm-msm@vger.kernel.org Quoting Stephen Boyd (2016-09-07 14:35:00) > @@ -174,6 +219,21 @@ static int ulpi_register(struct device *dev, struct = ulpi *ulpi) > ulpi->id.product =3D ulpi_read(ulpi, ULPI_PRODUCT_ID_LOW); > ulpi->id.product |=3D ulpi_read(ulpi, ULPI_PRODUCT_ID_HIGH) << 8; > = > + /* Some ULPI devices don't have a vendor id so rely on OF match */ > + if (ulpi->id.vendor =3D=3D 0) > + goto err; > + > + request_module("ulpi:v%04xp%04x", ulpi->id.vendor, ulpi->id.produ= ct); > + > + return 0; > +err: > + return of_device_request_module(&ulpi->dev); This can't return the value of of_device_request_module() because that returns an error if the module is builtin or if module loading is disabled. I'll have to ignore the error here and just return success all the time. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757790AbcILWFQ (ORCPT ); Mon, 12 Sep 2016 18:05:16 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:34596 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756689AbcILWFJ (ORCPT ); Mon, 12 Sep 2016 18:05:09 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 To: linux-usb@vger.kernel.org, "Heikki Krogerus" From: Stephen Boyd In-Reply-To: <20160907213519.27340-4-stephen.boyd@linaro.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, "Andy Gross" , "Bjorn Andersson" , "Neil Armstrong" , "Arnd Bergmann" , "Felipe Balbi" , "Peter Chen" , "Greg Kroah-Hartman" , devicetree@vger.kernel.org, "Rob Herring" References: <20160907213519.27340-1-stephen.boyd@linaro.org> <20160907213519.27340-4-stephen.boyd@linaro.org> Message-ID: <147371790115.20135.5378574586724662470@sboyd-linaro> User-Agent: alot/0.3.7 Subject: Re: [PATCH v4 03/22] usb: ulpi: Support device discovery via DT Date: Mon, 12 Sep 2016 15:05:01 -0700 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u8CM5RwR019113 Quoting Stephen Boyd (2016-09-07 14:35:00) > @@ -174,6 +219,21 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi) > ulpi->id.product = ulpi_read(ulpi, ULPI_PRODUCT_ID_LOW); > ulpi->id.product |= ulpi_read(ulpi, ULPI_PRODUCT_ID_HIGH) << 8; > > + /* Some ULPI devices don't have a vendor id so rely on OF match */ > + if (ulpi->id.vendor == 0) > + goto err; > + > + request_module("ulpi:v%04xp%04x", ulpi->id.vendor, ulpi->id.product); > + > + return 0; > +err: > + return of_device_request_module(&ulpi->dev); This can't return the value of of_device_request_module() because that returns an error if the module is builtin or if module loading is disabled. I'll have to ignore the error here and just return success all the time. From mboxrd@z Thu Jan 1 00:00:00 1970 From: stephen.boyd@linaro.org (Stephen Boyd) Date: Mon, 12 Sep 2016 15:05:01 -0700 Subject: [PATCH v4 03/22] usb: ulpi: Support device discovery via DT In-Reply-To: <20160907213519.27340-4-stephen.boyd@linaro.org> References: <20160907213519.27340-1-stephen.boyd@linaro.org> <20160907213519.27340-4-stephen.boyd@linaro.org> Message-ID: <147371790115.20135.5378574586724662470@sboyd-linaro> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Quoting Stephen Boyd (2016-09-07 14:35:00) > @@ -174,6 +219,21 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi) > ulpi->id.product = ulpi_read(ulpi, ULPI_PRODUCT_ID_LOW); > ulpi->id.product |= ulpi_read(ulpi, ULPI_PRODUCT_ID_HIGH) << 8; > > + /* Some ULPI devices don't have a vendor id so rely on OF match */ > + if (ulpi->id.vendor == 0) > + goto err; > + > + request_module("ulpi:v%04xp%04x", ulpi->id.vendor, ulpi->id.product); > + > + return 0; > +err: > + return of_device_request_module(&ulpi->dev); This can't return the value of of_device_request_module() because that returns an error if the module is builtin or if module loading is disabled. I'll have to ignore the error here and just return success all the time.