Skip to contentSkip to conversation

iio - add support for digital barometer devices

RFC In review Matthias Brugger 2 participants 2 messages Oct 14, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC 1/2 iio - add support for digital barometer devices

---
 drivers/staging/iio/Kconfig            |    1 +
 drivers/staging/iio/Makefile           |    1 +
 drivers/staging/iio/barometer/Kconfig  |    5 +++++
 drivers/staging/iio/barometer/Makefile |    4 ++++
 drivers/staging/iio/barometer/baro.h   |    8 ++++++++
 5 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/iio/barometer/Kconfig
 create mode 100644 drivers/staging/iio/barometer/Makefile
 create mode 100644 drivers/staging/iio/barometer/baro.h
drivers/staging/iio/Kconfig +1 -0
index ed48815..d5ca09a 100644
@@ -46,6 +46,7 @@ source "drivers/staging/iio/gyro/Kconfig"
 source "drivers/staging/iio/imu/Kconfig"
 source "drivers/staging/iio/light/Kconfig"
 source "drivers/staging/iio/magnetometer/Kconfig"
+source "drivers/staging/iio/barometer/Kconfig"
 
 source "drivers/staging/iio/trigger/Kconfig"
 
drivers/staging/iio/Makefile +1 -0
index e909674..73112b2 100644
@@ -16,3 +16,4 @@ obj-y += imu/
 obj-y += light/
 obj-y += trigger/
 obj-y += magnetometer/
+obj-y += barometer/
drivers/staging/iio/barometer/Kconfig new file +5 -0
new file mode 100644
index 0000000..588325c
@@ -0,0 +1,5 @@
+#
+# IIO Digital Barometer Sensor drivers configuration
+#
+comment "Digital barometer sensors"
+
drivers/staging/iio/barometer/Makefile new file +4 -0
new file mode 100644
index 0000000..2963d72
@@ -0,0 +1,4 @@
+#
+# Makefile for digital gyroscope sensor drivers
+#
+
drivers/staging/iio/barometer/baro.h new file +8 -0
new file mode 100644
index 0000000..e3b73a1
@@ -0,0 +1,8 @@
+
+#include "../sysfs.h"
+
+/* Barometer types of attribute */
+
+#define IIO_DEV_ATTR_BARO_PRESSURE(_mode, _show, _store, _addr)	\
+	IIO_DEVICE_ATTR(baro_pressure, _mode, _show, NULL, _addr)
+
Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 28 lines · Matthias Brugger
---
 drivers/staging/iio/Kconfig            |    1 +
 drivers/staging/iio/Makefile           |    1 +
 drivers/staging/iio/barometer/Kconfig  |    5 +++++
 drivers/staging/iio/barometer/Makefile |    4 ++++
 drivers/staging/iio/barometer/baro.h   |    8 ++++++++
 5 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/iio/barometer/Kconfig
 create mode 100644 drivers/staging/iio/barometer/Makefile
 create mode 100644 drivers/staging/iio/barometer/baro.h
drivers/staging/iio/Kconfig +1 -0
index ed48815..d5ca09a 100644
@@ -46,6 +46,7 @@ source "drivers/staging/iio/gyro/Kconfig"
 source "drivers/staging/iio/imu/Kconfig"
 source "drivers/staging/iio/light/Kconfig"
 source "drivers/staging/iio/magnetometer/Kconfig"
+source "drivers/staging/iio/barometer/Kconfig"
 
 source "drivers/staging/iio/trigger/Kconfig"
 
drivers/staging/iio/Makefile +0 -0
index e909674..73112b2 100644

drivers/staging/iio/Makefile obj-y += imu/ · line 19

Quoted 4 lines
drivers/staging/iio/Makefile +1 -0
@@ -16,3 +16,4 @@ obj-y += imu/
 obj-y += light/
 obj-y += trigger/
 obj-y += magnetometer/
+obj-y += barometer/

One for me to fix, but we should probably put these in alphabetical order. Tends to make for fewer merge conflicts than adding new ones at the end.

Quoted 17 lines
drivers/staging/iio/barometer/Kconfig new file +5 -0
new file mode 100644
index 0000000..588325c
@@ -0,0 +1,5 @@
+#
+# IIO Digital Barometer Sensor drivers configuration
+#
+comment "Digital barometer sensors"
+
drivers/staging/iio/barometer/Makefile new file +0 -0
new file mode 100644
index 0000000..2963d72

drivers/staging/iio/barometer/Makefile line 2

Quoted 2 lines
drivers/staging/iio/barometer/Makefile new file +2 -0
@@ -0,0 +1,4 @@
+#
+# Makefile for digital gyroscope sensor drivers

You are going to want to change that comment :)

Quoted 8 lines
drivers/staging/iio/barometer/Makefile new file +2 -0
+#
+
drivers/staging/iio/barometer/baro.h new file +0 -0
new file mode 100644
index 0000000..e3b73a1

drivers/staging/iio/barometer/baro.h line 8

Quoted 8 lines
drivers/staging/iio/barometer/baro.h new file +8 -0
@@ -0,0 +1,8 @@
+
+#include "../sysfs.h"
+
+/* Barometer types of attribute */
+
+#define IIO_DEV_ATTR_BARO_PRESSURE(_mode, _show, _store, _addr)	\
+	IIO_DEVICE_ATTR(baro_pressure, _mode, _show, NULL, _addr)
+

It think I recall the fact that Kconfig has issues with empty Makefiles, so this will need to be merged into your second patch. This stuff always goes in with the first driver to need it.