-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SMBus for STM32 #66260
Add SMBus for STM32 #66260
Conversation
e979293
to
c7aa69f
Compare
This PR can actually only be used when zephyrproject-rtos/hal_stm32#189 is done. Without pinctrl-definitions it is kinda hard to use it. |
09bb1a9
to
23a78a0
Compare
23a78a0
to
e706914
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with minor comments.
Add includes which are actually required for the compilation in the headers themselves to avoid include dependencies. Signed-off-by: Benedikt Schmidt <[email protected]>
e706914
to
3fd240f
Compare
Extract a helper function for handling an SMB alert, as every SMBus implementation will have to loop through the peripheral address which might have triggered the alert. Signed-off-by: Benedikt Schmidt <[email protected]>
Add a dts binding for STM32 SMBus. Signed-off-by: Benedikt Schmidt <[email protected]>
Implement a SMBus driver for STM32, which reuses the I2C implementation. Signed-off-by: Benedikt Schmidt <[email protected]>
Add SMBus devices to all SoCs which have either a st,stm32-i2c-v1 or st,stm32-i2c-v2. Signed-off-by: Benedikt Schmidt <[email protected]>
Enable SMBus for the smbus_emul test. Signed-off-by: Benedikt Schmidt <[email protected]>
3fd240f
to
a9d4a9c
Compare
@erwango @ABOSTM @FRASTM It might be great if somebody from ST could take a look at this one? The corresponding pinctrl-changes are available in zephyrproject-rtos/hal_stm32#189. |
Add a driver for SMBus on STM32 SoCs. The new driver reuses as much as possible from the already existing I2C drivers, as within the STM32 SoCs SMBus is part of the I2C peripheral.