Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1313404
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional |
| Date | 2016-01-20 18:40 +0100 |
| Message-ID | <qT4TE-1oo-15@gated-at.bofh.it> (permalink) |
| References | <qT0dk-6mw-13@gated-at.bofh.it> <qT0dl-6mw-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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(<c3589->poll_timer, ltc3589_poll_func);
> + schedule_delayed_work(<c3589->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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
PATCH [0/2] ARM: dts: am33xx: add support for Ka-Ro electronics TX48-7020 module Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-20 13:40 +0100
[PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-20 13:40 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-20 17:50 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-21 08:10 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-21 11:30 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-21 11:30 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-21 12:20 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-21 12:40 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-21 17:30 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-22 06:50 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-22 17:30 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-25 13:40 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-25 13:50 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Lothar Waßmann <LW@KARO-electronics.de> - 2016-01-25 14:00 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Mark Brown <broonie@kernel.org> - 2016-01-25 15:00 +0100
Re: [PATCH 1/2] regulator: ltc3589: make IRQ optional Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-20 18:40 +0100
csiph-web