Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27b83242 authored by NeilBrown's avatar NeilBrown Committed by Jonathan Cameron
Browse files

iio:magnetometer:hmc5843 - add basic dt support



Compatible string, documenation and an optional gpio
for the dataready pin.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 8175bff5
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
* Honeywell HMC5843 magnetometer sensor

Required properties:

  - compatible : should be "honeywell,hmc5843"
  - reg : the I2C address of the magnetometer - typically 0x1e

Optional properties:

  - gpios : should be device tree identifier of the magnetometer DRDY pin

Example:

hmc5843@1e {
        compatible = "honeywell,hmc5843"
        reg = <0x1e>;
};
+7 −0
Original line number Diff line number Diff line
@@ -624,10 +624,17 @@ static const struct i2c_device_id hmc5843_id[] = {
};
MODULE_DEVICE_TABLE(i2c, hmc5843_id);

static const struct of_device_id hmc5843_of_match[] = {
	{ .compatible = "honeywell,hmc5843" },
	{}
};
MODULE_DEVICE_TABLE(of, hmc5843_of_match);

static struct i2c_driver hmc5843_driver = {
	.driver = {
		.name	= "hmc5843",
		.pm	= HMC5843_PM_OPS,
		.of_match_table = of_match_ptr(hmc5843_of_match),
	},
	.id_table	= hmc5843_id,
	.probe		= hmc5843_probe,