[PATCH v5] i2c: imx-lpi2c: add target mode support

Carlos Song carlos.song at nxp.com
Thu Dec 26 18:20:13 PST 2024



> -----Original Message-----
> From: Andi Shyti <andi.shyti at kernel.org>
> Sent: Friday, December 27, 2024 8:34 AM
> To: Carlos Song <carlos.song at nxp.com>
> Cc: Aisheng Dong <aisheng.dong at nxp.com>; shawnguo at kernel.org;
> s.hauer at pengutronix.de; kernel at pengutronix.de; festevam at gmail.com;
> linux-i2c at vger.kernel.org; imx at lists.linux.dev;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: [EXT] Re: [PATCH v5] i2c: imx-lpi2c: add target mode support
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> Hi Carlos,
> 
> ...
> 
> > +static irqreturn_t lpi2c_imx_isr(int irq, void *dev_id) {
> > +     struct lpi2c_imx_struct *lpi2c_imx = dev_id;
> > +
> > +     if (lpi2c_imx->target) {
> > +             u32 scr = readl(lpi2c_imx->base + LPI2C_SCR);
> > +             u32 ssr = readl(lpi2c_imx->base + LPI2C_SSR);
> > +             u32 sier_filter = ssr & readl(lpi2c_imx->base +
> > + LPI2C_SIER);
> > +
> > +             /*
> > +              * The target is enabled and an interrupt has been
> triggered.
> > +              * Enter the target's irq handler.
> > +              */
> > +             if ((scr & SCR_SEN) && sier_filter)
> > +                     return lpi2c_imx_target_isr(lpi2c_imx, ssr,
> > + sier_filter);
> 
> you have answered my question here and thanks for that.
> 
> I was trying to apply this patch but it didn't apply. Do you mind resending it?
> 
Thank you! I will resend it:).
> Thanks,
> Andi



More information about the linux-arm-kernel mailing list