linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: "Tc, Jenny" <jenny.tc@intel.com>, 최찬우 <cw00.choi@samsung.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	anish kumar <anish198519851985@gmail.com>
Subject: Re: RE: [PATCH] extcon : callback function to read cable property
Date: Wed, 17 Oct 2012 07:08:34 +0000 (GMT)	[thread overview]
Message-ID: <18312556.138071350457714044.JavaMail.weblogic@epml24> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 2738 bytes --]

> Myunjoo/Chanwoo
> 
> Ping...
> Could you please review this patch?
> 
> -jtc
> 
> > > > 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?
> > >
> > >
> > 

Hello,


I don't think it's appropriate to declare the charger specific
properties in extcon.h. The status of a charger should be and can be
represented by an instance of regulator, power-supply-class,
or charger-manager.

Thus, we may (I'm still not sure) need to let extcon to relay
the instance (struct device? or char *devname?) with some callback
similar with get_cable_device().  However, allowing (and encouraging)
to pass void pointer of cable_props to extcon users from extcon device
appears not adequete. If the both parties can use their own "private"
data structure, why they cannot simply pass their own data witht the
"private" data channel?
 

Recap:
- The later part of patch: NACK
- The first part of patch (callback): need to reconsider the data type.
We may get device pointer or device name that is correspondant to the
cable, which in turn, guides us to the corresponding data structure
(charger-manager, regulator, or something) However, I'm still not sure
which should be appropriate for this.


Cheers!
MyungJoo
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

             reply	other threads:[~2012-10-17  7:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17  7:08 MyungJoo Ham [this message]
2012-10-19  3:13 ` RE: [PATCH] extcon : callback function to read cable property Tc, Jenny
2012-10-20  1:40   ` Chanwoo Choi
2012-10-25  3:18     ` Tc, Jenny
2012-10-25  8:37 MyungJoo Ham
2012-10-25  9:24 ` Tc, Jenny
2012-11-03  2:57   ` Tc, Jenny
2012-11-20  3:45 MyungJoo Ham
2012-11-20 11:05 MyungJoo Ham
2012-11-22 13:00 ` Tc, Jenny
2012-11-22 20:03   ` Anton Vorontsov

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=18312556.138071350457714044.JavaMail.weblogic@epml24 \
    --to=myungjoo.ham@samsung.com \
    --cc=anish198519851985@gmail.com \
    --cc=cw00.choi@samsung.com \
    --cc=jenny.tc@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).