soc_nrf_common: Extend and rename the NRF_DT_ENSURE_PINS_ASSIGNED macro
Extend the macro with checks for DT properties related to pin assignments that are defined but would be ignored, depending on whether PINCTRL is enabled or not, what presumably indicates a resulting configuration different from what the user expects. Add also a possibility to indicate that the pinctrl-1 property should not be checked because the caller does not support the sleep state. Rename the macro so that its name better reflects its function. Update accordingly all drivers that use it. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
1e4027aa7c
commit
a5234f3647
14 changed files with 55 additions and 24 deletions
|
@ -284,7 +284,7 @@ static int twi_nrfx_pm_action(const struct device *dev,
|
|||
.sda = DT_PROP(I2C(idx), sda_pin),))
|
||||
|
||||
#define I2C_NRFX_TWI_DEVICE(idx) \
|
||||
NRF_DT_ENSURE_PINS_ASSIGNED(I2C(idx), scl_pin); \
|
||||
NRF_DT_CHECK_PIN_ASSIGNMENTS(I2C(idx), 1, scl_pin, sda_pin); \
|
||||
BUILD_ASSERT(I2C_FREQUENCY(idx) != \
|
||||
I2C_NRFX_TWI_INVALID_FREQUENCY, \
|
||||
"Wrong I2C " #idx " frequency setting in dts"); \
|
||||
|
|
|
@ -393,7 +393,7 @@ static int twim_nrfx_pm_action(const struct device *dev,
|
|||
.sda = DT_PROP(I2C(idx), sda_pin),))
|
||||
|
||||
#define I2C_NRFX_TWIM_DEVICE(idx) \
|
||||
NRF_DT_ENSURE_PINS_ASSIGNED(I2C(idx), scl_pin); \
|
||||
NRF_DT_CHECK_PIN_ASSIGNMENTS(I2C(idx), 1, scl_pin, sda_pin); \
|
||||
BUILD_ASSERT(I2C_FREQUENCY(idx) != \
|
||||
I2C_NRFX_TWIM_INVALID_FREQUENCY, \
|
||||
"Wrong I2C " #idx " frequency setting in dts"); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue