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] [day] [month] [year] [list]
Message-ID: <CAEnQRZDKV2K6f0peVnJX-Q2Gcuq_2hER6G1cvCbUhrBkomotmQ@mail.gmail.com>
Date:	Mon, 25 Apr 2016 10:38:30 +0300
From:	Daniel Baluta <daniel.baluta@...el.com>
To:	Jonathan Cameron <jic23@...nel.org>
Cc:	Daniel Baluta <daniel.baluta@...el.com>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald-Stadler <pmeerw@...erw.net>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 0/3] Introduce support for creating IIO devices via configfs

On Sun, Apr 24, 2016 at 2:28 PM, Jonathan Cameron <jic23@...nel.org> wrote:
> On 20/04/16 16:45, Daniel Baluta wrote:
>> For testing purposes is nice to have a quick way of creating IIO devices.
>> This patch series introduces support for creating IIO devices via configs
>> (patch 1), allowing users to register "device types". For the moment we
>> support "dummy" device type (patch 2).
>>
>> This is just a RFC in order to see if the interface is acceptable. We also
>> need a way to create IIO devices with configurable number of channels.
>>
>> Patch 3 introduces configfs entries documentation for easier review.
>>
>> Daniel Baluta (3):
>>   iio: Add support for creating IIO devices via configfs
>>   iio: dummy: Convert IIO dummy to configfs
>>   Documentation: iio: Add IIO software devices docs
>>
>>  Documentation/ABI/testing/configfs-iio |  13 +++
>>  drivers/iio/Kconfig                    |   9 ++
>>  drivers/iio/Makefile                   |   1 +
>>  drivers/iio/dummy/iio_simple_dummy.c   |  98 ++++++------------
>>  drivers/iio/industrialio-sw-device.c   | 181 +++++++++++++++++++++++++++++++++
>>  include/linux/iio/sw_device.h          |  70 +++++++++++++
>>  6 files changed, 307 insertions(+), 65 deletions(-)
>>  create mode 100644 drivers/iio/industrialio-sw-device.c
>>  create mode 100644 include/linux/iio/sw_device.h
>>
> Sorry, I was a muppet and delete patch one due to a misstap on my phone...
> Anyhow, pasting it in here to review...
>
>> This is similar with support for creating triggers via configfs.
>> Devices will be hosted under:
>>       * /config/iio/devices
>>
>> We allow users to register "device types" under:
>>       * /config/iio/devices/<device_types>/
>>
>> Signed-off-by: Daniel Baluta <daniel.baluta@...el.com>
> As you observed, there is room in here to share some code with the sw-trigger
> support.  Looks like we are going to have an iio-configfs helper library
> or perhaps just move them into the industrialio-configfs module...
>
> However, I'm not sure it's actually a good idea.  Seems to me that the amount
> of fiddly indirection needed would outway the advantages in reduced code
> replication.
>
> Other than a few nitpicks this looks good to me - though that's not surprising
> as it's a find and replace job on the trigger version!

Yes, I think we can live with the code as it is now.

I'm now thinking of a more flexibly interface, that will allow us creating an
IIO devices with configurable number and types of IIO channels.

This will be later useful in evaluating the choices for sensor hubs with lots
of sensors attached:

Single IIO device for all sensors VS One IIO device per sensor type.

Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ