Commit graph

6 commits

Author SHA1 Message Date
Henrik Brix Andersen 99c7597874 drivers: i2c: mcux: return to idle on failed transfers
Abort I2C transfers through the MCUX HAL if a transfer fails to avoid
deadlock in the driver/HAL.

Fixes #25098

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-07-09 16:03:01 -05:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Martí Bolívar 7e0eed9235 devicetree: allow access to all nodes
Usually, we want to operate only on "available" device
nodes ("available" means "status is okay and a matching binding is
found"), but that's not true in all cases.

Sometimes we want to operate on special nodes without matching
bindings, such as those describing memory.

To handle the distinction, change various additional devicetree APIs
making it clear that they operate only on available device nodes,
adjusting gen_defines and devicetree.h implementation details
accordingly:

- emit macros for all existing nodes in gen_defines.py, regardless
  of status or matching binding
- rename DT_NUM_INST to DT_NUM_INST_STATUS_OKAY
- rename DT_NODE_HAS_COMPAT to DT_NODE_HAS_COMPAT_STATUS_OKAY
- rename DT_INST_FOREACH to DT_INST_FOREACH_STATUS_OKAY
- rename DT_ANY_INST_ON_BUS to DT_ANY_INST_ON_BUS_STATUS_OKAY
- rewrite DT_HAS_NODE_STATUS_OKAY in terms of a new DT_NODE_HAS_STATUS
- resurrect DT_HAS_NODE in the form of DT_NODE_EXISTS
- remove DT_COMPAT_ON_BUS as a public API
- use the new default_prop_types edtlib parameter

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-08 19:37:18 -05:00
Tomasz Bursztyka 97326c0445 device: Fix structure attributes access
Since struct devconfig was merged earlier into struct device, let's fix
accessing config_info, name, ... attributes everywhere via:

grep -rlZ 'dev->config->' | xargs -0 sed -i 's/dev->config->/dev->/g'

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-05-08 23:07:44 +02:00
Maureen Helm b03e4312b3 drivers: i2c: Fix incorrect fast and fast+ mode bus speeds
Fixes the nxp and silabs i2c drivers to decode fast and fast+ mode bus
speeds as 400 kHz and 1 MHz respectively.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-20 15:54:04 +02:00
Maureen Helm 3005094994 drivers: i2c: Add mcux flexcomm driver
Adds a shim layer around the mcux lpc flexcomm driver to adapt it to the
zephyr i2c interface. It leverages heavily from the existing mcux lpi2c
shim driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-04-09 08:52:13 -05:00