fix(drivers/st/pmic): initialize i2c_state
Make sure that i2c->i2c_state is correctly initialized with I2C_STATE_RESET value this avoid hi2c->lock to not be set to 0 when calling stm32_i2c_init during platform suspend/resume operations. Change-Id: I3b4c1f9115589325eb256789a1764c322741db7d Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
8f97c4fab1
commit
42822844bf
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved
|
||||
* Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -204,6 +204,7 @@ bool initialize_pmic_i2c(void)
|
|||
i2c->i2c_base_addr = i2c_info.base;
|
||||
i2c->dt_status = i2c_info.status;
|
||||
i2c->clock = i2c_info.clock;
|
||||
i2c->i2c_state = I2C_STATE_RESET;
|
||||
i2c_init.own_address1 = pmic_i2c_addr;
|
||||
i2c_init.addressing_mode = I2C_ADDRESSINGMODE_7BIT;
|
||||
i2c_init.dual_address_mode = I2C_DUALADDRESS_DISABLE;
|
||||
|
|
Loading…
Reference in New Issue