Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753283AbbDMHIe (ORCPT ); Mon, 13 Apr 2015 03:08:34 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:32932 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbbDMHI3 convert rfc822-to-8bit (ORCPT ); Mon, 13 Apr 2015 03:08:29 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: [PATCH] usb: chipidea: Use extcon framework for VBUS and ID detection From: "Ivan T. Ivanov" In-Reply-To: <20150413035345.GA1341@shlinux2> Date: Mon, 13 Apr 2015 10:08:28 +0300 Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <1428568418-22508-1-git-send-email-ivan.ivanov@linaro.org> <20150413035345.GA1341@shlinux2> To: Peter Chen X-Mailer: Apple Mail (2.2098) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1690 Lines: 49 > On Apr 13, 2015, at 6:53 AM, Peter Chen wrote: > > On Thu, Apr 09, 2015 at 11:33:38AM +0300, Ivan T. Ivanov wrote: >> On recent Qualcomm platforms VBUS and ID lines are not routed to >> USB PHY LINK controller. Use extcon framework to receive connect >> and disconnect ID and VBUS notification. >> >> >> >> +Optional properties: >> +- extcon: phandles to external connector devices. First phandle >> + should point to external connector, which provide "USB" >> + cable events, the second should point to external connector >> + device, which provide "USB-HOST" cable events. If one of >> + the external connector devices is not required empty <0> >> + phandle should be specified. > > You mean if id connector is not needed, we write dts like below: > extcon = <&usb_vbus>, <0>; > > If it is, you may miss ',' between "required" and "empty <0>”. Yes. Will fix it. >> u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask) >> { >> - return hw_read(ci, OP_OTGSC, mask); >> + u32 val = hw_read(ci, OP_OTGSC, mask); >> + >> + if ((mask & OTGSC_BSV) && ci->vbus.conn.edev) { > > You may use "||" since you can't get vbus and id value from > cpu register (otgsc). The idea is to not rely on the register content for these bits if user have defined these DT bindings. Will fix rest of the comments and resend. Thank you, Ivan-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/