* [PATCH] iio: document missing elements
2012-08-26 12:43 [PATCH] iio: fix typos Peter Meerwald
@ 2012-08-26 12:43 ` Peter Meerwald
2012-08-28 19:41 ` Jonathan Cameron
2012-08-26 12:43 ` [PATCH] iio: whitespace cleanup and removal of semicolon after functions Peter Meerwald
2012-08-28 19:41 ` [PATCH] iio: fix typos Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: Peter Meerwald @ 2012-08-26 12:43 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Peter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
include/linux/iio/iio.h | 4 ++++
include/linux/iio/trigger.h | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index f323e7b..f966a7e 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -229,6 +229,7 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev,
* @indexed: Specify the channel has a numerical index. If not,
* the channel index number will be suppressed for sysfs
* attributes but not for event codes.
+ * @output: Channel is output.
* @differential: Channel is differential.
*/
struct iio_chan_spec {
@@ -312,6 +313,9 @@ struct iio_dev;
* Meaning is event dependent.
* @validate_trigger: function to validate the trigger when the
* current trigger gets changed.
+ * @update_scan_mode: function to configure device and scan buffer when
+ * channels have changed
+ * @debugfs_reg_access: function to read or write register value of device
**/
struct iio_info {
struct module *driver_module;
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index a981994..f0af267 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -39,7 +39,7 @@ struct iio_trigger_ops {
/**
* struct iio_trigger - industrial I/O trigger device
- *
+ * @ops: [DRIVER] operations structure
* @id: [INTERN] unique id number
* @name: [DRIVER] unique name
* @dev: [DRIVER] associated device (if relevant)
@@ -104,7 +104,8 @@ void iio_trigger_unregister(struct iio_trigger *trig_info);
/**
* iio_trigger_poll() - called on a trigger occurring
- * @trig: trigger which occurred
+ * @trig: trigger which occurred
+ * @time: timestamp when trigger occurred
*
* Typically called in relevant hardware interrupt handler.
**/
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] iio: document missing elements
2012-08-26 12:43 ` [PATCH] iio: document missing elements Peter Meerwald
@ 2012-08-28 19:41 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2012-08-28 19:41 UTC (permalink / raw)
To: Peter Meerwald; +Cc: Jonathan Cameron, linux-iio
On 08/26/2012 01:43 PM, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
merged to togreg branch
> ---
> include/linux/iio/iio.h | 4 ++++
> include/linux/iio/trigger.h | 5 +++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index f323e7b..f966a7e 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -229,6 +229,7 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev,
> * @indexed: Specify the channel has a numerical index. If not,
> * the channel index number will be suppressed for sysfs
> * attributes but not for event codes.
> + * @output: Channel is output.
> * @differential: Channel is differential.
> */
> struct iio_chan_spec {
> @@ -312,6 +313,9 @@ struct iio_dev;
> * Meaning is event dependent.
> * @validate_trigger: function to validate the trigger when the
> * current trigger gets changed.
> + * @update_scan_mode: function to configure device and scan buffer when
> + * channels have changed
> + * @debugfs_reg_access: function to read or write register value of device
> **/
> struct iio_info {
> struct module *driver_module;
> diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
> index a981994..f0af267 100644
> --- a/include/linux/iio/trigger.h
> +++ b/include/linux/iio/trigger.h
> @@ -39,7 +39,7 @@ struct iio_trigger_ops {
>
> /**
> * struct iio_trigger - industrial I/O trigger device
> - *
> + * @ops: [DRIVER] operations structure
> * @id: [INTERN] unique id number
> * @name: [DRIVER] unique name
> * @dev: [DRIVER] associated device (if relevant)
> @@ -104,7 +104,8 @@ void iio_trigger_unregister(struct iio_trigger *trig_info);
>
> /**
> * iio_trigger_poll() - called on a trigger occurring
> - * @trig: trigger which occurred
> + * @trig: trigger which occurred
> + * @time: timestamp when trigger occurred
> *
> * Typically called in relevant hardware interrupt handler.
> **/
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] iio: whitespace cleanup and removal of semicolon after functions
2012-08-26 12:43 [PATCH] iio: fix typos Peter Meerwald
2012-08-26 12:43 ` [PATCH] iio: document missing elements Peter Meerwald
@ 2012-08-26 12:43 ` Peter Meerwald
2012-08-28 19:42 ` Jonathan Cameron
2012-08-28 19:41 ` [PATCH] iio: fix typos Jonathan Cameron
2 siblings, 1 reply; 6+ messages in thread
From: Peter Meerwald @ 2012-08-26 12:43 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Peter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
drivers/iio/industrialio-buffer.c | 10 +++++-----
drivers/iio/industrialio-core.c | 2 +-
include/linux/iio/iio.h | 8 ++++----
include/linux/iio/trigger.h | 8 ++++----
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 4add9bb..774891c 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -422,7 +422,7 @@ ssize_t iio_buffer_store_enable(struct device *dev,
ret = indio_dev->setup_ops->preenable(indio_dev);
if (ret) {
printk(KERN_ERR
- "Buffer not started:"
+ "Buffer not started: "
"buffer preenable failed\n");
goto error_ret;
}
@@ -431,12 +431,12 @@ ssize_t iio_buffer_store_enable(struct device *dev,
ret = buffer->access->request_update(buffer);
if (ret) {
printk(KERN_INFO
- "Buffer not started:"
+ "Buffer not started: "
"buffer parameter update failed\n");
goto error_ret;
}
}
- /* Definitely possible for devices to support both of these.*/
+ /* Definitely possible for devices to support both of these. */
if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) {
if (!indio_dev->trig) {
printk(KERN_INFO
@@ -456,7 +456,7 @@ ssize_t iio_buffer_store_enable(struct device *dev,
ret = indio_dev->setup_ops->postenable(indio_dev);
if (ret) {
printk(KERN_INFO
- "Buffer not started:"
+ "Buffer not started: "
"postenable failed\n");
indio_dev->currentmode = previous_mode;
if (indio_dev->setup_ops->postdisable)
@@ -657,7 +657,7 @@ EXPORT_SYMBOL_GPL(iio_scan_mask_query);
/**
* struct iio_demux_table() - table describing demux memcpy ops
* @from: index to copy from
- * @to: index to copy to
+ * @to: index to copy to
* @length: how many bytes to copy
* @l: list head used for management
*/
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 47c1ffa..a288792 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -29,7 +29,7 @@
#include <linux/iio/sysfs.h>
#include <linux/iio/events.h>
-/* IDA to assign each registered device a unique id*/
+/* IDA to assign each registered device a unique id */
static DEFINE_IDA(iio_ida);
static dev_t iio_devt;
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index f966a7e..3530a0c 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -371,10 +371,10 @@ struct iio_info {
* scan mask is valid for the device.
*/
struct iio_buffer_setup_ops {
- int (*preenable)(struct iio_dev *);
- int (*postenable)(struct iio_dev *);
- int (*predisable)(struct iio_dev *);
- int (*postdisable)(struct iio_dev *);
+ int (*preenable)(struct iio_dev *);
+ int (*postenable)(struct iio_dev *);
+ int (*predisable)(struct iio_dev *);
+ int (*postdisable)(struct iio_dev *);
bool (*validate_scan_mask)(struct iio_dev *indio_dev,
const unsigned long *scan_mask);
};
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index f0af267..20239da 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -29,7 +29,7 @@ struct iio_subirq {
* instances of a given device.
**/
struct iio_trigger_ops {
- struct module *owner;
+ struct module *owner;
int (*set_trigger_state)(struct iio_trigger *trig, bool state);
int (*try_reenable)(struct iio_trigger *trig);
int (*validate_device)(struct iio_trigger *trig,
@@ -76,19 +76,19 @@ struct iio_trigger {
static inline struct iio_trigger *to_iio_trigger(struct device *d)
{
return container_of(d, struct iio_trigger, dev);
-};
+}
static inline void iio_trigger_put(struct iio_trigger *trig)
{
module_put(trig->ops->owner);
put_device(&trig->dev);
-};
+}
static inline void iio_trigger_get(struct iio_trigger *trig)
{
get_device(&trig->dev);
__module_get(trig->ops->owner);
-};
+}
/**
* iio_trigger_register() - register a trigger with the IIO core
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] iio: whitespace cleanup and removal of semicolon after functions
2012-08-26 12:43 ` [PATCH] iio: whitespace cleanup and removal of semicolon after functions Peter Meerwald
@ 2012-08-28 19:42 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2012-08-28 19:42 UTC (permalink / raw)
To: Peter Meerwald; +Cc: Jonathan Cameron, linux-iio
On 08/26/2012 01:43 PM, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
merged to togreg branch.
Thanks for this set Peter. Nice to clean up these bits and bobs!
> ---
> drivers/iio/industrialio-buffer.c | 10 +++++-----
> drivers/iio/industrialio-core.c | 2 +-
> include/linux/iio/iio.h | 8 ++++----
> include/linux/iio/trigger.h | 8 ++++----
> 4 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 4add9bb..774891c 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -422,7 +422,7 @@ ssize_t iio_buffer_store_enable(struct device *dev,
> ret = indio_dev->setup_ops->preenable(indio_dev);
> if (ret) {
> printk(KERN_ERR
> - "Buffer not started:"
> + "Buffer not started: "
> "buffer preenable failed\n");
> goto error_ret;
> }
> @@ -431,12 +431,12 @@ ssize_t iio_buffer_store_enable(struct device *dev,
> ret = buffer->access->request_update(buffer);
> if (ret) {
> printk(KERN_INFO
> - "Buffer not started:"
> + "Buffer not started: "
> "buffer parameter update failed\n");
> goto error_ret;
> }
> }
> - /* Definitely possible for devices to support both of these.*/
> + /* Definitely possible for devices to support both of these. */
> if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) {
> if (!indio_dev->trig) {
> printk(KERN_INFO
> @@ -456,7 +456,7 @@ ssize_t iio_buffer_store_enable(struct device *dev,
> ret = indio_dev->setup_ops->postenable(indio_dev);
> if (ret) {
> printk(KERN_INFO
> - "Buffer not started:"
> + "Buffer not started: "
> "postenable failed\n");
> indio_dev->currentmode = previous_mode;
> if (indio_dev->setup_ops->postdisable)
> @@ -657,7 +657,7 @@ EXPORT_SYMBOL_GPL(iio_scan_mask_query);
> /**
> * struct iio_demux_table() - table describing demux memcpy ops
> * @from: index to copy from
> - * @to: index to copy to
> + * @to: index to copy to
> * @length: how many bytes to copy
> * @l: list head used for management
> */
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 47c1ffa..a288792 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -29,7 +29,7 @@
> #include <linux/iio/sysfs.h>
> #include <linux/iio/events.h>
>
> -/* IDA to assign each registered device a unique id*/
> +/* IDA to assign each registered device a unique id */
> static DEFINE_IDA(iio_ida);
>
> static dev_t iio_devt;
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index f966a7e..3530a0c 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -371,10 +371,10 @@ struct iio_info {
> * scan mask is valid for the device.
> */
> struct iio_buffer_setup_ops {
> - int (*preenable)(struct iio_dev *);
> - int (*postenable)(struct iio_dev *);
> - int (*predisable)(struct iio_dev *);
> - int (*postdisable)(struct iio_dev *);
> + int (*preenable)(struct iio_dev *);
> + int (*postenable)(struct iio_dev *);
> + int (*predisable)(struct iio_dev *);
> + int (*postdisable)(struct iio_dev *);
> bool (*validate_scan_mask)(struct iio_dev *indio_dev,
> const unsigned long *scan_mask);
> };
> diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
> index f0af267..20239da 100644
> --- a/include/linux/iio/trigger.h
> +++ b/include/linux/iio/trigger.h
> @@ -29,7 +29,7 @@ struct iio_subirq {
> * instances of a given device.
> **/
> struct iio_trigger_ops {
> - struct module *owner;
> + struct module *owner;
> int (*set_trigger_state)(struct iio_trigger *trig, bool state);
> int (*try_reenable)(struct iio_trigger *trig);
> int (*validate_device)(struct iio_trigger *trig,
> @@ -76,19 +76,19 @@ struct iio_trigger {
> static inline struct iio_trigger *to_iio_trigger(struct device *d)
> {
> return container_of(d, struct iio_trigger, dev);
> -};
> +}
>
> static inline void iio_trigger_put(struct iio_trigger *trig)
> {
> module_put(trig->ops->owner);
> put_device(&trig->dev);
> -};
> +}
>
> static inline void iio_trigger_get(struct iio_trigger *trig)
> {
> get_device(&trig->dev);
> __module_get(trig->ops->owner);
> -};
> +}
>
> /**
> * iio_trigger_register() - register a trigger with the IIO core
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio: fix typos
2012-08-26 12:43 [PATCH] iio: fix typos Peter Meerwald
2012-08-26 12:43 ` [PATCH] iio: document missing elements Peter Meerwald
2012-08-26 12:43 ` [PATCH] iio: whitespace cleanup and removal of semicolon after functions Peter Meerwald
@ 2012-08-28 19:41 ` Jonathan Cameron
2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2012-08-28 19:41 UTC (permalink / raw)
To: Peter Meerwald; +Cc: Jonathan Cameron, linux-iio
On 08/26/2012 01:43 PM, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
merge to togreg branch.
> ---
> drivers/iio/industrialio-core.c | 2 +-
> include/linux/iio/iio.h | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 2ec266e..47c1ffa 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -729,7 +729,7 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev)
> attrcount = attrcount_orig;
> /*
> * New channel registration method - relies on the fact a group does
> - * not need to be initialized if it is name is NULL.
> + * not need to be initialized if its name is NULL.
> */
> if (indio_dev->channels)
> for (i = 0; i < indio_dev->num_channels; i++) {
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index be82936..f323e7b 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -164,7 +164,7 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev,
> * IIO_ENUM() - Initialize enum extended channel attribute
> * @_name: Attribute name
> * @_shared: Whether the attribute is shared between all channels
> - * @_e: Pointer to a iio_enum struct
> + * @_e: Pointer to an iio_enum struct
> *
> * This should usually be used together with IIO_ENUM_AVAILABLE()
> */
> @@ -180,9 +180,9 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev,
> /**
> * IIO_ENUM_AVAILABLE() - Initialize enum available extended channel attribute
> * @_name: Attribute name ("_available" will be appended to the name)
> - * @_e: Pointer to a iio_enum struct
> + * @_e: Pointer to an iio_enum struct
> *
> - * Creates a read only attribute which list all the available enum items in a
> + * Creates a read only attribute which lists all the available enum items in a
> * space separated list. This should usually be used together with IIO_ENUM()
> */
> #define IIO_ENUM_AVAILABLE(_name, _e) \
>
^ permalink raw reply [flat|nested] 6+ messages in thread