From: Laxman Dewangan <ldewangan@nvidia.com>
To: Rob Herring <robh@kernel.org>, Chanwoo Choi <cw00.choi@samsung.com>
Cc: Venkat Reddy Talla <vreddytalla@nvidia.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Kumar Gala <galak@codeaurora.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] extcon: gpio: Add the support for Device tree bindings
Date: Tue, 31 May 2016 19:14:54 +0530 [thread overview]
Message-ID: <574D9556.9080200@nvidia.com> (raw)
In-Reply-To: <CAL_JsqLpWMX3X77xyVH=5+AtEaRiY9ShkEo0TdHOphqE654OXg@mail.gmail.com>
Hi Rob,
On Tuesday 31 May 2016 07:05 PM, Rob Herring wrote:
> On Tue, May 31, 2016 at 2:35 AM, Chanwoo Choi <cw00.choi@samsung.com> wrote:
>> The extcon-gpio.c driver can separate the kind of external connector
>> by using the 'extcon-id' property.
> This use of DT is just broken. Come up with another way.
>
>
Can we have the DT binding very similar to IIO, clock, reset etc?
Here is details for extcon-jack DT binding and its client:
The client can get the cable information through its node or extcon name
and once cable information is available, it can register for
notification when state gets changed.
The typical dt nodes are:
Extcon-driver node:
extcon: arizona-extcon {
compatible = "wlf,arizona-extcon";
#extcon-cells = <1>;
};
Driver need to specify the cable ID as
Cable ID
----------------------------
Mechanical 0
Microphone 1
Headphone 2
Line-out 3
Here #extcon-cells is must and specifies the size of extcon cells.
The client need to provide the driver specific information as argument
along with handle.
Extcon Client node:
audio-controller@b0000 {
::::
extcon-cables = <&extcon 1>, <&extcon 3>;
extcon-cable-names = "Microphone", "Line-out";
};
and client driver can register the cable by passing the cable name
as above along with its node.
struct extcon_cable {
struct extcon_dev *edev,
int cable_id;
};
edev_mic_cable = extcon_get_extcon_cable(dev, "Microphone");
extcon_register_notification(edev_mic_cable, notifier);
edev_line_out_cable = extcon_get_extcon_cable(dev, "Line-out");
extcon_register_notification(edev_line_out_cable, notifier);
Prototype:
struct extcon_cable *extcon_get_extcon_cable(struct device *dev, const
char *cable_name)
next prev parent reply other threads:[~2016-05-31 13:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 11:47 [PATCH v4] extcon: gpio: Add the support for Device tree bindings Venkat Reddy Talla
2016-05-26 13:21 ` Chanwoo Choi
2016-05-27 5:13 ` Venkat Reddy Talla
2016-05-31 7:13 ` Chanwoo Choi
2016-05-27 15:29 ` Rob Herring
2016-05-31 6:44 ` Chanwoo Choi
2016-05-31 7:35 ` Chanwoo Choi
2016-05-31 13:35 ` Rob Herring
2016-05-31 13:44 ` Laxman Dewangan [this message]
2016-05-31 15:48 ` Rob Herring
2016-06-01 14:49 ` Laxman Dewangan
2016-06-01 16:00 ` Rob Herring
2016-05-31 14:34 ` Chanwoo Choi
2016-06-07 1:52 ` Chanwoo Choi
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=574D9556.9080200@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=pawel.moll@arm.com \
--cc=robh@kernel.org \
--cc=vreddytalla@nvidia.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