lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 08 Aug 2014 12:58:50 +0200
From:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
CC:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Doug Anderson <dianders@...omium.org>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: max77686: fix support for devices without irq specified

Hello Krzysztof,

On 08/08/2014 12:54 PM, Krzysztof Kozlowski wrote:
>> >> 
>> >> 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.
>> > 
>> 
>> Although for Trats2 I see that arch/arm/boot/dts/exynos4412-trats2.dts defines
>> an interrupt, so I wonder why regmap_irq_get_virq() is giving an oops there:
>> 
>> max77686_pmic@09 {
>> 	compatible = "maxim,max77686";
>> 	interrupt-parent = <&gpx0>;
>> 	interrupts = <7 0>;
>> 	reg = <0x09>;
>> 	#clock-cells = <1>;
>> ...
> 
> Because I am a nasty user :) and I removed the interrupts properties
> manually (to test how the RTC will behave). Still the driver shouldn't
> oops.
> 

Oh, now it makes sense :)

Yes, I agree with you that the driver should not oops. The probe should fail
though if no IRQ domain was created on the MFD driver since that DT property is
required.

I'll send a fix for this today, thanks a lot for reporting it.

>> 
>> 
>> > So the max77686 RTC wakealarm was not working for these boards before?
> 
> I don't know for Odroid but on Trats2 it works fine.
> 
>> > 
>> > 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?
>> > 
>> 
>> By looking at Odroid's 3.8 based vendor tree I see that an IRQ for the max77686
>> PMIC is defined [0] using platform data:
>> 
>> static struct max77686_platform_data exynos4_max77686_info = {
>> 	.irq_gpio	= 	EXYNOS4_GPX3(2),
>> 	.ono		=	EXYNOS4_GPX1(2),
>> 	.num_regulators = ARRAY_SIZE(max77686_regulators),
>> 	.regulators = max77686_regulators,
>> ...
>> 
>> So maybe this information is missing in
>> arch/arm/boot/dts/exynos4412-odroid-common.dtsi?
> 
> Yes, it seems it is missing.
> 

Indeed.

> Best regards,
> Krzysztof
> 

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists