Re: lis3l02dq_core fails to compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

> > staging/iio/accel/lis3l02dq_core.c fails to compile when irq_to_gpio() is 
> > not available
> > 
> > the solution is to pass both, irq and gpio via platform data (e.g. as 
> > done by staging/iio/magnetometer/ak8975.c)?

> gpio_to_irq will always be available. While irq_to_gpio is deprecated. So it
> should work if you just pass the gpio.

so: pass gpio via platform data, and derive irq from that

> But looking at the driver it only seems to check if the IRQ is a valid GPIO,
> but never seems use the GPIO pin otherwise. Maybe I missed something, but
> I'd just remove the whole  gpio_is_valid(irq_to_gpio(spi->irq)) check.

the irq is used in lis3l02dq_ring.c (I should have pointed that out):

static int lis3l02dq_trig_try_reen(struct iio_trigger *trig)
...
		if (gpio_get_value(irq_to_gpio(st->us->irq)))

p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux