From: Chanwoo Choi <cw00.choi@samsung.com>
To: Roger Quadros <rogerq@ti.com>, linux-kernel@vger.kernel.org
Cc: myungjoo.ham@samsung.com, zyw@rock-chips.com,
groeck@chromium.org, chanwoo@kernel.org,
Krzysztof Kozlowski <k.kozlowski@samsung.com>
Subject: Re: [PATCH v3 1/6] extcon: Add the extcon_type to gather each connector into five category
Date: Tue, 02 Aug 2016 16:41:46 +0900 [thread overview]
Message-ID: <57A04EBA.9000203@samsung.com> (raw)
In-Reply-To: <3ea3334e-96f5-6ce0-1402-6b9baf192db3@ti.com>
Hi Roger,
On 2016년 08월 02일 16:27, Roger Quadros wrote:
> Hi,
>
> On 02/08/16 04:58, Chanwoo Choi wrote:
>> This patch adds the new extcon type to group the each connecotr
>> into following five category. This type would be used to handle
>> the connectors as a group unit instead of a connector unit.
>> - EXTCON_TYPE_USB : USB connector
>> - EXTCON_TYPE_CHG : Charger connector
>> - EXTCON_TYPE_JACK : Jack connector
>> - EXTCON_TYPE_DISP : Display connector
>> - EXTCON_TYPE_MISC : Miscellaneous connector
>>
>> Also, each external connector is possible to belong to one more extcon type.
>> In caes of EXTCON_CHG_USB_SDP, it have the EXTCON_TYPE_CHG and EXTCON_TYPE_USB.
>>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> Tested-by: Chris Zhong <zyw@rock-chips.com>
>> Tested-by: Guenter Roeck <groeck@chromium.org>
>> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
>> Reviewed-by: Guenter Roeck <groeck@chromium.org>
>> ---
>> drivers/extcon/extcon.c | 159 +++++++++++++++++++++++++++++++++++++++---------
>> include/linux/extcon.h | 9 +++
>> 2 files changed, 139 insertions(+), 29 deletions(-)
>>
>> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
>> index 9a266e5c7e10..129afc87313e 100644
>> --- a/drivers/extcon/extcon.c
>> +++ b/drivers/extcon/extcon.c
>> @@ -38,43 +38,144 @@
>> #define SUPPORTED_CABLE_MAX 32
>> #define CABLE_NAME_MAX 30
>>
>> -static const char *extcon_name[] = {
>> - [EXTCON_NONE] = "NONE",
>> +struct __extcon_info {
>> + unsigned int type;
>> + unsigned int id;
>> + const char *name;
>> +
>> +} extcon_info[] = {
>> + [EXTCON_NONE] = {
>> + .type = EXTCON_TYPE_MISC,
>> + .id = EXTCON_NONE,
>> + .name = "NONE",
>> + },
>>
>> /* USB external connector */
>> - [EXTCON_USB] = "USB",
>> - [EXTCON_USB_HOST] = "USB-HOST",
>> + [EXTCON_USB] = {
>> + .type = EXTCON_TYPE_USB,
>> + .id = EXTCON_USB,
>> + .name = "USB",
>> + },
>> + [EXTCON_USB_HOST] = {
>> + .type = EXTCON_TYPE_USB,
>> + .id = EXTCON_USB,
>> + .name = "USB_HOST",
>> + },
>
> EXTCON_USB_HOST should now be redundant as we can get all the
> necessary information via EXTCON_USB.
It is my mistake. I'll fix it.
.id = EXTCON_USB, -> .id = EXTCON_USB_HOST,
On the user-space, the process don't handle the ID and VBUS information directly.
they need the identical type of attached external connector.
For exmaple,
The extcon separate the following two case:
- mobile phone is connected to desktop pc.
- mobile phone is connected to mouse/keyboard with otg cable.
Regards,
Chanwoo Choi
next prev parent reply other threads:[~2016-08-02 7:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 1:58 [PATCH v3 0/6] extcon: Add the support for extcon type and property Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 1/6] extcon: Add the extcon_type to gather each connector into five category Chanwoo Choi
2016-08-02 7:27 ` Roger Quadros
2016-08-02 7:41 ` Chanwoo Choi [this message]
2016-08-02 1:58 ` [PATCH v3 2/6] extcon: Add the support for extcon property according to extcon type Chanwoo Choi
2016-08-02 7:43 ` Roger Quadros
2016-08-02 8:08 ` Chanwoo Choi
2016-08-03 9:46 ` Roger Quadros
2016-08-04 0:42 ` Chanwoo Choi
2016-08-04 4:09 ` Guenter Roeck
2016-08-04 8:49 ` Roger Quadros
2016-08-04 10:57 ` Chanwoo Choi
2016-08-04 14:47 ` Guenter Roeck
2016-08-05 0:33 ` Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 3/6] extcon: Add the support for the capability of each property Chanwoo Choi
2016-08-02 8:07 ` Roger Quadros
2016-08-02 8:18 ` Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 4/6] extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 5/6] extcon: Add the synchronization extcon APIs to support the notification Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C 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=57A04EBA.9000203@samsung.com \
--to=cw00.choi@samsung.com \
--cc=chanwoo@kernel.org \
--cc=groeck@chromium.org \
--cc=k.kozlowski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rogerq@ti.com \
--cc=zyw@rock-chips.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 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.