linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: myungjoo.ham@samsung.com, balbi@ti.com, ldewangan@nvidia.com,
	gg@slimlogic.co.uk, lgirdwood@gmail.com, broonie@kernel.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-omap@vger.kernel.org, grant.likely@linaro.org,
	rob.herring@calxeda.com, rob@landley.net,
	gregkh@linuxfoundation.org, george.cherian@ti.com,
	sameo@linux.intel.com
Subject: Re: [PATCH 3/3] usb: dwc3: use extcon fwrk to receive connect/disconnect notification
Date: Fri, 31 May 2013 08:45:31 +0900	[thread overview]
Message-ID: <51A7E49B.1010704@samsung.com> (raw)
In-Reply-To: <1369405896-30246-4-git-send-email-kishon@ti.com>


On 05/24/2013 11:31 PM, Kishon Vijay Abraham I wrote:
> Modified dwc3-omap to receive connect and disconnect notification using
> extcon framework. Also did the necessary cleanups required after
> adapting to extcon framework.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/usb/dwc3/dwc3-omap.c  | 80 +++++++++++++++++++++++++++++++++----------
>  include/linux/usb/dwc3-omap.h | 30 ----------------
>  2 files changed, 62 insertions(+), 48 deletions(-)
>  delete mode 100644 include/linux/usb/dwc3-omap.h

Hi Kishon,

Thi patch is suspended until fix following build error.
(If kernel builds extcon fwr as module, dwc3-omap.c happen error message)

---
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon extcon-next
head:   30f5d6ea2561c2a54e40b1e8e8f9bb30e064e01b
commit: 30f5d6ea2561c2a54e40b1e8e8f9bb30e064e01b [3/3] usb: dwc3: use extcon fwrk to receive connect/disconnect notification
config: i386-randconfig-x14-0530 (attached as .config)

All error/warnings:

   drivers/built-in.o: In function `dwc3_omap_remove':
   dwc3-omap.c:(.text+0x8c0fa): undefined reference to `extcon_unregister_interest'
   dwc3-omap.c:(.text+0x8c102): undefined reference to `extcon_unregister_interest'
   drivers/built-in.o: In function `dwc3_omap_probe':
   dwc3-omap.c:(.text+0x8c5e6): undefined reference to `extcon_get_extcon_dev'
   dwc3-omap.c:(.text+0x8c6a4): undefined reference to `extcon_register_interest'
   dwc3-omap.c:(.text+0x8c6c9): undefined reference to `extcon_register_interest'
   dwc3-omap.c:(.text+0x8c831): undefined reference to `extcon_get_cable_state'
   dwc3-omap.c:(.text+0x8c851): undefined reference to `extcon_get_cable_state'
---

Also, I missed a issue of this patch. If h/w target use other USB device
instead of "palmas-usb", dwc-omap.c driver won't be operating.
So, I propose two method about this issue.
First, we can get extcon device name through platform data or dt.
Two, When use extcon_register_interest() to register notifier block,
NULL pointer pass to extcon_register_interest() instead of specific extcon
device name(palmas-usb). If extcon_register_interest() check NULL
pointer of extcon device name parameter, extcon fwr will find previous
registered extcon device and then register notifier block of consumer
device driver(dwc3-omap.c) to previous registered extcon device.

> +	edev = extcon_get_extcon_dev("palmas-usb");
> +	if (!edev) {
> +		dev_dbg(dev, "couldn't get extcon device\n");
> +		return -EPROBE_DEFER;
> +	}
> +
>  	spin_lock_init(&omap->lock);
>  
>  	omap->dev	= dev;
>  	omap->irq	= irq;
>  	omap->base	= base;
> +	omap->vbus_nb.notifier_call = dwc3_omap_vbus_notifier;
> +	extcon_register_interest(&omap->extcon_vbus_dev, "palmas-usb", "USB",
> +		&omap->vbus_nb);
> +	omap->id_nb.notifier_call = dwc3_omap_id_notifier;
> +	extcon_register_interest(&omap->extcon_id_dev, "palmas-usb", "USB-HOST",
> +		&omap->id_nb);
>  	dev->dma_mask	= &dwc3_omap_dma_mask;
>  
> +

Thanks,
Chanwoo Choi


  parent reply	other threads:[~2013-05-30 23:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 14:31 [PATCH 0/3] palmas usb driver Kishon Vijay Abraham I
2013-05-24 14:31 ` [PATCH 1/3] drivers: regulator: palmas: add an API to set/clear the switch bit on SMPS10 Kishon Vijay Abraham I
2013-05-24 15:09   ` Sergei Shtylyov
2013-05-25 17:00   ` Laxman Dewangan
2013-05-24 14:31 ` [PATCH v5 2/3] extcon: Palmas Extcon Driver Kishon Vijay Abraham I
2013-05-25 17:10   ` Laxman Dewangan
2013-05-27  5:34   ` Chanwoo Choi
2013-05-27  5:54     ` Kishon Vijay Abraham I
2013-05-27  6:08       ` Chanwoo Choi
2013-05-27  6:22         ` Laxman Dewangan
2013-05-27  6:31           ` Kishon Vijay Abraham I
2013-05-27  6:36             ` Laxman Dewangan
2013-05-27  6:41               ` Kishon Vijay Abraham I
2013-05-27  6:56                 ` Laxman Dewangan
2013-05-27  9:24                   ` Kishon Vijay Abraham I
2013-05-24 14:31 ` [PATCH 3/3] usb: dwc3: use extcon fwrk to receive connect/disconnect notification Kishon Vijay Abraham I
2013-05-27  5:38   ` Chanwoo Choi
2013-05-30 23:45   ` Chanwoo Choi [this message]
2013-05-27 13:33 ` [PATCH v6] extcon: Palmas Extcon Driver Kishon Vijay Abraham I
2013-05-28  2:51   ` Chanwoo Choi
2013-05-27 13:35 ` [PATCH v2] usb: dwc3: use extcon fwrk to receive connect/disconnect notification Kishon Vijay Abraham I
2013-05-28  2:24   ` Chanwoo Choi
2013-05-28  5:27     ` Kishon Vijay Abraham I
2013-05-28 17:35 ` [PATCH 0/3] palmas usb driver Felipe Balbi
2013-05-29  6:06   ` Kishon Vijay Abraham I
2013-05-29 17:38     ` Felipe Balbi

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=51A7E49B.1010704@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=george.cherian@ti.com \
    --cc=gg@slimlogic.co.uk \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=ldewangan@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=sameo@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).