Linux RTC
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Laxman Dewangan <ldewangan@nvidia.com>,
	lee.jones@linaro.org, alexandre.belloni@free-electrons.com,
	javier@osg.samsung.com
Cc: cw00.choi@samsung.com, linux-kernel@vger.kernel.org,
	rtc-linux@googlegroups.com
Subject: [rtc-linux] Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally
Date: Thu, 04 Feb 2016 15:58:42 +0900	[thread overview]
Message-ID: <56B2F6A2.5060103@samsung.com> (raw)
In-Reply-To: <56B2B17A.1000509@nvidia.com>

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.

BR,
Krzysztof

> Three things we are doing new on this movement, i2c client creating,
> regmap_init and adding irq chip.
> And probably some issue on this calls?
> Let's try with not using devm_ * for this calls?
> 
> 
> 
> 

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2016-02-04  6:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 13:47 [rtc-linux] [PATCH V3 0/5] rtc: max77686: make max77686 rtc driver as IP driver Laxman Dewangan
2016-02-03 13:47 ` [rtc-linux] [PATCH V3 1/5] rtc: max77686: fix checkpatch error Laxman Dewangan
2016-02-03 13:47 ` [rtc-linux] [PATCH V3 2/5] rtc: max77686: use rtc regmap to access RTC registers Laxman Dewangan
2016-02-03 13:47 ` [rtc-linux] [PATCH V3 3/5] rtc: max77686: avoid reference of parent device info multiple places Laxman Dewangan
2016-02-03 13:47 ` [rtc-linux] [PATCH V3 4/5] mfd: max77686: do not set i2c client data for rtc i2c client Laxman Dewangan
2016-02-03 13:47 ` [rtc-linux] [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan
2016-02-04  0:10   ` [rtc-linux] " Krzysztof Kozlowski
2016-02-04  2:03     ` Laxman Dewangan
2016-02-04  2:50       ` Laxman Dewangan
2016-02-04  3:04         ` Javier Martinez Canillas
2016-02-04 16:49         ` Javier Martinez Canillas
2016-02-04  6:58       ` Krzysztof Kozlowski [this message]
2016-02-04  9:08         ` Krzysztof Kozlowski
2016-02-04 10:13           ` Laxman Dewangan
2016-02-04 17:35             ` Javier Martinez Canillas
2016-02-05 14:37           ` Laxman Dewangan
2016-02-06  5:30             ` Javier Martinez Canillas
2016-02-06  6:29               ` Laxman Dewangan
2016-02-06 13:01                 ` Javier Martinez Canillas
2016-02-06 13:40                   ` Laxman Dewangan

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=56B2F6A2.5060103@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=cw00.choi@samsung.com \
    --cc=javier@osg.samsung.com \
    --cc=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.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