LPS22HB: Fix invalid driver reset (I2C bus) #11231
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Driver sets I2C_DIS (I2C disable) flag during the reset. Reset operation will fail (on write_reg()) if the sensor is on the I2C bus. Driver works after a failed reset but doesn't create a BARO_BASE_DEVICE_PATH device file (/dev/baro*). It affects checks that use device files to determine a working barometer.
To fix the problem we should remove I2C_DIS flag from the driver's reset operation. Is there any reason why I2C_DIS flag has been added in the first place?