devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Cartwright <joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
Cc: wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org,
	rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	gavidov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	sdharia-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	alokc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TZUIDd8j+nm9g@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] i2c: New bus driver for the QUP I2C controller
Date: Tue, 10 Sep 2013 10:36:12 -0500	[thread overview]
Message-ID: <20130910153612.GQ808@joshc.qualcomm.com> (raw)
In-Reply-To: <1378825856.960.47.camel-yvhxILDKWb8ylMT5ByZ5bDRGLm/uyL/D0E9HWUfgJXw@public.gmane.org>

On Tue, Sep 10, 2013 at 06:10:56PM +0300, Ivan T. Ivanov wrote:
> On Tue, 2013-09-10 at 08:46 -0500, Josh Cartwright wrote: 
> > Hey Ivan-
> > 
> > Some nits below.
> > 
> > On Thu, Aug 29, 2013 at 04:27:53PM +0300, Ivan T. Ivanov wrote:
[..]
> > > +static int qup_i2c_probe(struct platform_device *pdev)
> > > +{
> > [..]
> > > +
> > > +	ret = devm_request_irq(qup->dev, qup->irq, qup_i2c_interrupt,
> > > +			       IRQF_TRIGGER_HIGH, "i2c_qup", qup);
> > > +	if (ret) {
> > > +		dev_err(qup->dev, "Request %d IRQ failed\n", qup->irq);
> > > +		return ret;
> > > +	}
> > > +
> > > +	disable_irq(qup->irq);
> > 
> > How is this not racy, in the case where a pending interrupt is left from
> > the bootloader (which seems to be possible based on the comments below)?
> 
> Yes it looks weird. Interrupt handler will check and exit if there
> is no message for transfer. I am looking for better way to handle this.

Below in probe() it looks like a controller reset is issued.  I'm
wondering if the best way to fix this is to move that up so it happens
sooner (so we can assume here that the controller is in a
non-interrupting state).

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  parent reply	other threads:[~2013-09-10 15:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 13:27 [PATCH 1/2] i2c: qup: Add device tree bindings information Ivan T. Ivanov
2013-08-29 13:27 ` [PATCH 2/2] i2c: New bus driver for the QUP I2C controller Ivan T. Ivanov
2013-09-10 13:46   ` Josh Cartwright
2013-09-10 15:10     ` Ivan T. Ivanov
     [not found]       ` <1378825856.960.47.camel-yvhxILDKWb8ylMT5ByZ5bDRGLm/uyL/D0E9HWUfgJXw@public.gmane.org>
2013-09-10 15:36         ` Josh Cartwright [this message]
2013-09-11  7:46           ` Ivan T. Ivanov
     [not found] ` <3A0F4153-1C55-4008-8EB1-D6FA60D87CEA@codeaurora.org>
     [not found]   ` <3A0F4153-1C55-4008-8EB1-D6FA60D87CEA-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-08-29 17:26     ` [PATCH 1/2] i2c: qup: Add device tree bindings information Ivan T. Ivanov
     [not found]       ` <767E9FBB-2975-4795-9C7E-69E302511FF2@codeaurora.org>
     [not found]         ` <767E9FBB-2975-4795-9C7E-69E302511FF2-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-09-10 12:08           ` Ivan T. Ivanov
2013-09-10 13:59             ` Josh Cartwright
2013-09-10 14:43               ` Ivan T. Ivanov
     [not found]                 ` <1378824205.960.41.camel-yvhxILDKWb8ylMT5ByZ5bDRGLm/uyL/D0E9HWUfgJXw@public.gmane.org>
2013-09-25 16:06                   ` Wolfram Sang
2013-09-26  5:04                     ` Ivan T. Ivanov
2013-09-12 16:28 ` Mark Rutland
     [not found]   ` <20130912162840.GE22013-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-09-13  9:13     ` Ivan T. Ivanov
     [not found]       ` <1379063595.16481.19.camel-yvhxILDKWb8ylMT5ByZ5bDRGLm/uyL/D0E9HWUfgJXw@public.gmane.org>
2013-09-16 13:32         ` Mark Rutland
     [not found]           ` <20130916133226.GD30650-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-09-17 14:50             ` Ivan T. Ivanov

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=20130910153612.GQ808@joshc.qualcomm.com \
    --to=joshc-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=alokc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gavidov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
    --cc=iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TZUIDd8j+nm9g@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=sdharia-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /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).