zephyr/scripts/dts
Kumar Gala 471d2f3a0a scripts: extract_dts_includes: Generate device bus info define
For devices on buses like I2C or SPI its possible that a sensor might
support being on either bus type.  In the dts we can tell this by
looking at the parent bus of the device.  Its useful for a driver to
know this so can we build support into the driver accordingly.

For example if the LSM6DSL sensor ("st,lsm6dsl") is in the dts on a spi
bus we now generate:

	#define DT_ST_LPS22HB_PRESS_BUS_SPI	1

Its possible that a system exists in which multiple of the same sensor
exist but on different busses, so drivers should handle that case
accordingly.  For the LSM6DSL example we'd end up with:

	#define DT_ST_LPS22HB_PRESS_BUS_I2C	1
	#define DT_ST_LPS22HB_PRESS_BUS_SPI	1

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-12-07 09:08:04 -06:00
..
extract scripts: extract_dts_includes: Generate device bus info define 2018-12-07 09:08:04 -06:00
devicetree.py scripts: devicetree.py: get alternate labels from dt 2018-07-05 11:28:53 -05:00
extract_dts_includes.py scripts: extract_dts_includes: Support same sensor on different bus 2018-12-07 09:08:04 -06:00