From: Chanwoo Choi <cw00.choi@samsung.com>
To: "Tc, Jenny" <jenny.tc@intel.com>
Cc: "myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
anish kumar <anish198519851985@gmail.com>,
myunjoo.ham@gmail.com
Subject: Re: [PATCH] extcon : callback function to read cable property
Date: Thu, 08 Nov 2012 10:25:35 +0900 [thread overview]
Message-ID: <509B0A0F.5000406@samsung.com> (raw)
In-Reply-To: <20ADAB092842284E95860F279283C5643BA10D@BGSMSX101.gar.corp.intel.com>
On 10/17/2012 03:34 PM, Tc, Jenny wrote:
>>>> Subject: Re: [PATCH] extcon : callback function to read cable
>>>> property
>>>>
>>>> I think the reason why we have extcon is in first place is to only
>>>> notify the clients of cable connection and disconnection and it is
>>>> up to the client to decide what else to do with the cable such as
>>>> finding which state it is in and other details.
>>>> So I feel this should not be handled in the extcon.
>>>>
>>>> However it is up to the maintainer to decide.
>>>
>>> Once the consumer gets the notification, it needs to take some action.
>>> One of the action is to read the cable properties. This can be done by
>>> proprietary calls which is known both to the consumer and the provider.
>>> My intention is to avoid this proprietary calls. Since both the
>>> provider and consumer are communicating with the extcon subsystem , I
>>> feel having a callback function of this kind would help to avoid the
>>> use of proprietary calls. Also I agree that extcon notifier chains are
>>> used to notify the cable state (attach/detach). But if a cable has
>>> more than two states (like the charger cable) how do we support it without
>> having a callback function like this?
>>> Let the maintainer take the final decision.
>> Well this use case will keep on growing if we start factor in this kind of
>> changes and that is why I am opposed to adding any other state.
>> Maintainer?
>>>
I think that the role of extcon subsystem notify changed state(attached/detached)
of cable to notifiee, but if you want to add property feature of cable,
you should solve ambiguous issues.
First,
This patch only support the properties of charger cable but, never
support property of other cable. The following structure depend on
only charger cable. We can check it the following structure:
struct extcon_chrg_cbl_props {
enum extcon_chrgr_cbl_stat cable_state;
unsigned long mA;
};
I think that the patch have to support all of cables for property feature.
Second,
Certainly, you should define common properties of all cables and
specific properties of each cable. The properties of charger cable
should never be defined only.
Third,
If we finish to decide the properties for all cables, I'd like to see a example code.
You explained following changed state of USB according to Host state on other patch.
---------------------------
For USB2.0
1) CONNECT (100mA)->UPDATE(500mA)->DISCONNECT(0mA)
2) CONNECT (100mA)->UPDATE(500mA)->HOST SUSPEND(2.5mA/500mA)->DISCONNECT(0mA)
3) CONNECT (100mA)->UPDATE(500mA)->HOST SUSPEND(2.5mA/500mA)->HOST RESUME(500mA)->DISCONNECT(0mA)
For USB 3.0
4) CONNECT (150mA)->UPDATE(900mA)->DISCONNECT(0mA)
5) CONNECT (150mA)->UPDATE(900mA)-> HOST SUSPEND(2.5mA/900mA)->DISCONNECT(0mA)
6) CONNECT (100mA)->UPDATE(900mA)->HOST SUSPEND(2.5mA/900mA)->HOST RESUME(900mA)->DISCONNECT(0mA)
---------------------------
I have a question. Can the provider device driver(e.g., extcon-max77693.c/
extcon-max8997.c) detect the changed state of host? I'd like to see the
example device driver that the provider device driver detect changed state of host.
Could you provide example device driver?
Thanks,
Chanwoo Choi
next prev parent reply other threads:[~2012-11-08 1:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 10:23 [PATCH] extcon : callback function to read cable property Jenny TC
2012-10-10 14:45 ` anish kumar
2012-10-11 1:20 ` Tc, Jenny
2012-10-11 13:47 ` anish kumar
2012-10-17 6:34 ` Tc, Jenny
2012-11-08 1:25 ` Chanwoo Choi [this message]
2012-11-09 14:05 ` Tc, Jenny
2012-11-10 4:18 ` anish kumar
2012-11-15 4:05 ` Tc, Jenny
2012-11-15 19:31 ` anish singh
2012-11-20 1:39 ` Tc, Jenny
2012-11-20 2:29 ` Chanwoo Choi
2012-11-20 2:42 ` Tc, Jenny
2012-11-20 6:10 ` Chanwoo Choi
2012-11-20 9:14 ` Tc, Jenny
2012-11-20 9:24 ` Anton Vorontsov
2012-11-20 9:32 ` anish singh
2012-11-20 11:08 ` Tc, Jenny
2012-11-20 11:21 ` Anton Vorontsov
-- strict thread matches above, loose matches on Subject: below --
2012-10-17 7:08 MyungJoo Ham
2012-10-19 3:13 ` Tc, Jenny
2012-10-20 1:40 ` Chanwoo Choi
2012-10-25 3:18 ` Tc, Jenny
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=509B0A0F.5000406@samsung.com \
--to=cw00.choi@samsung.com \
--cc=anish198519851985@gmail.com \
--cc=jenny.tc@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=myunjoo.ham@gmail.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.