* [PATCH 1/2] iio: Add support for waveform output
@ 2014-11-26 21:45 George McCollister
2014-11-26 22:06 ` Lars-Peter Clausen
0 siblings, 1 reply; 3+ messages in thread
From: George McCollister @ 2014-11-26 21:45 UTC (permalink / raw)
Cc: Daniel Baluta, open list:STAGING SUBSYSTEM, Lars-Peter Clausen,
Reyad Attiyat, open list:IIO SUBSYSTEM AND..., Greg Kroah-Hartman,
Srinivas Pandruvada, open list, Harald Geyer, George McCollister,
Sebastian Reichel, Peter Meerwald, Hartmut Knaack,
open list:ABI/API, Jonathan Cameron
Output can be held high or low for a specified period of time.
Support for waveform capture could be added in the future.
Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++
drivers/iio/industrialio-core.c | 3 +++
drivers/staging/iio/Documentation/iio_event_monitor.c | 2 ++
include/linux/iio/types.h | 5 ++++-
4 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index d760b02..47df169 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1028,3 +1028,10 @@ Contact: linux-iio@vger.kernel.org
Description:
Raw value of rotation from true/magnetic north measured with
or without compensation from tilt sensors.
+
+What: /sys/bus/iio/devices/iio:deviceX/out_waveformY_hightime_raw
+What: /sys/bus/iio/devices/iio:deviceX/out_waveformY_lowtime_raw
+KernelVersion: 3.18
+Contact: linux-iio@vger.kernel.org
+Description:
+ Raw value of time for output to be held high or low.
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index af3e76d..343e784 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -70,6 +70,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_CCT] = "cct",
[IIO_PRESSURE] = "pressure",
[IIO_HUMIDITYRELATIVE] = "humidityrelative",
+ [IIO_WAVEFORM] = "waveform",
};
static const char * const iio_modifier_names[] = {
@@ -91,6 +92,8 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_NORTH_TRUE] = "from_north_true",
[IIO_MOD_NORTH_MAGN_TILT_COMP] = "from_north_magnetic_tilt_comp",
[IIO_MOD_NORTH_TRUE_TILT_COMP] = "from_north_true_tilt_comp",
+ [IIO_MOD_HIGHTIME] = "hightime",
+ [IIO_MOD_LOWTIME] = "lowtime",
};
/* relies on pairs of these shared then separate */
diff --git a/drivers/staging/iio/Documentation/iio_event_monitor.c b/drivers/staging/iio/Documentation/iio_event_monitor.c
index 569d6f8..690f261 100644
--- a/drivers/staging/iio/Documentation/iio_event_monitor.c
+++ b/drivers/staging/iio/Documentation/iio_event_monitor.c
@@ -49,6 +49,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_CCT] = "cct",
[IIO_PRESSURE] = "pressure",
[IIO_HUMIDITYRELATIVE] = "humidityrelative",
+ [IIO_WAVEFORM] = "waveform",
};
static const char * const iio_ev_type_text[] = {
@@ -108,6 +109,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_CCT:
case IIO_PRESSURE:
case IIO_HUMIDITYRELATIVE:
+ case IIO_WAVEFORM:
break;
default:
return false;
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
index 4a2af8a..d3b0af1 100644
--- a/include/linux/iio/types.h
+++ b/include/linux/iio/types.h
@@ -30,6 +30,7 @@ enum iio_chan_type {
IIO_CCT,
IIO_PRESSURE,
IIO_HUMIDITYRELATIVE,
+ IIO_WAVEFORM,
};
enum iio_modifier {
@@ -59,7 +60,9 @@ enum iio_modifier {
IIO_MOD_NORTH_MAGN,
IIO_MOD_NORTH_TRUE,
IIO_MOD_NORTH_MAGN_TILT_COMP,
- IIO_MOD_NORTH_TRUE_TILT_COMP
+ IIO_MOD_NORTH_TRUE_TILT_COMP,
+ IIO_MOD_HIGHTIME,
+ IIO_MOD_LOWTIME,
};
enum iio_event_type {
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] iio: Add support for waveform output
2014-11-26 21:45 [PATCH 1/2] iio: Add support for waveform output George McCollister
@ 2014-11-26 22:06 ` Lars-Peter Clausen
[not found] ` <CAFSKS=PdS7cLuHEKawKsQ-tePRg-t9Q8wDA5e51f1ejW91=N4A@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2014-11-26 22:06 UTC (permalink / raw)
To: George McCollister
Cc: Daniel Baluta, STAGING SUBSYSTEM, list, Reyad Attiyat,
open list:IIO SUBSYSTEM AND..., Greg Kroah-Hartman,
Hartmut Knaack, open list, Harald Geyer, Sebastian Reichel,
Peter Meerwald, Srinivas Pandruvada, open, ABI/API,
Jonathan Cameron
On 11/26/2014 10:45 PM, George McCollister wrote:
> Output can be held high or low for a specified period of time.
> Support for waveform capture could be added in the future.
>
That's a PWM device?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-01 19:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 21:45 [PATCH 1/2] iio: Add support for waveform output George McCollister
2014-11-26 22:06 ` Lars-Peter Clausen
[not found] ` <CAFSKS=PdS7cLuHEKawKsQ-tePRg-t9Q8wDA5e51f1ejW91=N4A@mail.gmail.com>
2014-12-01 19:56 ` Lars-Peter Clausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).