lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Oct 2015 17:35:56 -0500
From:	Rob Herring <robh+dt@...nel.org>
To:	Chanwoo Choi <cw00.choi@...sung.com>,
	Sudeep Holla <Sudeep.Holla@....com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>, myungjoo.ham@...sung.com,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v3] extcon: gpio: Add the support for Device tree bindings

On Tue, Oct 20, 2015 at 11:37 PM, Chanwoo Choi <cw00.choi@...sung.com> wrote:
> This patch adds the support for Device tree bindings of extcon-gpio driver.
> The extcon-gpio device tree node must include the both 'extcon-id' and
> 'extcon-gpio' property.

I think this is too tied to the Linux driver. Instead, think about
what the connector contains. I think you should define a usb connector
node and compatible (e.g. usb-connector or usb-ab-connector). This
probably needs to distinguish the connector type as well especially
with TypeC coming.

>
> For exmaple:
>         usb_cable: extcon-gpio-0 {
>                 compatible = "extcon-gpio";
>                 extcon-id = <EXTCON_USB>;
>                 extcon-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>;

This tied to a Vbus detect circuit?

So "vbus-detect-gpios" in the connector node.

For host side (or OTG host mode), you may also need a vbus-supply
regulator property. OTG will also need an id-gpios for ID pin.

>         }
>
>         ta_cable: extcon-gpio-1 {

This is all the same connector as above?

>                 compatible = "extcon-gpio";
>                 extcon-id = <EXTCON_CHG_USB_DCP>;
>                 extcon-gpio = <&gpio3 2 GPIO_ACTIVE_LOW>;

This is just detecting D+ and D- are both pulled high?

So "dcp-detect-gpios" in the connector node.

>                 debounce-ms = <50>;     /* 50 millisecond */
>                 wakeup-source;

wakeup-source implies an interrupt as I read Sudeep's series. Either
gpios need to be allowed or these need to be defined as interrupts.

>         }
>
>         &dwc3_usb {
>                 extcon = <&usb_cable>;
>         };
>
>         &charger {
>                 extcon = <&ta_cable>;

Not sure what to do with this. Both can point to a single connector
node I think.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ