2016-11-04 15:47:32 -04:00
|
|
|
|
2016-05-18 10:24:46 +03:00
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
|
|
#
|
2017-01-18 17:01:01 -08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-05-18 10:24:46 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
menuconfig LIS3MDL
|
2018-08-14 16:19:20 +02:00
|
|
|
bool "LIS3MDL magnetometer"
|
2017-09-21 20:28:16 +02:00
|
|
|
depends on I2C
|
2016-05-18 10:24:46 +03:00
|
|
|
help
|
|
|
|
Enable driver for LIS3MDL I2C-based magnetometer.
|
|
|
|
|
2018-01-29 16:57:22 -06:00
|
|
|
if !HAS_DTS_I2C_DEVICE
|
|
|
|
|
2016-05-18 10:24:46 +03:00
|
|
|
config LIS3MDL_NAME
|
2018-08-14 16:19:20 +02:00
|
|
|
string "Driver name"
|
2016-05-18 10:24:46 +03:00
|
|
|
default "LIS3MDL"
|
2018-01-29 16:57:22 -06:00
|
|
|
depends on LIS3MDL
|
2016-05-18 10:24:46 +03:00
|
|
|
help
|
|
|
|
Device name with which the LIS3MDL sensor is identified.
|
|
|
|
|
|
|
|
config LIS3MDL_I2C_ADDR
|
2018-08-14 16:19:20 +02:00
|
|
|
hex "I2C address"
|
2018-01-29 16:57:22 -06:00
|
|
|
depends on LIS3MDL
|
2016-10-05 08:45:54 -04:00
|
|
|
default 0x1C
|
2016-05-18 10:24:46 +03:00
|
|
|
help
|
|
|
|
I2C address of the LIS3MDL sensor.
|
|
|
|
Use 0x1C if the SA1 pin is pulled to GND or 0x1E if the SA1 pin
|
|
|
|
is pulled to VDD.
|
|
|
|
|
|
|
|
config LIS3MDL_I2C_MASTER_DEV_NAME
|
2018-08-14 16:19:20 +02:00
|
|
|
string "I2C master where LIS3MDL is connected"
|
2018-01-29 16:57:22 -06:00
|
|
|
depends on LIS3MDL
|
2016-05-18 10:24:46 +03:00
|
|
|
default "I2C_0"
|
|
|
|
help
|
|
|
|
Specify the device name of the I2C master device to which LIS3MDL is
|
|
|
|
connected.
|
|
|
|
|
2018-01-29 16:57:22 -06:00
|
|
|
endif
|
|
|
|
|
2018-01-11 13:49:20 +01:00
|
|
|
choice
|
2016-05-18 10:24:46 +03:00
|
|
|
prompt "Trigger mode"
|
|
|
|
depends on LIS3MDL
|
2018-01-11 13:49:20 +01:00
|
|
|
default LIS3MDL_TRIGGER_GLOBAL_THREAD
|
2016-05-18 10:24:46 +03:00
|
|
|
help
|
|
|
|
Specify the type of triggering to be used by the driver.
|
|
|
|
|
|
|
|
config LIS3MDL_TRIGGER_NONE
|
2018-08-14 16:19:20 +02:00
|
|
|
bool "No trigger"
|
2016-05-18 10:24:46 +03:00
|
|
|
|
2016-11-10 10:05:53 -05:00
|
|
|
config LIS3MDL_TRIGGER_GLOBAL_THREAD
|
2018-08-14 16:19:20 +02:00
|
|
|
bool "Use global thread"
|
2016-11-04 15:47:32 -04:00
|
|
|
depends on GPIO
|
2016-05-18 10:24:46 +03:00
|
|
|
select LIS3MDL_TRIGGER
|
|
|
|
|
2016-11-10 10:05:53 -05:00
|
|
|
config LIS3MDL_TRIGGER_OWN_THREAD
|
2018-08-14 16:19:20 +02:00
|
|
|
bool "Use own thread"
|
2016-05-18 10:24:46 +03:00
|
|
|
depends on GPIO
|
|
|
|
select LIS3MDL_TRIGGER
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config LIS3MDL_TRIGGER
|
|
|
|
bool
|
|
|
|
depends on LIS3MDL
|
|
|
|
|
|
|
|
config LIS3MDL_GPIO_DEV_NAME
|
2018-08-14 16:19:20 +02:00
|
|
|
string "GPIO device"
|
2016-05-18 10:24:46 +03:00
|
|
|
default "GPIO_0"
|
|
|
|
depends on LIS3MDL && LIS3MDL_TRIGGER
|
|
|
|
help
|
|
|
|
The device name of the GPIO device to which the LIS3MDL interrupt pins
|
|
|
|
are connected.
|
|
|
|
|
|
|
|
config LIS3MDL_GPIO_PIN_NUM
|
2018-08-14 16:19:20 +02:00
|
|
|
int "Interrupt GPIO pin number"
|
2016-05-18 10:24:46 +03:00
|
|
|
default 0
|
|
|
|
depends on LIS3MDL && LIS3MDL_TRIGGER
|
|
|
|
help
|
|
|
|
The number of the GPIO on which the interrupt signal from the LIS3MDL
|
|
|
|
chip will be received.
|
|
|
|
|
2016-11-10 10:05:53 -05:00
|
|
|
config LIS3MDL_THREAD_PRIORITY
|
2018-08-14 16:19:20 +02:00
|
|
|
int "Thread priority"
|
2016-11-10 10:05:53 -05:00
|
|
|
depends on LIS3MDL && LIS3MDL_TRIGGER_OWN_THREAD
|
2016-05-18 10:24:46 +03:00
|
|
|
default 10
|
|
|
|
help
|
2016-11-10 10:05:53 -05:00
|
|
|
Priority of thread used by the driver to handle interrupts.
|
2016-05-18 10:24:46 +03:00
|
|
|
|
2016-11-10 10:05:53 -05:00
|
|
|
config LIS3MDL_THREAD_STACK_SIZE
|
2018-08-14 16:19:20 +02:00
|
|
|
int "Thread stack size"
|
2016-11-10 10:05:53 -05:00
|
|
|
depends on LIS3MDL && LIS3MDL_TRIGGER_OWN_THREAD
|
2016-05-18 10:24:46 +03:00
|
|
|
default 1024
|
|
|
|
help
|
2016-11-10 10:05:53 -05:00
|
|
|
Stack size of thread used by the driver to handle interrupts.
|
2016-05-18 10:24:46 +03:00
|
|
|
|
|
|
|
config LIS3MDL_ODR
|
2018-08-14 16:19:20 +02:00
|
|
|
string "Output data rate"
|
2016-05-18 10:24:46 +03:00
|
|
|
depends on LIS3MDL
|
|
|
|
default "0.625"
|
|
|
|
help
|
|
|
|
Magnetometer output data rate expressed in samples per second.
|
|
|
|
Data rates supported by the chip are 0.625, 1.25, 2.5, 5, 10, 20,
|
|
|
|
40, 80, 155, 300, 560 and 1000.
|
|
|
|
|
|
|
|
config LIS3MDL_FS
|
2018-08-14 16:19:20 +02:00
|
|
|
int "Full-scale range"
|
2016-05-18 10:24:46 +03:00
|
|
|
depends on LIS3MDL
|
|
|
|
default 4
|
|
|
|
help
|
|
|
|
Magnetometer full-scale range.
|
|
|
|
An X value for the config represents a range of +/- X gauss. Valid
|
|
|
|
values are 4, 8, 12 and 16.
|