From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Praveen Paneri <p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v7 2/5] usb: s3c-hsotg: Adding phy driver support
Date: Wed, 31 Oct 2012 16:05:48 +0200 [thread overview]
Message-ID: <20121031140548.GE10998@arwen.pp.htv.fi> (raw)
In-Reply-To: <1351573057-22249-3-git-send-email-p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1030 bytes --]
Hi,
On Tue, Oct 30, 2012 at 10:27:34AM +0530, Praveen Paneri wrote:
> @@ -3501,20 +3511,27 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
> int ret;
> int i;
>
> - plat = pdev->dev.platform_data;
> - if (!plat) {
> - dev_err(&pdev->dev, "no platform data defined\n");
> - return -EINVAL;
> - }
> -
> hsotg = devm_kzalloc(&pdev->dev, sizeof(struct s3c_hsotg), GFP_KERNEL);
> if (!hsotg) {
> dev_err(dev, "cannot get memory\n");
> return -ENOMEM;
> }
>
> + plat = pdev->dev.platform_data;
> + if (!plat) {
> + /* Fallback for transceiver */
> + phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + if (IS_ERR_OR_NULL(phy)) {
> + dev_err(&pdev->dev, "no platform data or transceiver defined\n");
> + return -EPROBE_DEFER;
> + } else {
> + hsotg->phy = phy;
> + }
> + } else {
> + hsotg->plat = plat;
> + }
I think this should be the other way around, meaning you try to grab the
phy, if you can't, then you fallback to pdata.
--
balbi
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 2/5] usb: s3c-hsotg: Adding phy driver support
Date: Wed, 31 Oct 2012 16:05:48 +0200 [thread overview]
Message-ID: <20121031140548.GE10998@arwen.pp.htv.fi> (raw)
In-Reply-To: <1351573057-22249-3-git-send-email-p.paneri@samsung.com>
Hi,
On Tue, Oct 30, 2012 at 10:27:34AM +0530, Praveen Paneri wrote:
> @@ -3501,20 +3511,27 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
> int ret;
> int i;
>
> - plat = pdev->dev.platform_data;
> - if (!plat) {
> - dev_err(&pdev->dev, "no platform data defined\n");
> - return -EINVAL;
> - }
> -
> hsotg = devm_kzalloc(&pdev->dev, sizeof(struct s3c_hsotg), GFP_KERNEL);
> if (!hsotg) {
> dev_err(dev, "cannot get memory\n");
> return -ENOMEM;
> }
>
> + plat = pdev->dev.platform_data;
> + if (!plat) {
> + /* Fallback for transceiver */
> + phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + if (IS_ERR_OR_NULL(phy)) {
> + dev_err(&pdev->dev, "no platform data or transceiver defined\n");
> + return -EPROBE_DEFER;
> + } else {
> + hsotg->phy = phy;
> + }
> + } else {
> + hsotg->plat = plat;
> + }
I think this should be the other way around, meaning you try to grab the
phy, if you can't, then you fallback to pdata.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121031/6d31b60c/attachment.sig>
next prev parent reply other threads:[~2012-10-31 14:05 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 4:57 [PATCH v7 0/5] usb: phy: samsung: Introducing usb phy driver for samsung SoCs Praveen Paneri
2012-10-30 4:57 ` Praveen Paneri
2012-10-30 4:57 ` [PATCH v7 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg Praveen Paneri
2012-10-30 4:57 ` Praveen Paneri
[not found] ` <1351573057-22249-2-git-send-email-p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-11-07 12:59 ` Vivek Gautam
2012-11-07 12:59 ` Vivek Gautam
2012-10-30 4:57 ` [PATCH v7 2/5] usb: s3c-hsotg: Adding phy driver support Praveen Paneri
2012-10-30 4:57 ` Praveen Paneri
[not found] ` <1351573057-22249-3-git-send-email-p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-31 14:05 ` Felipe Balbi [this message]
2012-10-31 14:05 ` Felipe Balbi
[not found] ` <20121031140548.GE10998-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-10-31 14:44 ` Lukasz Majewski
2012-10-31 14:44 ` Lukasz Majewski
2012-11-02 4:26 ` Praveen Paneri
2012-11-02 4:26 ` Praveen Paneri
2012-11-02 5:49 ` [PATCH " Praveen Paneri
2012-11-02 5:49 ` Praveen Paneri
2012-10-30 4:57 ` [PATCH v7 3/5] ARM: S3C64XX: Removing old phy setup code Praveen Paneri
2012-10-30 4:57 ` Praveen Paneri
2012-10-30 4:57 ` [PATCH v7 4/5] ARM: S3C64XX: Enabling samsung-usbphy driver Praveen Paneri
2012-10-30 4:57 ` Praveen Paneri
2012-10-30 4:57 ` [PATCH v7 5/5] ARM: Exynos4210: " Praveen Paneri
2012-10-30 4:57 ` Praveen Paneri
2012-11-09 11:54 ` [PATCH v7 0/5] usb: phy: samsung: Introducing usb phy driver for samsung SoCs Felipe Balbi
2012-11-09 11:54 ` Felipe Balbi
[not found] ` <20121109115440.GC8078-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-11-09 12:15 ` Praveen Paneri
2012-11-09 12:15 ` Praveen Paneri
2012-11-09 12:36 ` Kyungmin Park
2012-11-09 12:36 ` Kyungmin Park
[not found] ` <CAH9JG2X1a8MqBpnk8uHRjsGnaD7uob5GBhUh_aS5iCprEvi2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-09 13:20 ` Praveen Paneri
2012-11-09 13:20 ` Praveen Paneri
2012-11-09 13:54 ` Felipe Balbi
2012-11-09 13:54 ` Felipe Balbi
2012-11-12 4:41 ` Kukjin Kim
2012-11-12 4:41 ` Kukjin Kim
[not found] ` <004201cdc08f$fa0fd3d0$ee2f7b70$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-11-14 4:08 ` Praveen Paneri
2012-11-14 4:08 ` Praveen Paneri
[not found] ` <CAD6zSYM5-GdGHYH=W-My34oXRfH0M+rfettFa0fiit3-_V1RDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-14 4:24 ` Praveen Paneri
2012-11-14 4:24 ` Praveen Paneri
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=20121031140548.GE10998@arwen.pp.htv.fi \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.