lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120214055814.GA13456@opensource.wolfsonmicro.com>
Date:	Mon, 13 Feb 2012 21:58:15 -0800
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:	linux-kernel@...r.kernel.org, NeilBrown <neilb@...e.de>,
	Randy Dunlap <rdunlap@...otime.net>,
	Mike Lockwood <lockwood@...roid.com>,
	Arve Hjønnevag <arve@...roid.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Donggeun Kim <dg77.kim@...sung.com>, Greg KH <gregkh@...e.de>,
	Arnd Bergmann <arnd@...db.de>,
	Linus Walleij <linus.walleij@...aro.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Morten CHRISTIANSEN <morten.christiansen@...ricsson.com>,
	John Stultz <john.stultz@...aro.org>,
	Joerg Roedel <joerg.roedel@....com>
Subject: Re: [PATCH v5 5/5] Extcon: adc-jack driver to support 3.5 pi or
 simliar devices

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@...nsource.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.

> >> +     /* 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.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ