mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 14:07:05 +07:00
6d745ee8b5
The ADC driver can trigger on either the timer or the lptim
trigger, but it only uses a Kconfig 'select' statement
to ensure that the first of the two is present. When the lptim
trigger is enabled as a loadable module, and the adc driver
is built-in, we now get a link error:
drivers/iio/adc/stm32-adc.o: In function `stm32_adc_get_trig_extsel':
stm32-adc.c:(.text+0x4e0): undefined reference to `is_stm32_lptim_trigger'
We could use a second 'select' statement and always have both
trigger drivers enabled when the adc driver is, but it seems that
the lptimer trigger was intentionally left optional, so it seems
better to keep it that way.
This adds a hack to use 'IS_REACHABLE()' rather than 'IS_ENABLED()',
which avoids the link error, but instead leads to the lptimer trigger
not being used in the broken configuration. I've added a runtime
warning for this case to help users figure out what they did wrong
if this should ever be done by accident.
Fixes:
|
||
---|---|---|
.. | ||
accel | ||
adc | ||
common | ||
dac | ||
frequency | ||
gyro | ||
imu | ||
magnetometer | ||
timer | ||
buffer_impl.h | ||
buffer-dma.h | ||
buffer-dmaengine.h | ||
buffer.h | ||
configfs.h | ||
consumer.h | ||
driver.h | ||
events.h | ||
iio.h | ||
kfifo_buf.h | ||
machine.h | ||
sw_device.h | ||
sw_trigger.h | ||
sysfs.h | ||
trigger_consumer.h | ||
trigger.h | ||
triggered_buffer.h | ||
triggered_event.h | ||
types.h |