mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: "Tc, Jenny" <jenny.tc@intel.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
	anish singh <anish198519851985@gmail.com>,
	"myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"myunjoo.ham@gmail.com" <myunjoo.ham@gmail.com>,
	"lockwood@android.com" <lockwood@android.com>,
	"peterhuewe@gmx.de" <peterhuewe@gmx.de>,
	"broonie@opensource.wolfsonmicro.com" 
	<broonie@opensource.wolfsonmicro.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"Pallala, Ramakrishna" <ramakrishna.pallala@intel.com>
Subject: Re: [PATCH] extcon : callback function to read cable property
Date: Tue, 20 Nov 2012 01:24:19 -0800	[thread overview]
Message-ID: <20121120092419.GA27280@lizard> (raw)
In-Reply-To: <20ADAB092842284E95860F279283C56444C915@BGSMSX101.gar.corp.intel.com>

On Tue, Nov 20, 2012 at 09:14:41AM +0000, Tc, Jenny wrote:
[...]
> > For example,
> > Firstly, the power_supply charging framework check state of charger cable
> > whether attached or detached cable. Second, when power_supply charging
> > framework receive the changed state of host system from 'Host system
> > notifier', change charging current of charger cable.
> 
> Not just SUSPEND, but we need to handle RESUME , UPDATE etc.  Also this doesn’t help us to
> define a standard interface for the charger cable state/properties. IMHO it's not right
> to provide different interfaces for different cables. This doesn't help us to standardize
> the charger cable interface.
> 
> This thread has been running for a quite long time. Unfortunately we couldn't make an
> agreement on the final solution. I would like to recap the overall requirement and
> would like to propose alternate solutions. The requirements is  to
> "Provide a generic interface for charger cable states and charger cable properties"
> 
> Even though extcon subsystem handles charger cable states, it's not enough to handle
> all kind of charger cable states. It can handle just 2 states CONNECT/DISCONNECT.
> But there are scenarios where we need to handle more than 2 states
> (eg. USB SUSPEND/RESUME/UPDATE etc). Also extcon doesn't have any mechanism to
> read cable properties in a generic way.  Extcon charger-cable consumer driver
> implementations (eg charger-manager), defines charger cable properties statically (current in mA)
> inside the consumer driver. This is not enough, since the charger cable properties may change dynamically
> 
> In existing form extcon cannot support different charger cable states and their 
> properties in a generic way. Also we couldn't find a final solution on how to modify the
> extcon to support these requirements. From the whole discussion what I conclude is
>  * extcon is not designed to support cable properties

The idea of using union seemed good to me, what happened to it?

I mean, MyungJoo Ham wrote:

| We may have:
|        enum extcon_cable_type {
|                EXTCON_CT_REGULATOR,
|                EXTCON_CT_PSY,
|                EXTCON_CT_CHARGER_CB,
|                ...
|        };
| and have the following included at struct extcon_cable:
|        union {
|                struct regulator *reg;
|                struct power_supply *psy;
|                struct charger_cable *charger_cb;
|                ...
|        } cable data;
|        enum extcon_cable_type cable_type;

This sounds good to me...

>  * extcon is not designed to support any cable state other than CONNECT/DISCONNECT

Dunno for this one. Can we get these additional states via "properties" as
described above?

Thanks,
Anton.

  reply	other threads:[~2012-11-20  9:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 10:23 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
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 [this message]
2012-11-20  9:32                               ` anish singh
2012-11-20 11:08                               ` Tc, Jenny
2012-11-20 11:21                                 ` Anton Vorontsov
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=20121120092419.GA27280@lizard \
    --to=cbouatmailru@gmail.com \
    --cc=anish198519851985@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jenny.tc@intel.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lockwood@android.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=myunjoo.ham@gmail.com \
    --cc=peterhuewe@gmx.de \
    --cc=ramakrishna.pallala@intel.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

Powered by JetHome