Re: [PATCH v8 4/4] i2c: qcom-geni: Support multi-owner controllers in GPI mode
Konrad Dybcio <[email protected]>
| Newsgroups | org.kernel.vger.linux-i2c,org.kernel.vger.dmaengine,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 7/8/26 7:10 AM, Mukesh Kumar Savaliya wrote: > Some platforms use a QUP-based I2C controller in a configuration where the > controller is shared with another system processor. In this setup the > operating system must not assume exclusive ownership of the controller or > its associated pins. > > Add support for enabling multi-owner operation when DeviceTree specifies > qcom,qup-multi-owner. When enabled, mark the underlying serial engine as > shared so the common GENI resource handling avoids selecting the "sleep" > pinctrl state, which could disrupt transfers initiated by the other > processor. > > For GPI mode transfers, request lock/unlock TRE sequencing from the GPI > driver by setting a single lock_action selector per message, emitting lock > before the first message and unlock after the last message (handling the > single-message case as well). This serializes access to the shared > controller without requiring message-position flags to be passed into the > DMA engine layer. > > Signed-off-by: Mukesh Kumar Savaliya <[email protected]> > --- [...] > + if (gi2c->se.multi_owner) > + return dev_err_probe(gi2c->se.dev, -EINVAL, > + "I2C sharing not supported in non GSI mode\n"); ultra nit: "non-GSI" > + > tx_depth = geni_se_get_tx_fifo_depth(&gi2c->se); > > /* I2C Master Hub Serial Elements doesn't have the HW_PARAM_0 register */ > @@ -1098,6 +1115,11 @@ static int geni_i2c_probe(struct platform_device *pdev) > gi2c->clk_freq_out = I2C_MAX_STANDARD_MODE_FREQ; > } > > + if (of_property_read_bool(pdev->dev.of_node, "qcom,qup-multi-owner")) { Let's use device_property_present() instead. with that: Reviewed-by: Konrad Dybcio <[email protected]> Konrad