mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Hartley Sweeten <HartleyS@visionengravers.com>,
	"driverdev-devel@linuxdriverproject.org" 
	<driverdev-devel@linuxdriverproject.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] staging: comedi: per-file read/write subdevice choice
Date: Wed, 05 Nov 2014 09:48:49 +0000	[thread overview]
Message-ID: <5459F281.2010302@mev.co.uk> (raw)
In-Reply-To: <DC148C5AA1CEBA4E87973D432B1C2D8826023C34@P3PWEX4MB008.ex4.secureserver.net>

On 04/11/2014 18:44, Hartley Sweeten wrote:
> On Tuesday, November 04, 2014 11:09 AM, Ian Abbott wrote:
>> This series of patches adds a couple of ioctl codes to the Comedi core
>> to allow the current "read" and "write" subdevice to be changed after
>> opening the comedi device.  The current read and write subdevice
>> information is stored in file private data allocated for the lifetime of
>> the file object, so the notion of current "read" and "write" subdevice
>> is local to the file object and does not alter anything in the main
>> control structure for the comedi device.  An extra level of indirection
>> is now required to access the main control structure.
>>
>> I've tested the multiple "read" subdevice case using a modified version
>> of the "comedi_test" module (modifying it to clone the existing AI
>> subdevice), and a modified version of the "comedi_test" application
>> (part of the "comedilib" installation) modified to use the new ioctls.
>> There isn't any support in comedilib itself yet.
>>
>> 1) staging: comedi: prepare support for per-file read and write
>>     subdevices
>> 2) staging: comedi: add ioctls to set per-file read and write subdevice
>>
>>   drivers/staging/comedi/comedi.h          |   2 +
>>   drivers/staging/comedi/comedi_compat32.c |   2 +
>>   drivers/staging/comedi/comedi_fops.c     | 217 +++++++++++++++++++++++++++----
>>   3 files changed, 196 insertions(+), 25 deletions(-)
>
> Ian,
>
> If I understand this correctly, the user can now open the "comediX"
> device which will give then access to the default dev->read_subdev
> and dev->write_subdev. They can then use the new ioctls to change
> the read/write subdevice and use them without having the open the
> "comediX_subdY" devices.
>
> If this is correct it seems like a good idea.

That's correct.

> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Thanks for the review!

> Also, does this mean we can get rid of comedi_alloc_subdevice_minor()
> and the "comediX_sudbY" stuff?

That would be a bit premature at this stage.  Maybe in a year or two.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

      reply	other threads:[~2014-11-05  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 18:08 Ian Abbott
2014-11-04 18:09 ` [PATCH 1/2] staging: comedi: prepare support for per-file read and write subdevices Ian Abbott
2014-11-04 18:09 ` [PATCH 2/2] staging: comedi: add ioctls to set per-file read and write subdevice Ian Abbott
2014-11-04 18:44 ` [PATCH 0/2] staging: comedi: per-file read/write subdevice choice Hartley Sweeten
2014-11-05  9:48   ` Ian Abbott [this message]

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=5459F281.2010302@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=HartleyS@visionengravers.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®