[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <56B314F4.6010605@samsung.com>
Date: Thu, 04 Feb 2016 18:08:04 +0900
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: Laxman Dewangan <ldewangan@...dia.com>, lee.jones@...aro.org,
alexandre.belloni@...e-electrons.com, javier@....samsung.com
Cc: cw00.choi@...sung.com, linux-kernel@...r.kernel.org,
rtc-linux@...glegroups.com
Subject: Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,
irq chip locally
On 04.02.2016 15:58, Krzysztof Kozlowski wrote:
> On 04.02.2016 11:03, Laxman Dewangan wrote:
>>
>> On Thursday 04 February 2016 05:40 AM, Krzysztof Kozlowski wrote:
>>> On 03.02.2016 22:47, Laxman Dewangan wrote:
>>>>
>>>> Changes from V2:
>>>> - Taken care of missed sequence for removing the resource.
>>>> - Fix the crash when doing unbind by using requested_threaded_irq()
>>>> instead of demv_requested_threaded_irq().
>>>>
>>>> drivers/mfd/max77686.c | 85 +-------------------
>>>> drivers/rtc/rtc-max77686.c | 148
>>>> ++++++++++++++++++++++++++++++-----
>>>> include/linux/mfd/max77686-private.h | 3 -
>>>> 3 files changed, 130 insertions(+), 106 deletions(-)
>>>>
>>> Looks good and works properly (RTC, unbind/rebind, wakealarm again)
>>> but... after applying this patch the device cannot suspend to RAM after
>>> unbind/rebind.
>>>
>>> Reproduce path, after booting:
>>> $ echo max77686-rtc > /sys/bus/platform/drivers/max77686-rtc/unbind
>>> $ echo max77686-rtc > /sys/bus/platform/drivers/max77686-rtc/bind
>>> $ rtcwake -d rtc2 -m mem -s 5 -v
>>> (or instead of rtcwake: echo mem > /sys/power/state)
>>
>>
>> My device does not support suspend and hence I can nto test this part
>> and need your help to debug it.
>>
>> Few question to narrow down:
>> 1. Have you try to bind/unbind mfd driver to make sure that there is no
>> inherent issue in the framework driver?
>
> That might be tricky... there are also regulator and clock drivers. I
> would have to disable them... It might take me some time to prepare an
> environment for this.
>
>>
>> 2. Does suspend entry and wake alarm work if you dont do unbind and just
>> bind it and enter into suspend?
> If by "just bind" you mean bind during system boot, then answer is yes.
> Without the unbind+bind, the system suspends correctly.
>
> Without your patch, system suspends correctly always (no rebind, rebind
> etc.).
>
> Actually I don't have to re-bind the RTC. Just:
> $ echo max77686-rtc > /sys/bus/platform/drivers/max77686-rtc/unbind
> $ echo mem > /sys/power/state
> triggers the issue.
>
>>
>> 3. Can you try locally to not use devm_regmap_init_i2c() and just use
>> the regmap_init_i2c() and proper removal of this from error path and
>> remove callback?
>
> I'll try to find some time for that. Maybe tomorrow.
regmap_init_i2c does not help. However helps commenting out the:
regmap_del_irq_chip(info->rtc_irq, info->rtc_irq_data);
from remove() callback.
BR,
Krzysztof
Powered by blists - more mailing lists