Add driver for Domintech DMARD06 accelerometer
Subsystems (2)
v2 cover Add driver for Domintech DMARD06 accelerometer
This patch series adds driver for Domintech DMARD05, DMARD06 and DMARD07 accelerometers and vendor prefix for Domintech Co., Ltd.
Changes since v1:
- Add Rob's Acked-by to vendor-prefix bindings
- Remove dmard06_i2c_read function, use i2c_smbus_read_byte_data instead
- Remove dmard06_read_chip_id function, check chip id directly on probe
- Use sign_extend32 in dmard06_read_raw function
- Replace error variable with ret
- Remove unnecessary messages
- Fix typo in documentation bindings
- Add support for DMARD05 and DMARD07 chips
- Add PM ops
Aleksei Mamlin (2):
devicetree: bindings: Add vendor prefix for Domintech Co., Ltd.
iio: accel: Add support for Domintech DMARD06 accelerometer
.../devicetree/bindings/iio/accel/dmard06.txt | 19 ++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/iio/accel/Kconfig | 11 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/dmard06.c | 241 +++++++++++++++++++++ 5 files changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel/dmard06.txt create mode 100644 drivers/iio/accel/dmard06.c
Signature · 6 lines
2.7.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/2 devicetree: bindings: Add vendor prefix for Domintech Co., Ltd.
Add vendor-prefix for Domintech Co., Ltd.
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -75,6 +75,7 @@ digilent Diglent, Inc. dlg Dialog Semiconductor dlink D-Link Corporation dmo Data Modul AG +domintech Domintech Co., Ltd. dptechnics DPTechnics dragino Dragino Technology Co., Limited ea Embedded Artists AB
Signature · 6 lines
2.7.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] devicetree: bindings: Add vendor prefix for Domintech Co., Ltd.
Quoted 4 lines · Aleksei Mamlin
Add vendor-prefix for Domintech Co., Ltd.
Signed-off-by Aleksei Mamlin <[email protected]>Acked-by Rob Herring <[email protected]>
Applied to the togreg branch of iio.git
Thanks
Jonathan
Quoted 10 lines
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/vendor-prefixes.txt +0
-0
Documentation/devicetree/bindings/vendor-prefixes.txt digilent Diglent, Inc. · line 81
Quoted 7 lines
Documentation/devicetree/bindings/vendor-prefixes.txt +1
-0@@ -75,6 +75,7 @@ digilent Diglent, Inc. dlg Dialog Semiconductor dlink D-Link Corporation dmo Data Modul AG +domintech Domintech Co., Ltd. dptechnics DPTechnics dragino Dragino Technology Co., Limited ea Embedded Artists AB
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 2/2 iio: accel: Add support for Domintech DMARD06 accelerometer
In reply to Aleksei MamlinThis patch add support for Domintech DMARD05, DMARD06 and DMARD07 accelerometers.
--- .../devicetree/bindings/iio/accel/dmard06.txt | 19 ++ drivers/iio/accel/Kconfig | 11 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/dmard06.c | 241 +++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel/dmard06.txt create mode 100644 drivers/iio/accel/dmard06.c
Documentation/devicetree/bindings/iio/accel/dmard06.txt new file +19 -0
@@ -0,0 +1,19 @@ +Device tree bindings for Domintech DMARD05, DMARD06, DMARD07 accelerometers + +Required properties: + - compatible : Should be "domintech,dmard05" + or "domintech,dmard06" + or "domintech,dmard07" + - reg : I2C address of the chip. Should be 0x1c + +Example: + &i2c1 { + /* ... */ + + accelerometer@1c { + compatible = "domintech,dmard06"; + reg = <0x1c>; + }; + + /* ... */ + };
drivers/iio/accel/Kconfig +11 -0
@@ -50,6 +50,17 @@ config BMC150_ACCEL_SPI tristate select REGMAP_SPI +config DMARD06 + tristate "Domintech DMARD06 Digital Accelerometer Driver" + depends on OF || COMPILE_TEST + depends on I2C + help + Say yes here to build support for the Domintech low-g tri-axial + digital accelerometers: DMARD05, DMARD06, DMARD07. + + To compile this driver as a module, choose M here: the + module will be called dmard06. + config HID_SENSOR_ACCEL_3D depends on HID_SENSOR_HUB select IIO_BUFFER
drivers/iio/accel/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_BMA220) += bma220_spi.o obj-$(CONFIG_BMC150_ACCEL) += bmc150-accel-core.o obj-$(CONFIG_BMC150_ACCEL_I2C) += bmc150-accel-i2c.o obj-$(CONFIG_BMC150_ACCEL_SPI) += bmc150-accel-spi.o +obj-$(CONFIG_DMARD06) += dmard06.o obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o obj-$(CONFIG_KXCJK1013) += kxcjk-1013.o obj-$(CONFIG_KXSD9) += kxsd9.o
drivers/iio/accel/dmard06.c new file +241 -0
241 lines not on this page · raw message
Signature · 1 line
2.7.3
Re: [PATCH v2 2/2] iio: accel: Add support for Domintech DMARD06 accelerometer
Quoted 6 lines · Aleksei Mamlin
This patch add support for Domintech DMARD05, DMARD06 and DMARD07 accelerometers.
Signed-off-by Aleksei Mamlin <[email protected]>--- .../devicetree/bindings/iio/accel/dmard06.txt | 19 ++
This could go into trivial-devices.txt, but this is fine too:
Quoted 6 lines
drivers/iio/accel/Kconfig | 11 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/dmard06.c | 241 +++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel/dmard06.txt create mode 100644 drivers/iio/accel/dmard06.c
Re: [PATCH v2 2/2] iio: accel: Add support for Domintech DMARD06 accelerometer
Quoted 11 lines · Rob Herring
Quoted 6 lines · Aleksei Mamlin
This patch add support for Domintech DMARD05, DMARD06 and DMARD07 accelerometers.
Signed-off-by Aleksei Mamlin <[email protected]>--- .../devicetree/bindings/iio/accel/dmard06.txt | 19 ++This could go into trivial-devices.txt, but this is fine too:
Acked-by Rob Herring <[email protected]>
Applied to the togreg branch of iio.git - initially pushed out as test for the autobuilders to play with it.
Nice compact little driver.
Thanks,
Jonathan
Quoted 7 lines
Quoted 7 lines
drivers/iio/accel/Kconfig | 11 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/dmard06.c | 241 +++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel/dmard06.txt create mode 100644 drivers/iio/accel/dmard06.c
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html