public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	Doug Anderson <dianders@chromium.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: max77686: fix support for devices without irq specified
Date: Fri, 08 Aug 2014 10:58:47 +0200	[thread overview]
Message-ID: <53E49147.5060307@collabora.co.uk> (raw)
In-Reply-To: <1407484788.21474.13.camel@AMDC1943>

Hello Krzysztof and Bartlomiej,

On 08/08/2014 09:59 AM, Krzysztof Kozlowski wrote:
> On czw, 2014-08-07 at 18:09 +0200, Bartlomiej Zolnierkiewicz wrote:
>> Before commit 6f1c1e71d933 ("mfd: max77686: Convert to use regmap_irq")
>> max77686_irq_init() return value was never checked so devices without
>> irq specified (like Hardkernel's Exynos4412 based ODROID-U3 board)
>> worked fine even though -ENODEV was returned by the function.  Add
>> handling for no irq specified case in max77686_i2c_probe() restoring
>> the previous driver's behavior.
>> 
>> The patch fixes boot for Hardkernel's Exynos4412 based ODROID-U3 board.
>> 
>> Error messages before the patch:
>> ...
>> [    0.163995] max77686 0-0009: Failed to request IRQ 0 for max77686-pmic: -22
>> [    0.164020] max77686 0-0009: failed to add PMIC irq chip: -22
>> [    0.164478] max77686: probe of 0-0009 failed with error -22
>> ...
>> 

I thought that not specifying an IRQ was not possible since the property says to
be required in Documentation/devicetree/bindings/mfd/max77686.txt:

Required properties:
- compatible : Must be "maxim,max77686";
- reg : Specifies the i2c slave address of PMIC block.
- interrupts : This i2c device has an IRQ line connected to the main SoC.
- interrupt-parent : The parent interrupt controller.

So if this change is necessary then we should also move "interrupt" to the
optional properties section.

> 
> Not sufficient. You have to also fix RTC driver (OOPS from Trats2
> attached). Also consider adding checks for (max77686->irq) to the
> suspend and resume.
> 

Right, the max77686 RTC driver assumes that an IRQ domain will be created on the
mfd driver so a virtual IRQ can be mapped for the RTC alarm1 IRQ. This
assumptions comes from the fact that the "interrupt" property is required
according to the DT binding doc.

So the max77686 RTC wakealarm was not working for these boards before?

Just to be sure that I understand the issue: these boards don't really have an
IRQ connected to the PMIC, is not that this information is just missing in the
Device Tree, right?

> Best regards,
> Krzysztof
> 
> 

Best regards,
Javier

  reply	other threads:[~2014-08-08  8:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 16:09 [PATCH] mfd: max77686: fix support for devices without irq specified Bartlomiej Zolnierkiewicz
2014-08-08  7:59 ` Krzysztof Kozlowski
2014-08-08  8:58   ` Javier Martinez Canillas [this message]
2014-08-08 10:09     ` Javier Martinez Canillas
2014-08-08 10:54       ` Krzysztof Kozlowski
2014-08-08 10:58         ` Javier Martinez Canillas
2014-08-08 12:24           ` Bartlomiej Zolnierkiewicz
2014-08-08 12:38             ` Javier Martinez Canillas

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=53E49147.5060307@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=b.zolnierkie@samsung.com \
    --cc=dianders@chromium.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sameo@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