This commit adds @stephanosio as a collaborator for the MAINTAINERS
file area so that he is automatically notified of any changes to the
maintainer and collaborator list and can update the GitHub permissions
accordingly.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Move from using Kconfig TRACING_BACKEND_UART_NAME to a devicetree
chosen property ("zephyr,tracing-uart"). This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".
Signed-off-by: Kumar Gala <galak@kernel.org>
Remove if-def since io-channels is a required property of
the voltage-devider compatible so the else case won't happen.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Rework the <BUS>_emul_register calls to not pass the name param. The
name param is only used for logging and we can get it from the
struct <BUS>_emul instead.
Signed-off-by: Kumar Gala <galak@kernel.org>
Having a per-instance init function makes code cluttered and hard to
read. Just create a per-instance IRQ connect function (required to
resolve IRQ_CONNECT parameters at compile time).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Stop using NRFX_SPI(S|M)_INSTANCE helper so that peripheral address from
Devicetree is used. We should not rely on HAL for hardware description
but Devicetree.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move the RX (MISO) delaying capability information to Devicetree. It is
done using 2 properties:
- rx-delay-supported: enabled on SPI nodes that support delaying RX.
This property can be used by the driver to determine if this
capability is supported or not on a given instance.
- rx-delay: the actual RX delay value
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The maximum transfer buffer length is SoC specific, not instance
specific. This patch defines MAX_BUF_LEN at driver level in a SoC
specific manner instead of using HAL values that are instance specific
but that always take the same value depending on the SoC.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The maximum transfer chunk length is SoC specific, not instance
specific. This patch defines MAX_CHUNK_LEN at driver level in a SoC
specific manner instead of using HAL values that are instance specific
but that always take the same value depending on the SoC.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Specify the overrun character in Devicetree. Since 0xFF is the most
common value, DT property contains such default.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Devicetree is the natural place to describe hardware, so move the
maximum frequency the SPI can work with to Devicetree instead of relying
on values from HAL.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Uses a macro with a define flag to enable register dumps on the DSP
side. On the python side a simple booling flag.
The default disabled both debug flags and makes the tests
considerably quieter.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
There are a few registers that map nicely onto structs. Switch from
using index constants and byte arrays in those cases.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
Some panels using this driver don't provide tcon/cdi/pwr/softstart
values in their reference code. It is normally expected that the right
values will be loaded from OTP in such cases. Make these values
optional to support such panels.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
The GD7965 driver uses malloc to allocate a single line buffer when
clearing the display. This buffer is used to clear the display line by
line. This as two problems. First, it means that the driver introduces
an unnecessary requirement to support heap allocations. Second, it
causes a lot of weird and unnecessary SPI transactions that look like
partial updates without the actual refresh. This is very inefficient
since the same action can be performed in a single SPI transaction.
Add a gd7965_write_cmd_pattern() helper function that writes a pattern
of a specified length to a register in the device.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
The protocol used by the GD7965 driver requires that SPI transactions
are split into two phases, a command phase and a data phase, to change
the state of a GPIO signaling commands/data.
We currently don't lock the bus which means that other drivers could
potentially take over the bus and introduce unpredictable delays
between the command and data phase.
Add the necessary locking.
Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
The bus_label is not used and is using DT_INST_BUS_LABEL which is
now deprecated and thus causes an error when running CI.
Signed-off-by: Kumar Gala <galak@kernel.org>
DT nodes aren't guaranteed to define a label property. But emulated bus
controllers currently make use of this property to dispatch to the
associated emulator.
Have emulated bus controllers use DEVICE_DT_GET(node_id) to dispatch to
right target peripheral emulator. This also change makes emul_get_binding
and device_get_binding synonymous in behavior with respect to their
parameters.
This also strictly enforces a 1:1 correspondence between invocations of
DEVICE_DT_DEFINE and EMUL_DEFINE.
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Some paramaters in prior emulators have historically referred to instances
of struct emul as "emulator" or "emul". The proper parameter name for this
type is "target" as it designates the struct emul instance is the emul
bus (e.g. emul_i2c) controller's target peripheral for dispatch.
Do a small refactor renaming some of these parameters to "target".
TEST=twister on accel, espi, and eeprom drivers tests
Signed-off-by: Aaron Massey <aaronmassey@google.com>
In several locations of the emulator code there are unused function
arguments that were never caught.
Declare these as unused or remove the unused function parameters entirely.
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Allow emulator creators to write an init function that can be used
across multiple busses so as to reduce the boilerplate and cognitive
load in creating an emulator.
Part of this change includes allowing access to the emul struct from a
field in a {bus}_struct api (e.g. i2c_struct), which removes the need for
sporadic usages of CONTAINER_OF to access the emul struct.
Overall, this change simplifies and reduces the amount of boilerplate
code to get a device emulator up and running, thus reducing excise work
to writing tests.
TEST=twister on accel,espi, and eeprom drivers tests
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Run clang-format on all files touched by improved emulator API pull-request
that allowed access to the target device emulator from its bus api without
CONTAINER_OF usage.
drivers/i2c/i2c_emul.c
drivers/spi/spi_emul.c
include/zephyr/drivers/emul.h
include/zephyr/drivers/espi_emul.h
include/zephyr/drivers/i2c_emul.h
include/zephyr/drivers/spi_emul.h
subsys/emul/emul.c
subsys/emul/emul_bmi160.c
subsys/emul/espi/emul_espi_host.c
subsys/emul/i2c/emul_atmel_at24.c
TEST=twister on accel,espi, and eeprom drivers tests
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Kconfig will default to enable the drivers based on devicetree so
we don't need to explicitly set the Kconfig symbols.
Signed-off-by: Kumar Gala <galak@kernel.org>
Update video drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.
Signed-off-by: Kumar Gala <galak@kernel.org>
Introduce a generated Kconfig.dts that sets a Kconfig symbol for
every compatible.
* We set DT_HAS_<compat>_ENABLED if the devicetree has a node with
<compat> enabled. (status is okay...)
We can then use the Kconfig symbol in driver Kconfig to determine
if the driver should be available, and thus enabled by default.
Signed-off-by: Kumar Gala <galak@kernel.org>
Given binding dirs the script will generate a Kconfig.dts of the
form:
DT_COMPAT_ADI_ADT7420 := adi,adt7420
config DT_HAS_ADI_ADT7420_ENABLED
depends on DTS_HAS_ADI_ADT7420
def_bool $(dt_compat_enabled,$(DT_COMPAT_ADI_ADT7420))
Than a driver Kconfig can use these Kconfig symbols as follows:
menuconfig ADT7420
bool "ADT7420 Temperature Sensor"
default y
depends on DT_HAS_ADI_ADT7420_ENABLED
...
Signed-off-by: Kumar Gala <galak@kernel.org>
A lot of places that DT_LABEL is used we can replace with DT_SAME_NODE
as we are just checking that the node we got from the macro is the
same as what we expect.
Signed-off-by: Kumar Gala <galak@kernel.org>
Fix building this sample on bl5340_dvk_cpuapp_ns and
pinnacle_100_dvk. On these boards the NORDIC_QSPI_NOR
driver needs to be enabled for the sample to build.
Signed-off-by: Kumar Gala <galak@kernel.org>
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.
Signed-off-by: Kumar Gala <galak@kernel.org>
Add alias to overlays for boards that switch the watchdog to be
used while running this sample.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Move watchdog0 and watchdog1 nodes from choosen to aliases for
consistency with other boards.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Enable watchdog in device tree in order to remove overlays
from samples/drivers/watchdog.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>