All of lore.kernel.org
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	NeilBrown <neilb@suse.de>, "Randy Dunlap" <rdunlap@xenotime.net>,
	"Mike Lockwood" <lockwood@android.com>,
	"Arve Hj?nnevag" <arve@android.com>,
	박경민 <kyungmin.park@samsung.com>, 김동근 <dg77.kim@samsung.com>,
	"Greg KH" <gregkh@suse.de>, "Arnd Bergmann" <arnd@arndb.de>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Morten CHRISTIANSEN" <morten.christiansen@stericsson.com>,
	"John Stultz" <john.stultz@linaro.org>,
	"Joerg Roedel" <joerg.roedel@amd.com>,
	myungjoo.ham@gmail.com
Subject: Re: Re: [PATCH v5 5/5] Extcon: adc-jack driver to support 3.5 pi or simliar devices
Date: Tue, 14 Feb 2012 07:00:48 +0000 (GMT)	[thread overview]
Message-ID: <1724827.104121329202847962.JavaMail.weblogic@epml06> (raw)

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

Mark Brown wrote:
> On Tue, Feb 14, 2012 at 11:22:14AM +0900, MyungJoo Ham wrote:
> > On Sat, Feb 11, 2012 at 1:25 AM, Mark Brown
> > <broonie@opensource.wolfsonmicro.com> wrote:
> > > On Fri, Feb 10, 2012 at 03:40:38PM +0900, MyungJoo Ham wrote:
> > >> External connector devices that decides connection information based on
> > >> ADC values may use adc-jack device driver. The user simply needs to
> > >> provide a table of adc range and connection states. Then, extcon
> > >> framework will automatically notify others.
> 
> > > This really should be done in terms of the IIO in-kernel framework.
> 
> > The ADC part may be done in IIO. However, the intention of this device
> > driver is to provide extcon interface to any ADC drivers, not
> > providing an ADC device driver. If we are going to implement this in
> 
> Right, exactly.
> 
> > the ADC driver in IIO, we will need to write the given code in every
> > ADC driver used for analog ports.
> 
> No, that's not what I'm suggesting - what I'm suggesting is that rather
> than having a callback for implementing the ADC read functionality this
> should work as an in-kernel IIO driver so it'll just automatically work
> with any ADC without needing code to hook things up.  Unless I've not
> understood your comment fully.

Ok. Do you mean that we should give struct iio_dev * and struct iio_chan_spec * instead of a callback?
I thought there was no standard framework for ADC (the reason why this is a simple callback); however, may I regard iio/adc as the standard for ADC? (I see some ADC device drivers in HWMON)

Do I need to make this driver as an iio device driver in order to do this? I guess including iio.h would be enough anyway.


> 
> > >> +     /* Check the length of array and set num_cables */
> > >> +     for (i = 0; data->edev.supported_cable[i]; i++)
> > >> +             ;
> > >> +     if (i == 0 || i > SUPPORTED_CABLE_MAX) {
> 
> > > Can we not avoid the hard limit?
> 
> > Without that limit, we won't be able to easily express binary cable
> > status (u32) with the extcon framework. At least, we will need to
> > forget about setting the status with u32 values.
> 
> > Anyway, I can remove the checking SUPPORT_CABLE_MAX part at probe.
> 
> It might be clearer to make the limit more obviously associated with
> the bitmask - it looks like it's an array thing the way the code is
> written but a limit due to using a bitmask seems reasonable.
> 
> 

Ah.. I'll add a comment or update the error message associated.


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-02-14  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14  7:00 MyungJoo Ham [this message]
2012-02-14 17:17 ` Re: [PATCH v5 5/5] Extcon: adc-jack driver to support 3.5 pi or simliar devices Mark Brown

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=1724827.104121329202847962.JavaMail.weblogic@epml06 \
    --to=myungjoo.ham@samsung.com \
    --cc=arnd@arndb.de \
    --cc=arve@android.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dg77.kim@samsung.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@suse.de \
    --cc=joerg.roedel@amd.com \
    --cc=john.stultz@linaro.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lockwood@android.com \
    --cc=morten.christiansen@stericsson.com \
    --cc=myungjoo.ham@gmail.com \
    --cc=neilb@suse.de \
    --cc=rdunlap@xenotime.net \
    /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.