Skip to content
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

drivers: i2c: stm32 driver V2 new timing calculation #59815

Merged
merged 4 commits into from
Jun 12, 2024

Commits on Jun 11, 2024

  1. drivers: i2c: stm32 driver V2 new timing calculation

    This PR is implementing a new formula to calculate the I2C timing
    value from the I2C clock source and the bit rate.
    This is done under flag CONFIG_I2C_STM32_V2_TIMING.
    
    Signed-off-by: Francois Ramu <[email protected]>
    FRASTM committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    3f83d40 View commit details
    Browse the repository at this point in the history
  2. drivers: i2c: stm32 I2C v2 driver fix compliance with a Macro

    Define Macro to fix the compliance check warning :
    "DEEP_INDENTATION: Too many leading tabs - consider code refactoring
    in the i2c_compute_scll_sclh() function
    in the i2c_compute_presc_scldel_sdadel() function
    
    Signed-off-by: Francois Ramu <[email protected]>
    FRASTM committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    52a33c2 View commit details
    Browse the repository at this point in the history
  3. drivers: i2c: stm32 for V2 driver get_config with timings

    Change the get_config API for the stm32 I2C V2 driver.
    It will also return the value of the content of TIMING register
    for the I2C V2 bus.
    This is hold by a i2c_config_timing structure of the device data
    
    Signed-off-by: Francois Ramu <[email protected]>
    FRASTM committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    364684c View commit details
    Browse the repository at this point in the history
  4. samples: boards: stm32 I2C config and gives V2 timing calculation

    This sample reports the I2C configuration of the selected I2C node
    from the board DTS : bitrate property of the I2C node
    In case of I2C V2, it also gives the TIMINGS which has to be written
    in the DTS <timings> property of the I2C V2 node.
    Uses the i2c_get_config function with CONFIG_I2C_STM32_V2_TIMING.
    
    Signed-off-by: Francois Ramu <[email protected]>
    FRASTM committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    e94cfcf View commit details
    Browse the repository at this point in the history