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-next>] [day] [month] [year] [list]
Message-Id: <1452960878-1727-1-git-send-email-mail@alexanderkoch.net>
Date:	Sat, 16 Jan 2016 17:14:35 +0100
From:	Alexander Koch <mail@...xanderkoch.net>
To:	jic23@...nel.org
Cc:	knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
	mhornung.linux@...il.com, dannenberg@...com, balbi@...com,
	fengguang.wu@...el.com, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Alexander Koch <mail@...xanderkoch.net>
Subject: [PATCH v2 0/3] iio: light: opt3001: Enable operation w/o IRQ

This patch series aims at enabling IRQ-less operation for the TI OPT3001 light
sensor.

The current version of the driver requires an interrupt line to be connected to
the INT pin of the sensor, through which the IIO framework gets notified about
readout values being ready. In the datasheet this is described as optional (sec.
8.1.1).

In my use case of the OPT3001 I do not have any interrupt lines or GPIOs
available to connect the INT pin to, so I have implemented an interrupt-less
operation mode that simply sleeps for the specified worst-case readout time
instead of waiting for the interrupt.

This change is transparent as interrupt-less operation mode is done only when no
valid interrupt no. is configured via device tree.

Patches are taken against linux-next/master, tested by compilation,
checkpatch.pl and by running on an embedded developer board (both IRQ-enabled
and IRQ-less mode).


Changes from v1:

 - use type bool for introduced member 'use_irq'
 - include trivial refactoring step that changes the types of two other members
   to bool, in order to match 'use_irq'


Alexander Koch (3):
  iio: light: opt3001: extract int. time constants
  iio: light: opt3001: trivial type refactoring
  iio: light: opt3001: enable operation w/o IRQ

 drivers/iio/light/opt3001.c | 156 ++++++++++++++++++++++++++++++--------------
 1 file changed, 106 insertions(+), 50 deletions(-)

-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ