dts: nrf: revert i2c sda-gpios, scl-gpios changes
These changes turn out to have been incompatible with the way pinctrl drivers are going to work, so we need to go back to what we had before until we can agree on a better approach. Squash of the following reverts: Revert "boards: nrf: fix deprecated I2C properties" This reverts commit2a4ac9ac02
. Revert "samples: switch nrf overlays to sda-gpios, scl-gpios" This reverts commit01bb08e7d8
. Revert "boards: nrf: switch to sda-gpios, scl-gpios" This reverts commit17a66304c4
. Revert "i2c: nordic: switch to phandle arrays for pinmux" This reverts commit821c03a14a
. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
3fde4af4d4
commit
15f9ae0e0b
56 changed files with 138 additions and 185 deletions
|
@ -8,7 +8,6 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <dt-bindings/i2c/i2c.h>
|
||||
#include <nrfx_twi.h>
|
||||
#include <soc.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(i2c_nrfx_twi, CONFIG_I2C_LOG_LEVEL);
|
||||
|
@ -277,14 +276,6 @@ static int twi_nrfx_pm_control(const struct device *dev,
|
|||
BUILD_ASSERT(I2C_FREQUENCY(idx) != \
|
||||
I2C_NRFX_TWI_INVALID_FREQUENCY, \
|
||||
"Wrong I2C " #idx " frequency setting in dts"); \
|
||||
NRF_DT_PSEL_CHECK_EXACTLY_ONE(I2C(idx), \
|
||||
sda_pin, "sda-pin", \
|
||||
sda_gpios, "sda-gpios"); \
|
||||
NRF_DT_PSEL_CHECK_EXACTLY_ONE(I2C(idx), \
|
||||
scl_pin, "scl-pin", \
|
||||
scl_gpios, "scl-gpios"); \
|
||||
NRF_DT_CHECK_GPIO_CTLR_IS_SOC(I2C(idx), sda_gpios, "sda-gpios"); \
|
||||
NRF_DT_CHECK_GPIO_CTLR_IS_SOC(I2C(idx), scl_gpios, "scl-gpios"); \
|
||||
static int twi_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(I2C(idx)), DT_IRQ(I2C(idx), priority), \
|
||||
|
@ -300,8 +291,8 @@ static int twi_nrfx_pm_control(const struct device *dev,
|
|||
static const struct i2c_nrfx_twi_config twi_##idx##z_config = { \
|
||||
.twi = NRFX_TWI_INSTANCE(idx), \
|
||||
.config = { \
|
||||
.scl = NRF_DT_PSEL(I2C(idx), scl_pin, scl_gpios, 0), \
|
||||
.sda = NRF_DT_PSEL(I2C(idx), sda_pin, sda_gpios, 0), \
|
||||
.scl = DT_PROP(I2C(idx), scl_pin), \
|
||||
.sda = DT_PROP(I2C(idx), sda_pin), \
|
||||
.frequency = I2C_FREQUENCY(idx), \
|
||||
} \
|
||||
}; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue