1# Copyright (c) 2016 Intel Corporation
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig HMC5883L
5	bool "HMC5883L magnetometer"
6	default y
7	depends on DT_HAS_HONEYWELL_HMC5883L_ENABLED
8	select I2C
9	help
10	  Enable driver for HMC5883L I2C-based magnetometer.
11
12if HMC5883L
13
14choice
15	prompt "Trigger mode"
16	default HMC5883L_TRIGGER_GLOBAL_THREAD
17	help
18	  Specify the type of triggering to be used by the driver.
19
20config HMC5883L_TRIGGER_NONE
21	bool "No trigger"
22
23config HMC5883L_TRIGGER_GLOBAL_THREAD
24	bool "Use global thread"
25	depends on GPIO
26	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_HONEYWELL_HMC5883L),int-gpios)
27	select HMC5883L_TRIGGER
28
29config HMC5883L_TRIGGER_OWN_THREAD
30	bool "Use own thread"
31	depends on GPIO
32	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_HONEYWELL_HMC5883L),int-gpios)
33	select HMC5883L_TRIGGER
34
35endchoice
36
37config HMC5883L_TRIGGER
38	bool
39
40config HMC5883L_THREAD_PRIORITY
41	int "Thread priority"
42	depends on HMC5883L_TRIGGER_OWN_THREAD
43	default 10
44	help
45	  Priority of thread used by the driver to handle interrupts.
46
47config HMC5883L_THREAD_STACK_SIZE
48	int "Thread stack size"
49	depends on HMC5883L_TRIGGER_OWN_THREAD
50	default 1024
51	help
52	  Stack size of thread used by the driver to handle interrupts.
53
54config HMC5883L_ODR
55	string "Output data rate"
56	default "15"
57	help
58	  Magnetometer output data rate expressed in samples per second.
59	  Data rates supported by the chip are 0.75, 1.5, 3, 7.5, 15, 30
60	  and 75.
61
62config HMC5883L_FS
63	string "Full-scale range"
64	default "1.3"
65	help
66	  Magnetometer full-scale range.
67	  An X value for the config represents a range of +/- X gauss. Valid
68	  values are 0.88, 1.3, 1.9, 2.5, 4, 4.7, 5.6 and 8.1.
69
70endif # HMC5883L
71