drivers: i2c_nrfx_twim: Fix compilation with disabled PINCTRL
This is a follow-up to commits9974bb043f
and00ecc66677
. Add one missing `#ifdef CONFIG_PINCTRL` and remove a no longer needed one to restore the possibility to use this driver without PINCTRL. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
52e2493842
commit
3a6584b0ae
|
@ -289,8 +289,10 @@ static int i2c_nrfx_twim_recover_bus(const struct device *dev)
|
|||
|
||||
/* restore peripheral if it was active before */
|
||||
if (state == PM_DEVICE_STATE_ACTIVE) {
|
||||
#ifdef CONFIG_PINCTRL
|
||||
(void)pinctrl_apply_state(dev_config->pcfg,
|
||||
PINCTRL_STATE_DEFAULT);
|
||||
#endif
|
||||
nrfx_twim_enable(&dev_config->twim);
|
||||
}
|
||||
|
||||
|
@ -307,9 +309,7 @@ static const struct i2c_driver_api i2c_nrfx_twim_driver_api = {
|
|||
static int twim_nrfx_pm_action(const struct device *dev,
|
||||
enum pm_device_action action)
|
||||
{
|
||||
#ifdef CONFIG_PINCTRL
|
||||
const struct i2c_nrfx_twim_config *dev_config = dev->config;
|
||||
#endif
|
||||
int ret = 0;
|
||||
|
||||
switch (action) {
|
||||
|
|
Loading…
Reference in a new issue