Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205887
b: refs/heads/master
c: 7b2c33b
h: refs/heads/master
i:
  205885: 982d9ab
  205883: 11b670b
  205879: c75690b
  205871: 167bd10
  205855: 843be15
  205823: 300cd0e
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent bc32ad5 commit 3f3cfb4
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 43 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3db00cc80cf01f9a2033c3f3eb03345d0024761
refs/heads/master: 7b2c33b11ef003d83c87a58201ff42313e13eff4
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/accel/adis16209_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ static struct attribute_group adis16209_scan_el_group = {
* adis16209_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void adis16209_poll_func_th(struct iio_dev *indio_dev)
static void adis16209_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct adis16209_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/iio/accel/adis16209_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static int adis16209_data_rdy_trig_poll(struct iio_dev *dev_info,
struct adis16209_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/accel/adis16240_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ static struct attribute_group adis16240_scan_el_group = {
* adis16240_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void adis16240_poll_func_th(struct iio_dev *indio_dev)
static void adis16240_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct adis16240_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/iio/accel/adis16240_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static int adis16240_data_rdy_trig_poll(struct iio_dev *dev_info,
struct adis16240_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/staging/iio/accel/lis3l02dq_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ static struct attribute_group lis3l02dq_scan_el_group = {
* lis3l02dq_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void lis3l02dq_poll_func_th(struct iio_dev *indio_dev)
static void lis3l02dq_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct lis3l02dq_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
struct lis3l02dq_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
/* Indicate that this interrupt is being handled */

Expand All @@ -128,8 +128,7 @@ static int lis3l02dq_data_rdy_trig_poll(struct iio_dev *dev_info,
struct lis3l02dq_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/adc/max1363_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int max1363_ring_preenable(struct iio_dev *indio_dev)
* then. Some triggers will generate their own time stamp. Currently
* there is no way of notifying them when no one cares.
**/
static void max1363_poll_func_th(struct iio_dev *indio_dev)
static void max1363_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct max1363_state *st = indio_dev->dev_data;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/gyro/adis16260_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ static struct attribute_group adis16260_scan_el_group = {
* adis16260_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void adis16260_poll_func_th(struct iio_dev *indio_dev)
static void adis16260_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct adis16260_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/iio/gyro/adis16260_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static int adis16260_data_rdy_trig_poll(struct iio_dev *dev_info,
struct adis16260_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/imu/adis16300_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ static struct attribute_group adis16300_scan_el_group = {
* adis16300_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void adis16300_poll_func_th(struct iio_dev *indio_dev)
static void adis16300_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct adis16300_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
/* Indicate that this interrupt is being handled */

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/iio/imu/adis16300_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static int adis16300_data_rdy_trig_poll(struct iio_dev *dev_info,
struct adis16300_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/imu/adis16350_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ static struct attribute_group adis16350_scan_el_group = {
* adis16350_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void adis16350_poll_func_th(struct iio_dev *indio_dev)
static void adis16350_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct adis16350_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/iio/imu/adis16350_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static int adis16350_data_rdy_trig_poll(struct iio_dev *dev_info,
struct adis16350_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/imu/adis16400_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ static struct attribute_group adis16400_scan_el_group = {
* adis16400_poll_func_th() top half interrupt handler called by trigger
* @private_data: iio_dev
**/
static void adis16400_poll_func_th(struct iio_dev *indio_dev)
static void adis16400_poll_func_th(struct iio_dev *indio_dev, s64 time)
{
struct adis16400_state *st = iio_dev_get_devdata(indio_dev);
st->last_timestamp = indio_dev->trig->timestamp;
st->last_timestamp = time;
schedule_work(&st->work_trigger_to_ring);
/* Indicate that this interrupt is being handled */

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/iio/imu/adis16400_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static int adis16400_data_rdy_trig_poll(struct iio_dev *dev_info,
struct adis16400_state *st = iio_dev_get_devdata(dev_info);
struct iio_trigger *trig = st->trig;

trig->timestamp = timestamp;
iio_trigger_poll(trig);
iio_trigger_poll(trig, timestamp);

return IRQ_HANDLED;
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/iio/industrialio-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct iio_trigger *iio_trigger_find_by_name(const char *name, size_t len)
}
EXPORT_SYMBOL(iio_trigger_find_by_name);

void iio_trigger_poll(struct iio_trigger *trig)
void iio_trigger_poll(struct iio_trigger *trig, s64 time)
{
struct iio_poll_func *pf_cursor;

Expand All @@ -184,7 +184,8 @@ void iio_trigger_poll(struct iio_trigger *trig)
}
list_for_each_entry(pf_cursor, &trig->pollfunc_list, list) {
if (pf_cursor->poll_func_main) {
pf_cursor->poll_func_main(pf_cursor->private_data);
pf_cursor->poll_func_main(pf_cursor->private_data,
time);
trig->use_count++;
}
}
Expand All @@ -197,8 +198,7 @@ void iio_trigger_notify_done(struct iio_trigger *trig)
if (trig->use_count == 0 && trig->try_reenable)
if (trig->try_reenable(trig)) {
/* Missed and interrupt so launch new poll now */
trig->timestamp = 0;
iio_trigger_poll(trig);
iio_trigger_poll(trig, 0);
}
}
EXPORT_SYMBOL(iio_trigger_notify_done);
Expand Down Expand Up @@ -400,7 +400,7 @@ EXPORT_SYMBOL(iio_device_unregister_trigger_consumer);

int iio_alloc_pollfunc(struct iio_dev *indio_dev,
void (*immediate)(struct iio_dev *indio_dev),
void (*main)(struct iio_dev *private_data))
void (*main)(struct iio_dev *private_data, s64 time))
{
indio_dev->pollfunc = kzalloc(sizeof(*indio_dev->pollfunc), GFP_KERNEL);
if (indio_dev->pollfunc == NULL)
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/staging/iio/trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* @pollfunc_list_lock: [INTERN] protection of the polling function list
* @pollfunc_list: [INTERN] list of functions to run on trigger.
* @control_attrs: [DRIVER] sysfs attributes relevant to trigger type
* @timestamp: [INTERN] timestamp usesd by some trigs (e.g. datardy)
* @owner: [DRIVER] used to monitor usage count of the trigger.
* @use_count: use count for the trigger
* @set_trigger_state: [DRIVER] switch on/off the trigger on demand
Expand All @@ -39,7 +38,6 @@ struct iio_trigger {
spinlock_t pollfunc_list_lock;
struct list_head pollfunc_list;
const struct attribute_group *control_attrs;
s64 timestamp;
struct module *owner;
int use_count;

Expand Down Expand Up @@ -120,7 +118,7 @@ int iio_trigger_dettach_poll_func(struct iio_trigger *trig,
*
* Typically called in relevant hardware interrupt handler.
**/
void iio_trigger_poll(struct iio_trigger *trig);
void iio_trigger_poll(struct iio_trigger *trig, s64 time);
void iio_trigger_notify_done(struct iio_trigger *trig);

/**
Expand All @@ -144,13 +142,13 @@ struct iio_poll_func {
struct list_head list;
void *private_data;
void (*poll_func_immediate)(struct iio_dev *indio_dev);
void (*poll_func_main)(struct iio_dev *private_data);
void (*poll_func_main)(struct iio_dev *private_data, s64 time);

};

int iio_alloc_pollfunc(struct iio_dev *indio_dev,
void (*immediate)(struct iio_dev *indio_dev),
void (*main)(struct iio_dev *private_data));
void (*main)(struct iio_dev *private_data, s64 time));

/*
* Two functions for common case where all that happens is a pollfunc
Expand All @@ -163,4 +161,8 @@ struct iio_trigger *iio_allocate_trigger(void);

void iio_free_trigger(struct iio_trigger *trig);


struct iio_simple_trigger {
struct iio_trigger trig;
};
#endif /* _IIO_TRIGGER_H_ */
3 changes: 2 additions & 1 deletion trunk/drivers/staging/iio/trigger/iio-trig-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ struct iio_gpio_trigger_info {

static irqreturn_t iio_gpio_trigger_poll(int irq, void *private)
{
iio_trigger_poll(private);
/* Timestamp not currently provided */
iio_trigger_poll(private, 0);
return IRQ_HANDLED;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static const struct attribute_group iio_trig_prtc_attr_group = {

static void iio_prtc_trigger_poll(void *private_data)
{
iio_trigger_poll(private_data);
/* Timestamp is not provided currently */
iio_trigger_poll(private_data, 0);
}

static int iio_trig_periodic_rtc_probe(struct platform_device *dev)
Expand Down

0 comments on commit 3f3cfb4

Please sign in to comment.