On 6.09.2024 9:14 PM, Mukesh Kumar Savaliya wrote:That's true, it may require for other drivers too in future.
Currently the driver provides a function called geni_serial_resources_off()
to turn off resources like clocks and pinctrl. We don't have a function to
control clocks separately hence, export the function geni_se_clks_off() to
turn off clocks separately without disturbing GPIO.
Client drivers like I2C require this function for use-cases where the I2C
SE is shared between two subsystems.
Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@xxxxxxxxxxx>
---
Well, i2c is probably not the only type of client you'll want
to share and the current approach requires changes in all protocol
drivers.
How about adding a parameter like `bool shared_se` toSure, Looks good design. This needs a change in common struct geni_se which can add this flag and set to true from i2c driver struct geni_i2c_dev->se->shared_se.
geni_se_resources_off() and changing the pinctrl state conditionally?
Konrad