Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio:magnetometer:hmc5843 - add basic dt support

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

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

NeilBrown and committed by
Jonathan Cameron
27b83242 8175bff5

+24
+17
Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
··· 1 + * Honeywell HMC5843 magnetometer sensor 2 + 3 + Required properties: 4 + 5 + - compatible : should be "honeywell,hmc5843" 6 + - reg : the I2C address of the magnetometer - typically 0x1e 7 + 8 + Optional properties: 9 + 10 + - gpios : should be device tree identifier of the magnetometer DRDY pin 11 + 12 + Example: 13 + 14 + hmc5843@1e { 15 + compatible = "honeywell,hmc5843" 16 + reg = <0x1e>; 17 + };
+7
drivers/staging/iio/magnetometer/hmc5843.c
··· 624 624 }; 625 625 MODULE_DEVICE_TABLE(i2c, hmc5843_id); 626 626 627 + static const struct of_device_id hmc5843_of_match[] = { 628 + { .compatible = "honeywell,hmc5843" }, 629 + {} 630 + }; 631 + MODULE_DEVICE_TABLE(of, hmc5843_of_match); 632 + 627 633 static struct i2c_driver hmc5843_driver = { 628 634 .driver = { 629 635 .name = "hmc5843", 630 636 .pm = HMC5843_PM_OPS, 637 + .of_match_table = of_match_ptr(hmc5843_of_match), 631 638 }, 632 639 .id_table = hmc5843_id, 633 640 .probe = hmc5843_probe,