Commit Graph

60678 Commits

Author SHA1 Message Date
Ederson de Souza 78aa71228b tests: Run test_build only on platforms whose console has a driver
Otherwise XCC (based on GCC 4.2) will complain at log related undefined
symbols, that won't be generated as CONFIG_STDOUT_CONSOLE=n will be
forced.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-21 22:17:27 -05:00
Ederson de Souza d1cdeab851 tests: Define mbox device
XCC (based on GCC 4.2) will emit undefined references to symbols that
are not used. Newer versions of GCC simply don't emit them, but for XCC,
linker will complain about those undefined references.

This patch adds a dummy definition of the mbox devices used on tests, so
that the linker is happy.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-21 22:17:27 -05:00
Ederson de Souza 827d07abbc net: Fix macro for XCC
NET_SOCKET_GET_NAME macro adds some extra parenthesis that, on XCC (based
on GCC 4.2) ends up in the generated assembly, thus causing `as` to error
with:

  Error: junk at end of line, first unrecognized character is `('

It appears that the parenthesis are actually concatenated to the
generated name for identifier. This patch just removes them.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-21 22:17:27 -05:00
Ederson de Souza 780bc430e3 compiler/xcc: Remove -Werror flag unknown to XCC
XCC (based on GCC 4.2) doesn't recognize -Wvla (for variable-length
array), so remove it from "warning_error_misra_sane" property.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-21 22:17:27 -05:00
Tim Lin 58d928932a ITE: drivers/i2c: disable pre-defined of hardware slave A
This register is a pre-define hardware slave A and can be accessed
through I2C0. It is not currently used, so it can be disabled to
avoid illegal access.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-02-21 22:16:37 -05:00
Gerard Marull-Paretas d6c2c9eb9e drivers: memc: mcux_flexspi_hyperram: use DEVICE_DT_GET
The controller device can be obtained at compile time, so use
DEVICE_DT_GET.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas ca7f291dd4 drivers: lora: sx12xx: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas dc2c889948 drivers: lora: sx127x: use spi_dt_spec
Simplify driver implementation by using spi_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 4bcbbe571e drivers: lora: sx126x: use spi_dt_spec
Simplify driver implementation by using spi_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas a7ae33de7f drivers: led_strip: ws2812_gpio: drop redundant dev_cfg helper
Helpers like dev_cfg have been removed from all in-tree drivers, this
one was missed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas e2431fa25b drivers: led_strip: ws2812_gpio: use gpio_dt_spec
Simplify device driver implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 9395ee4a04 drivers: led: lp5562: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 97cd2a7321 drivers: led: lp503x: constify device config
Device configuration was not declared as const, fix this.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas e6830dac47 drivers: led: lp503x: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas a5b68f51ea drivers: led: lp3943: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 071b80290c drivers: kscan: ft5336: simplify device definition
Use the IF_ENABLED macro helper to conditionally initialize the int_gpio
field. This avoids duplication of initialization code.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 97eb6a3154 drivers: kscan: ft5336: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas f52b5adf81 drivers: kscan: ft5336: use gpio_dt_spec
Simplify implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 0ddb8b5d62 drivers: interrupt_controller: intc_ioapic: use DEVICE_DT_GET_OR_NULL
The device instance can be obtained at compile time. Here
DEVICE_DT_GET_OR_NULL is used as the following code seems to accept a
NULL condition, meaning instance is optional.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas b15fb9cb2f drivers: ieee802154: rf2xx: use gpio_dt_spec
Simplify the implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas ec63ea78cd drivers: ieee802154: mcr20a: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 4231c92cb8 drivers: ieee802154: mcr20a: use spi_dt_spec
Simplify driver implementation by using spi_dt_spec. Most internal
functions now take a device reference to simplify the operation, since
config did not exist before.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 5314690c3b drivers: ieee802154: mcr20a: define as DT device
The device already has a DT compatible (and uses DT properties).
Instantiate the device using the DT-based macros and remove hardcoded
name.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas adf8e4d723 drivers: ieee802154: dw1000: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas fe851d30de drivers: ieee802154: dw1000: use spi_dt_spec
Simplify driver implementation by using spi_dt_spec. Note that driver
has 2 SPI configurations, identical except the speed. For this reason,
the slow config is still kept in RAM and copied from the one obtained
via the SPI dt_spec macros. A better solution would be to have macros
that allow to override the SPI frequency, but this can be improved
later. Most internal helpers have been adjusted to accept a device
reference to make SPI (and future GPIO) transition easier.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 7c0d4f0382 drivers: i2c: slave: eeprom: use i2c_dt_spec
Simplify implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas be63d6addc drivers: i2c: gpio: use gpio_dt_spec
Simplify the implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 2c5de11a8b drivers: gpio: sx1509: use gpio_dt_spec
Simplify implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas e1992d5c54 drivers: gpio: sx1509: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 1d449c2924 drivers: gpio: pca95xx: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 80ee515c9c drivers: gpio: pca95xx: use gpio_dt_spec
Simplify implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 5af7fe66a4 drivers: flash: mcux_flexspi_nor: use DEVICE_DT_GET
Controller device can be obtained at compile time, so make
implementation more efficient thanks to that.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 391112dab8 drivers: flash: mcux_flexspi_mx25um51345g: use DEVICE_DT_GET
Controller device can be obtained at compile time, so make
implementation more efficient thanks to that.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas c70f296d63 drivers: flash: mcux_flexspi_hyperflash: use DEVICE_DT_GET
The controller device instance can be obtained at compile time using
DEVICE_DT_GET, so do that.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 54177fd8ff drivers: ethernet: dsa_ksz8xxx: use DEVICE_DT_GET
Use DEVICE_DT_GET instead of device_get_binding, since the device
reference can be obtained at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 6c11b6c9bf drivers: ethernet: dsa_ksz8xxx: use gpio_dt_spec
The reset GPIO information can be obtained at compile time, so use
gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas cc3952e266 drivers: dma: iproc_pax: use DEVICE_DT_GET
The PCIe device can be obtained at compile time, so make code more
efficient thanks to that.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas db00924764 drivers: display: ssd16xx: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec. To simplify
migration, all internal functions now take a device reference instead of
device data. As a result, the redundant config pointer in data has been
removed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 0fa2c45037 drivers: display: ls0xx: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec. As a result, the
driver data structure has become unused and so removed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 42bbb30ecf drivers: display: gd7965: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec. Note that as a
result, the driver data structure has become obsolete/unused and so has
been entirely removed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 069bf6be44 drivers: display: st7789v: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 065f8645fb drivers: display: st7789v: use spi_dt_spec
Simplify driver implementation by using spi_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas cd1fb2972e drivers: display: st7735r: use gpio_dt_spec
Simplify the driver implementation by using gpio_dt_spec. Note that most
internal functions have been changed to accept a device instance instead
of data/config references to make transition easier and to align with
most other drivers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 082f593966 drivers: dac: dacx3608: use i2c_dt_spec
Simplify driver implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 6067d16ce2 drivers: counter: maxim_ds3231: use gpio_dt_spec
Simplify implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 85d0ef6e55 drivers: counter: maxim_ds3231: use i2c_dt_spec
Simplify implementation by using i2c_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas aa431f636e drivers: nrf_clock_calibration: use DEVICE_DT_GET_OR_NULL
An optional reference to the temperature sensor can be obtained at
compile time, update implementation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas 03ab730347 drivers: can: mcp2515: use gpio_dt_spec
Use struct gpio_dt_spec to simplify driver implementation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas b61df8281c drivers: bluetooth: hci: spi: use gpio_dt_spec
Simplify driver implementation by using gpio_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00
Gerard Marull-Paretas cc85c6c518 drivers: bluetooth: hci: spi: use spi_dt_spec
Use spi_dt_spec to simplify driver implementation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:16:10 -05:00