Commit 39c3e721 authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

Let Kconfig handle lis3lv02d dependencies

The dependencies between the various lis3lv02d drivers make it
impossible to split them to different directories, while we really
want to do this. Move handling of dependencies from Makefile to
Kconfig, to make the move possible at all.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
Acked-by: default avatarEric Piel <eric.piel@tremplin-utc.net>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Tested-by: default avatarEric Piel <eric.piel@tremplin-utc.net>
Tested-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ccd32e73
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
# Hardware monitoring chip drivers configuration # Hardware monitoring chip drivers configuration
# #
config SENSORS_LIS3LV02D
tristate
depends on INPUT
select INPUT_POLLDEV
default n
menuconfig HWMON menuconfig HWMON
tristate "Hardware Monitoring support" tristate "Hardware Monitoring support"
depends on HAS_IOMEM depends on HAS_IOMEM
...@@ -1218,7 +1224,7 @@ config SENSORS_ULTRA45 ...@@ -1218,7 +1224,7 @@ config SENSORS_ULTRA45
config SENSORS_LIS3_SPI config SENSORS_LIS3_SPI
tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (SPI)" tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (SPI)"
depends on !ACPI && SPI_MASTER && INPUT depends on !ACPI && SPI_MASTER && INPUT
select INPUT_POLLDEV select SENSORS_LIS3LV02D
default n default n
help help
This driver provides support for the LIS3LV02Dx accelerometer connected This driver provides support for the LIS3LV02Dx accelerometer connected
...@@ -1235,7 +1241,7 @@ config SENSORS_LIS3_SPI ...@@ -1235,7 +1241,7 @@ config SENSORS_LIS3_SPI
config SENSORS_LIS3_I2C config SENSORS_LIS3_I2C
tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (I2C)" tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (I2C)"
depends on I2C && INPUT depends on I2C && INPUT
select INPUT_POLLDEV select SENSORS_LIS3LV02D
default n default n
help help
This driver provides support for the LIS3LV02Dx accelerometer connected This driver provides support for the LIS3LV02Dx accelerometer connected
...@@ -1296,35 +1302,24 @@ config SENSORS_ATK0110 ...@@ -1296,35 +1302,24 @@ config SENSORS_ATK0110
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called asus_atk0110. will be called asus_atk0110.
config SENSORS_LIS3LV02D config HP_ACCEL
tristate "STMicroeletronics LIS3* three-axis digital accelerometer" tristate "HP laptop accelerometer"
depends on INPUT depends on INPUT
select INPUT_POLLDEV select SENSORS_LIS3LV02D
select NEW_LEDS select NEW_LEDS
select LEDS_CLASS select LEDS_CLASS
default n default n
help help
This driver provides support for the LIS3* accelerometers, such as the This driver provides support for the "Mobile Data Protection System 3D"
LIS3LV02DL or the LIS331DL. In particular, it can be found in a number or "3D DriveGuard" feature of HP laptops. On such systems the driver
of HP laptops, which have the "Mobile Data Protection System 3D" or should load automatically (via ACPI alias).
"3D DriveGuard" feature. On such systems the driver should load
automatically (via ACPI alias). The accelerometer might also be found
in other systems, connected via SPI or I2C. The accelerometer data is
readable via /sys/devices/platform/lis3lv02d.
This driver also provides an absolute input class device, allowing Support for a led indicating disk protection will be provided as
a laptop to act as a pinball machine-esque joystick. It provides also hp::hddprotect. For more information on the feature, refer to
a misc device which can be used to detect free-fall. On HP laptops, Documentation/hwmon/lis3lv02d.
if the led infrastructure is activated, support for a led indicating
disk protection will be provided as hp::hddprotect. For more
information on the feature, refer to Documentation/hwmon/lis3lv02d.
This driver can also be built as modules. If so, the core module To compile this driver as a module, choose M here: the module will
will be called lis3lv02d and a specific module for HP laptops will be be called hp_accel.
called hp_accel.
Say Y here if you have an applicable laptop and want to experience
the awesome power of lis3lv02d.
endif # ACPI endif # ACPI
......
...@@ -5,8 +5,12 @@ ...@@ -5,8 +5,12 @@
obj-$(CONFIG_HWMON) += hwmon.o obj-$(CONFIG_HWMON) += hwmon.o
obj-$(CONFIG_HWMON_VID) += hwmon-vid.o obj-$(CONFIG_HWMON_VID) += hwmon-vid.o
# Helper drivers
obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o
# APCI drivers # APCI drivers
obj-$(CONFIG_SENSORS_ATK0110) += asus_atk0110.o obj-$(CONFIG_SENSORS_ATK0110) += asus_atk0110.o
obj-$(CONFIG_HP_ACCEL) += hp_accel.o
# Native drivers # Native drivers
# asb100, then w83781d go first, as they can override other drivers' addresses. # asb100, then w83781d go first, as they can override other drivers' addresses.
...@@ -63,9 +67,8 @@ obj-$(CONFIG_SENSORS_JZ4740) += jz4740-hwmon.o ...@@ -63,9 +67,8 @@ obj-$(CONFIG_SENSORS_JZ4740) += jz4740-hwmon.o
obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o
obj-$(CONFIG_SENSORS_K10TEMP) += k10temp.o obj-$(CONFIG_SENSORS_K10TEMP) += k10temp.o
obj-$(CONFIG_SENSORS_LINEAGE) += lineage-pem.o obj-$(CONFIG_SENSORS_LINEAGE) += lineage-pem.o
obj-$(CONFIG_SENSORS_LIS3LV02D) += lis3lv02d.o hp_accel.o obj-$(CONFIG_SENSORS_LIS3_SPI) += lis3lv02d_spi.o
obj-$(CONFIG_SENSORS_LIS3_SPI) += lis3lv02d.o lis3lv02d_spi.o obj-$(CONFIG_SENSORS_LIS3_I2C) += lis3lv02d_i2c.o
obj-$(CONFIG_SENSORS_LIS3_I2C) += lis3lv02d.o lis3lv02d_i2c.o
obj-$(CONFIG_SENSORS_LM63) += lm63.o obj-$(CONFIG_SENSORS_LM63) += lm63.o
obj-$(CONFIG_SENSORS_LM70) += lm70.o obj-$(CONFIG_SENSORS_LM70) += lm70.o
obj-$(CONFIG_SENSORS_LM73) += lm73.o obj-$(CONFIG_SENSORS_LM73) += lm73.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment