1
0
Fork 0
Commit Graph

4 Commits (69468320a94d55ec219eaf629d6774d753a9eb99)

Author SHA1 Message Date
Wei Yongjun 752d01d990 iio: common: ssp_sensors: gyro: use devm_iio_device_register()
Use devm_iio_device_register() for IIO subsystem device
registration and delete the remove function since there
is no need after this change.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-01-28 12:16:17 +00:00
Jonathan Cameron 8abd5ba539 iio:kfifo_buf header include push down.
As a precursor to splitting buffer.h, lets make sure all drivers
include the relevant headers rather than relying on picking them
up from kfifo_buf.h.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
2017-01-10 19:54:53 +00:00
Julia Lawall becf05e748 iio: common: ssp_sensors: gyro: constify iio_info structures
Check for iio_info structures that are only stored in the info field of a
iio_dev structure.  This field is declared const, so iio_info structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct iio_info i@p = { ... };

@ok@
identifier r.i;
struct iio_dev e;
position p;
@@
e.info = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct iio_info e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct iio_info i = { ... };
// </smpl>

The result of size on this file before the change is:
   text	      data     bss     dec         hex	  filename
   1245        344       0    1589         635
   drivers/iio/gyro/ssp_gyro_sensor.o

and after the change it is:
   text	     data        bss	    dec	    hex	filename
   1397       192          0       1589     635
   drivers/iio/gyro/ssp_gyro_sensor.o

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-18 11:59:51 +01:00
Karol Wrona a9afcaa69f iio: common: ssp_sensors: Add sensorhub gyroscope sensor
This patch adds gyroscope iio driver which uses sensorhub as data
provider.

Signed-off-by: Karol Wrona <k.wrona@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-29 18:49:56 +00:00