linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Tony Lindgren" <tony@atomide.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional
Date: Wed, 20 Jan 2016 19:29:47 +0200	[thread overview]
Message-ID: <569FC40B.5030902@ti.com> (raw)
In-Reply-To: <1453292992-1788-2-git-send-email-LW@KARO-electronics.de>

On 01/20/2016 02:29 PM, Lothar Waßmann wrote:
> On the AM335x SoC rev. <= 1.0 the "Input Function of the EXTINTn
> Terminal is Inverted", for which the only remedy is to "Use an active
> high interrupt source or use an external inverter to change the
> polarity of any active low interrupt source."
> 
> This pin is used as IRQ pin for the LTC3589 PMIC on the Ka-Ro
> electronics TX48 module. Make the IRQ optional in the driver and use a
> polling routine instead if no IRQ is specified in DT.
> Otherwise the driver will continuously generate interrupts and make
> the system unusable.
> 
> Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
> ---
>   drivers/regulator/ltc3589.c | 49 +++++++++++++++++++++++++++++++++++++++++----
>   1 file changed, 45 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c

[...]

>   }
> @@ -519,6 +539,16 @@ static int ltc3589_probe(struct i2c_client *client,
>   			return ret;
>   		}
>   	}
> +	if (client->irq <= 0) {
> +		dev_warn(dev,
> +			"No interrupt configured; poll for thermal shutdown and undervoltage events\n");
> +
> +		INIT_DELAYED_WORK(&ltc3589->poll_timer, ltc3589_poll_func);
> +		schedule_delayed_work(&ltc3589->poll_timer,
> +				msecs_to_jiffies(POLL_PERIOD));
> +
> +		return 0;
> +	}
>   
>   	ret = devm_request_threaded_irq(dev, client->irq, NULL, ltc3589_isr,
>   					IRQF_TRIGGER_LOW | IRQF_ONESHOT,
					^^^^^^^^^^^^^^^^

I assume you have issue with IRQ because of the above hard-coded flag.
if yes - Over all approach for such kind of issues - do not hard-code IRQ triggering 
flags in code in case of DT boot. DT core will configure it properly.



[...]

-- 
regards,
-grygorii

  parent reply	other threads:[~2016-01-20 17:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 12:29 PATCH [0/2] ARM: dts: am33xx: add support for Ka-Ro electronics TX48-7020 module Lothar Waßmann
2016-01-20 12:29 ` [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann
2016-01-20 16:42   ` Mark Brown
2016-01-21  7:05     ` Lothar Waßmann
2016-01-21 10:20       ` Mark Brown
2016-01-21 10:26         ` Lothar Waßmann
2016-01-21 11:11           ` Mark Brown
2016-01-21 11:33             ` Lothar Waßmann
2016-01-21 16:26               ` Mark Brown
2016-01-22  5:41                 ` Lothar Waßmann
2016-01-22 16:26                   ` Mark Brown
2016-01-25 12:37                     ` Lothar Waßmann
2016-01-25 12:41                       ` Mark Brown
2016-01-25 12:51                         ` Lothar Waßmann
2016-01-25 13:52                           ` Mark Brown
2016-01-20 17:29   ` Grygorii Strashko [this message]
2016-01-20 12:29 ` [PATCH 2/2] ARM: dts: am33xx: add support for Ka-Ro electronics TX48-7020 module Lothar Waßmann
2016-01-20 16:32   ` Robert Nelson
2016-02-12 22:07     ` Tony Lindgren

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=569FC40B.5030902@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=LW@KARO-electronics.de \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.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).