The existing device/fwnode_property_read_bool() helpers only check if the property is present.
The MIPI DisCo for SoundWire specification allows properties to be exposed with a value of 'false'. Using the standard helpers to retrieve the MIPI-defined properties causes all kinds of logical inversions - such as jack detection broken when the device properties are read in Realtek codec drivers.
This patch adds new MIPI/SoundWire helpers which first check if the property is present, and then return the actual value extracted from platform firmware.
Modifying the default property handling was considered as a possible solution, but it could lead to other types of logical inversions breaking 'working' setups. The path of least resistance was chosen, with MIPI-specific helpers which can be tested and with no side effects outside of the SoundWire subsystem.
The existing device/fwnode_property_read_bool() helpers only check if the property is present.
The MIPI DisCo for SoundWire specification allows properties to be exposed with a value of 'false'. Using the standard helpers to retrieve the MIPI-defined properties causes all kinds of logical inversions - such as jack detection broken when the device properties are read in Realtek codec drivers.
This patch adds new MIPI/SoundWire helpers which first check if the property is present, and then return the actual value extracted from platform firmware.
Modifying the default property handling was considered as a possible solution, but it could lead to other types of logical inversions breaking 'working' setups. The path of least resistance was chosen, with MIPI-specific helpers which can be tested and with no side effects outside of the SoundWire subsystem.
Closes: https://github.com/thesofproject/linux/issues/5129