intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Jan Dabros" <jsd@semihalf.com>,
	"Andi Shyti" <andi.shyti@kernel.org>,
	"Raag Jadav" <raag.jadav@intel.com>,
	"Tauro, Riana" <riana.tauro@intel.com>,
	"Adatrao, Srinivasa" <srinivasa.adatrao@intel.com>,
	"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
	intel-xe@lists.freedesktop.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/5] i2c: designware: Use polling by default when there is no irq resource
Date: Tue, 1 Jul 2025 15:55:08 +0300	[thread overview]
Message-ID: <aGParHQ3GSdAA8rL@kuha.fi.intel.com> (raw)
In-Reply-To: <aGPXwll6Hh2cZfnp@smile.fi.intel.com>

On Tue, Jul 01, 2025 at 03:42:42PM +0300, Andy Shevchenko wrote:
> On Tue, Jul 01, 2025 at 03:22:48PM +0300, Heikki Krogerus wrote:
> > The irq resource itself can be used as a generic way to
> > determine when polling is needed.
> > 
> > This not only removes the need for special additional device
> > properties that would soon be needed when the platform may
> > or may not have the irq, but it also removes the need to
> > check the platform in the first place in order to determine
> > is polling needed or not.
> 
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > ---
> > Hi guys,
> > 
> > I found the thread with Jarkko's comments from my archives. He wanted
> > the local flags variable to be added because he wants the order of the
> > calls to remain as it is now - the device is allocated only after the
> > irq is checked.
> 
> Yes, thanks.
> 
> ...
> 
> > +	u32 flags = (uintptr_t)device_get_match_data(&pdev->dev);
> 
> > +	irq = platform_get_irq_optional(pdev, 0);
> > +	if (irq == -ENXIO)
> > +		flags |= ACCESS_POLLING;
> > +	else if (irq < 0)
> >  		return irq;
> 
> >  	if (device_property_present(device, "wx,i2c-snps-model"))
> > +		flags = MODEL_WANGXUN_SP | ACCESS_POLLING;
> 
> Now I'm a bit puzzled why do we need to add this flag explicitly here?
> Does Wnagxun provides an IRQ and chooses at the same time to poll?
> Shouldn't this patch rather fix that?

No. I do not want to touch the behavior here. The flags were
overwritten and continue to be overwritten.

I will propose an improvement for that together with some other
modifications to this file later, but those are out side the scope of
this series.

thanks,

-- 
heikki

  reply	other threads:[~2025-07-01 12:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 12:22 [PATCH v6 0/5] drm/xe: i2c support Heikki Krogerus
2025-07-01 12:22 ` [PATCH v6 1/5] i2c: designware: Use polling by default when there is no irq resource Heikki Krogerus
2025-07-01 12:42   ` Andy Shevchenko
2025-07-01 12:55     ` Heikki Krogerus [this message]
2025-07-01 13:50       ` Andy Shevchenko
2025-07-01 16:31   ` Andi Shyti
2025-07-01 12:22 ` [PATCH v6 2/5] i2c: designware: Add quirk for Intel Xe Heikki Krogerus
2025-07-01 16:32   ` Andi Shyti
2025-07-01 12:22 ` [PATCH v6 3/5] drm/xe: Support for I2C attached MCUs Heikki Krogerus
2025-07-01 12:22 ` [PATCH v6 4/5] drm/xe/pm: Wire up suspend/resume for I2C controller Heikki Krogerus
2025-07-01 12:22 ` [PATCH v6 5/5] drm/xe/xe_i2c: Add support for i2c in survivability mode Heikki Krogerus
2025-07-01 12:28 ` ✗ CI.checkpatch: warning for drm/xe: i2c support (rev6) Patchwork
2025-07-02 21:43   ` Rodrigo Vivi
2025-07-01 12:29 ` ✓ CI.KUnit: success " Patchwork
2025-07-01 13:10 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-02 17:18 ` [PATCH v6 0/5] drm/xe: i2c support Andi Shyti
2025-07-02 21:52   ` Rodrigo Vivi
2025-07-03 17:41     ` Andi Shyti
2025-07-10 14:22       ` Rodrigo Vivi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aGParHQ3GSdAA8rL@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=michael.j.ruhl@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=srinivasa.adatrao@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).