[RFC] staging: iio: isl29018: use regmap to retrieve struct device

2016-02-22 Thread Alison Schofield
Remove struct device from drivers global data and use regmap API to retrieve device info instead. This replacement can be done for drivers that include regmap in their global data. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- drivers/staging/iio/light/isl29018.

[RFC PATCH 0/2] iio: introduce iio_{claim|release}_direct_mode()

2016-03-01 Thread Alison Schofield
and rejected this option because a) not sure other modes would ever need to be locked, and b) the semantic improvement is less when it is generalized. This patchset was inspired by a discussion on linux-iio: http://www.spinics.net/lists/linux-iio/msg18540.html Alison Schofield (2): iio: core

[RFC PATCH 2/2] staging: iio: adc7192: use iio_{claim|release}_direct_mode()

2016-03-01 Thread Alison Schofield
Replace the code that guarantees the device stays in direct mode with iio_{claim|release}_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- drivers/staging/iio/adc/ad7192.c | 24 +--- 1 file changed, 9 insertions(+), 15 del

[RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-01 Thread Alison Schofield
. iio_release_direct_mode() Release the claim. Device is no longer guaranteed to stay in direct mode. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- drivers/iio/industrialio-core.c | 39 +++ include/linux/iio/iio.h | 2 ++ 2

[RFC PATCH v2 1/2] iio: core: implement iio_device_{claim|release}_direct_mode()

2016-03-09 Thread Alison Schofield
. iio_device_release_direct_mode() Release the claim. Device is no longer guaranteed to stay in direct mode. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- drivers/iio/industrialio-core.c | 39 +++ include/linux/iio

[RFC PATCH v2 2/2] staging: iio: ad7192: use iio_device_{claim|release}_direct_mode()

2016-03-09 Thread Alison Schofield
Replace the code that guarantees the device stays in direct mode with iio_device_{claim|release}_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- drivers/staging/iio/adc/ad7192.c | 24 +--- 1 file changed, 9 insertions(+), 15 del

Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-09 Thread Alison Schofield
On Sat, Mar 05, 2016 at 06:02:36PM +, Jonathan Cameron wrote: > On 02/03/16 13:28, Lars-Peter Clausen wrote: > > On 03/01/2016 08:02 PM, Alison Schofield wrote: > >> It is often the case that the driver wants to be sure a device stays > >> in direct mode while it is

[RFC PATCH v2 0/2] iio: introduce iio_device_{claim|release}_direct_mode()

2016-03-09 Thread Alison Schofield
for new functions o replace EINVAL with EBUSY on failure to claim direct mode o update commit msg & changelog to reflect new prefix Alison Schofield (2): iio: core: implement iio_device_{claim|release}_direct_mode() staging: iio: ad7192: use iio_device_{claim|release}_direct_mode() dri

Re: [PATCH] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-05 Thread Alison Schofield
On Sun, Apr 03, 2016 at 10:09:13AM +0100, Jonathan Cameron wrote: > On 01/04/16 17:53, Alison Schofield wrote: > > Two instances are moved to the new claim/release API: > > > > In the first instance, the driver was using mlock followed by > > iio_buffer_enabled(). Rep

[PATCH v2] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-05 Thread Alison Schofield
Replace the code that guarantees the device stays in direct mode with iio_device_{claim|release}_direct_mode() which does same. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- Changed in v2: - removed improper application of claim/release from intr handler - updated cha

[PATCH] staging: wilc1000: move initialization of the config values

2016-04-07 Thread Alison Schofield
it, then the lock isn't needed. If another thread can get it, it could find it before the mutex is initialized. Make it safe and simple by setting the config values and initializing their mutex before the kthread is started. No lock/unlock needed. Signed-off-by: Alison Schofield <amsfiel...@gmail.

[PATCH] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-01 Thread Alison Schofield
was not using mlock to hold the device in direct mode, but should have been. Here we introduce the new API to guarantee direct mode. This is a change in driver behavior. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- drivers/staging/iio/adc/ad7606_core.c | 15 ---

Re: [PATCH] iio: trigger: free trigger resource correctly

2017-01-18 Thread Alison Schofield
On Wed, Jan 18, 2017 at 12:56:29PM +0300, Dan Carpenter wrote: > On Tue, Jan 17, 2017 at 07:00:28PM -0800, Alison Schofield wrote: > > Using iio_trigger_put() to free a trigger leads to release of > > a resource we never held. Replace with iio_trigger_free(). > > They'

[PATCH] iio: trigger: free trigger resource correctly

2017-01-17 Thread Alison Schofield
Using iio_trigger_put() to free a trigger leads to release of a resource we never held. Replace with iio_trigger_free(). Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- Patches to use devm_* funcs are ready to follow this for the interrupt & bfin-timer triggers. drivers/i

[PATCH v2] iio: trigger: free trigger resource correctly

2017-01-19 Thread Alison Schofield
so rare). Tested with the sysfs trigger driver. The bfin & interrupt drivers were build tested & inspected only. Signed-off-by: Alison Schofield <amsfiel...@gmail.com> --- Changes in v2: Renamed probe jump label to say free instead of put. Added further explanation to commit log.

Re: [Outreachy kernel] [PATCH 0/2] IIO coding tasks

2017-03-21 Thread Alison Schofield
On Tue, Mar 21, 2017 at 10:52:46PM +0530, Arushi Singhal wrote: > On Tue, Mar 21, 2017 at 10:32 PM, Alison Schofield <amsfiel...@gmail.com> > wrote: > > > On Tue, Mar 21, 2017 at 05:39:38PM +0100, Julia Lawall wrote: > > > > > > > >

Re: [Outreachy kernel] [PATCH v6] staging: Use buf_lock instead of mlock and Refactor code

2017-03-21 Thread Alison Schofield
On Tue, Mar 21, 2017 at 10:34:01PM +0530, SIMRAN SINGHAL wrote: > On Tue, Mar 21, 2017 at 10:18 PM, Alison Schofield <amsfiel...@gmail.com> > wrote: > > On Mon, Mar 20, 2017 at 01:36:21AM +0530, simran singhal wrote: > > > > Hi Simran, > > > > I going t

Re: [Outreachy kernel] [PATCH v3 0/2] Replace mlock with private lock and delete whitespaces

2017-03-21 Thread Alison Schofield
On Tue, Mar 21, 2017 at 11:33:54PM +0530, simran singhal wrote: > The patch series replaces mlock with a private lock for driver ad9834 and > Fix coding style issues related to white spaces. Hi Simran, I'm getting lost. Patchset Subject Line needs subsystem and driver. The comment above says

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-28 Thread Alison Schofield
On Tue, Mar 28, 2017 at 10:55:17PM +0530, SIMRAN SINGHAL wrote: > On Fri, Mar 24, 2017 at 12:51 AM, Alison Schofield <amsfiel...@gmail.com> > wrote: > > On Fri, Mar 24, 2017 at 12:05:20AM +0530, simran singhal wrote: > >> The IIO subsystem is redefining iio_dev->ml

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-23 Thread Alison Schofield
On Fri, Mar 24, 2017 at 12:05:20AM +0530, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used

Re: [Outreachy kernel] [PATCH 1/6] staging: wlan-ng: Fix sparse warning of restricted __le16

2017-03-02 Thread Alison Schofield
On Thu, Mar 02, 2017 at 12:14:40PM +0100, Julia Lawall wrote: > > > On Thu, 2 Mar 2017, SIMRAN SINGHAL wrote: > > > On Thu, Mar 2, 2017 at 3:20 PM, Julia Lawall wrote: > > > > > > > > > On Thu, 2 Mar 2017, Julia Lawall wrote: > > > > > >> > > >> > > >> On Thu, 2 Mar 2017,

Re: [Outreachy kernel] [PATCH v2] staging: speakup: Comparison to NULL could be written

2017-03-02 Thread Alison Schofield
On Thu, Mar 02, 2017 at 02:13:02PM +0530, Arushi Singhal wrote: > Fixed coding style for null comparisons in speakup driver to be more > consistant with the rest of the kernel coding style. > > Signed-off-by: Arushi Singhal > --- > changes in v2 > - fixed

Re: [Outreachy kernel] [PATCH 1/4] staging: speakup: Placed Logical on the previous line

2017-03-02 Thread Alison Schofield
On Thu, Mar 02, 2017 at 09:05:57PM +0530, Arushi Singhal wrote: > Placed Logical continuations on the previous line as reported by > checkpatch.pl. > > Signed-off-by: Arushi Singhal Hi Arushi, I'm not seeing the patch cover letter for this one. That would be

Re: [Outreachy kernel] [PATCH] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-12 Thread Alison Schofield
On Sun, Mar 12, 2017 at 06:40:52PM +0530, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used

Re: [Outreachy kernel] [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-12 Thread Alison Schofield
On Sun, Mar 12, 2017 at 07:02:50PM +0530, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used

Re: [Outreachy kernel] [PATCH] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-12 Thread Alison Schofield
On Sun, Mar 12, 2017 at 06:40:52PM +0530, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used

Re: [Outreachy kernel] [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-12 Thread Alison Schofield
On Mon, Mar 13, 2017 at 09:28:34AM +0530, SIMRAN SINGHAL wrote: > On Mon, Mar 13, 2017 at 12:03 AM, Alison Schofield <amsfiel...@gmail.com> > wrote: > > On Sun, Mar 12, 2017 at 07:02:50PM +0530, simran singhal wrote: > >> The IIO subsystem is redefining iio_dev->ml

Re: [Outreachy kernel] [PATCH v3] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-13 Thread Alison Schofield
On Mon, Mar 13, 2017 at 11:41:30PM +0530, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used

Re: [Outreachy kernel] [PATCH v2] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread Alison Schofield
On Mon, Mar 13, 2017 at 10:01:07PM +0530, simran singhal wrote: > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core only for protecting device operating mode changes. > ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. > > In this driver, mlock was being used

Re: [Outreachy kernel] Re: [PATCH v2 4/6] staging: fbtft: Fix sparse warnings of incorrect type in assignment

2017-03-04 Thread Alison Schofield
On Thu, Mar 02, 2017 at 02:26:37PM +0100, Noralf Trønnes wrote: > > Den 02.03.2017 14.04, skrev simran singhal: > >This patch fixes the following sparse warnings: > > > >drivers/staging/fbtft/fbtft-bus.c:166:36: warning: incorrect type in > >assignment (different base types) >

Re: [Outreachy kernel] [PATCH] staging: media: Remove unnecessary function and its call

2017-03-05 Thread Alison Schofield
On Sun, Mar 05, 2017 at 12:17:21PM +0530, simran singhal wrote: > The function atomisp_set_stop_timeout on being called, simply returns > back. The function hasn't been mentioned in the TODO and doesn't have > FIXME code around. Hence, atomisp_set_stop_timeout and its calls have been > removed. >

Re: [Outreachy kernel] [PATCH v2] staging: speakup: Comparison to NULL could be written

2017-03-02 Thread Alison Schofield
On Thu, Mar 02, 2017 at 08:37:21AM -0800, Alison Schofield wrote: > On Thu, Mar 02, 2017 at 02:13:02PM +0530, Arushi Singhal wrote: > > Fixed coding style for null comparisons in speakup driver to be more > > consistant with the rest of the kernel coding style. > > >

Re: [Outreachy kernel] [PATCH 0/2] IIO coding tasks

2017-03-21 Thread Alison Schofield
On Tue, Mar 21, 2017 at 05:39:38PM +0100, Julia Lawall wrote: > > > On Tue, 21 Mar 2017, Arushi Singhal wrote: > > > On Tue, Mar 21, 2017 at 9:33 PM, Alison Schofield <amsfiel...@gmail.com> > > wrote: > > On Tue, Mar 21, 2017 at 07

Re: [Outreachy kernel] [PATCH 0/2] IIO coding tasks

2017-03-21 Thread Alison Schofield
On Tue, Mar 21, 2017 at 07:00:17PM +0530, Arushi Singhal wrote: > Patchseries of IIO coding tasks This wouldn't be a patchset. Although they touch the same driver, the changes are unrelated. See more below... > > Arushi Singhal (2): > staging: ad7759: Replace mlock with driver private lock

Re: [Outreachy kernel] [PATCH v6] staging: Use buf_lock instead of mlock and Refactor code

2017-03-21 Thread Alison Schofield
On Mon, Mar 20, 2017 at 01:36:21AM +0530, simran singhal wrote: Hi Simran, I going to ask for a v7 without looking at the code ;) Subject line needs subsystem and driver. Subject and log message can be improved. > The IIO subsystem is redefining iio_dev->mlock to be used by > the IIO core