From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com. [210.118.77.14]) by gmr-mx.google.com with ESMTPS id jg4si1228114pac.2.2016.02.03.22.58.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 03 Feb 2016 22:58:46 -0800 (PST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O2000JSHGPTVA80@mailout4.w1.samsung.com> for rtc-linux@googlegroups.com; Thu, 04 Feb 2016 06:58:41 +0000 (GMT) Subject: [rtc-linux] Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally To: Laxman Dewangan , lee.jones@linaro.org, alexandre.belloni@free-electrons.com, javier@osg.samsung.com References: <1454507233-9959-1-git-send-email-ldewangan@nvidia.com> <1454507233-9959-6-git-send-email-ldewangan@nvidia.com> <56B296F6.3060002@samsung.com> <56B2B17A.1000509@nvidia.com> Cc: cw00.choi@samsung.com, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com From: Krzysztof Kozlowski Message-id: <56B2F6A2.5060103@samsung.com> Date: Thu, 04 Feb 2016 15:58:42 +0900 MIME-version: 1.0 In-reply-to: <56B2B17A.1000509@nvidia.com> Content-type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932736AbcBDG6p (ORCPT ); Thu, 4 Feb 2016 01:58:45 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:63274 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753469AbcBDG6o (ORCPT ); Thu, 4 Feb 2016 01:58:44 -0500 X-AuditID: cbfec7f5-f79b16d000005389-ea-56b2f6a1ae6f Subject: Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally To: Laxman Dewangan , lee.jones@linaro.org, alexandre.belloni@free-electrons.com, javier@osg.samsung.com References: <1454507233-9959-1-git-send-email-ldewangan@nvidia.com> <1454507233-9959-6-git-send-email-ldewangan@nvidia.com> <56B296F6.3060002@samsung.com> <56B2B17A.1000509@nvidia.com> Cc: cw00.choi@samsung.com, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com From: Krzysztof Kozlowski X-Enigmail-Draft-Status: N1110 Message-id: <56B2F6A2.5060103@samsung.com> Date: Thu, 04 Feb 2016 15:58:42 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-version: 1.0 In-reply-to: <56B2B17A.1000509@nvidia.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsVy+t/xa7oLv20KM7i7k8+i49piJovrX56z Wrx5u4bJ4vULQ4ul+1azWNz/epTR4vKuOWwW+zs7GB04PJ5susjosWfiSTaPO9f2sHn0Nr9j 89jSf5fdo2/LKkaPz5vkAtijuGxSUnMyy1KL9O0SuDJ+bpnMVHBJuGLn0/oGxjP8XYycHBIC JhIPThxng7DFJC7cWw9kc3EICSxllGib/poJJCEk8JRR4mKHNIgtLJAgserhLXaQIhGBBkaJ zzdfM0N07GGU2PlhJVgHs0CoxIWX15lBbDYBY4nNy5dArZCT6O2exAJi8wpoSXT0rAOzWQRU JT4efgTWKyoQIXG4s4sdokZQ4sfke2A1nED133Z3M3YxcgDN15O4f1ELYpW8xOY1b5knMArO QtIxC6FqFpKqBYzMqxhFU0uTC4qT0nON9IoTc4tL89L1kvNzNzFC4uLrDsalx6wOMQpwMCrx 8DZ4bgoTYk0sK67MPcQowcGsJMLr9RIoxJuSWFmVWpQfX1Sak1p8iFGag0VJnHfmrvchQgLp iSWp2ampBalFMFkmDk6pBsbUgJ+zz2holqyeGX91QXPpncCdye0OwVUGM59PWTJ3Z2eAfOnl nSmFXkoKHy4/21KZwCl1ZtZmm4x9Ap5KF1v/sV63C3vLZvlfYM2sP6ECvXnP7oT1CN3en5Sy gTX07IfomgzH/cdmfwkwf7DqyWyp5T7iJ4yvnFv2ftOL/LeqF5cvOduYrrlJiaU4I9FQi7mo OBEA2NLFWIcCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > > >