meta-digi: do not enable spidev when touch is enabled

They conflict.

Warn the user about the problem and let they change the device tree
manually.

https://jira.digi.com/browse/DEL-840

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-10-29 18:13:52 +01:00
parent c2055a5383
commit 1866f03b0a
2 changed files with 14 additions and 4 deletions

View File

@ -65,11 +65,14 @@ do_update_dts() {
config_dts disable '_ssp1_'
config_dts disable '_auart1_4wires'
config_dts disable '_ethernet0_leds'
fi
else
# spidev conflicts with touchscreen, thus enable it only
# when touch is disabled
if [ -n "${HAVE_EXAMPLE}" ]; then
config_dts enable 'ssp1_spi_gpio.dtsi'
config_dts enable 'ssp1_spi_gpio_spidev.dtsi'
fi
fi
}
addtask update_dts before do_install after do_sizecheck

View File

@ -11,6 +11,13 @@ SRC_URI = "file://spidev_test"
S = "${WORKDIR}/spidev_test"
# Warn the user in case we cannot enable spidev in the device tree
python do_warning_spidev() {
if d.getVar('HAVE_GUI', True) and not d.getVar('IS_KERNEL_2X', True):
bb.warn("SPIDEV conflicts with touchscreen so it was not enabled in the device tree")
}
addtask warning_spidev before do_compile
do_compile() {
${CC} -O2 -Wall spidev_test.c -o spidev_test
}