Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328229

Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally
Date 2016-02-06 06:40 +0100
Message-ID <qZ3Lc-2Eb-3@gated-at.bofh.it> (permalink)
References (2 earlier) <qYfOq-Yj-3@gated-at.bofh.it> <qYhGy-2jU-3@gated-at.bofh.it> <qYm3w-52w-9@gated-at.bofh.it> <qYo5j-6yj-3@gated-at.bofh.it> <qYPRU-1xp-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Laxman,

Sorry for not doing this before but today was a busy one.

On 02/05/2016 11:37 AM, Laxman Dewangan wrote:
> Hi Krzysztof, Javier,
>
> On Thursday 04 February 2016 02:38 PM, Krzysztof Kozlowski wrote:
>> On 04.02.2016 15:58, Krzysztof Kozlowski wrote:
>>>> 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.
>>
>>
>
> I am trying to reproduce this in my system but I am ending up with different issue as it need to enable the suspend.

Ok, no worries. I can of course help testing on my system.

> can you please help on following experiment:
> 1. In probe/init, do
>     regmap_add_irq_chip()
>    regmap_del_irq_chip() and then
>    regmap_add_irq_chip() and
> then without unbind()/bind(), working or not?
>
>    This is to make sure that it is universal issue rather than calling from remove callback only.
>

This works, the system can S2R successfully.
  
> 2. Do regmap_add_irq_chip() but dont do any interrupt registration i.e. comment regmap_irq_get_virq() and request_threaded_irq() and hence free_irq().
> Then do unbind/bind and then suspend.
>    To make sure that this happen when only we have client registered interrupt.
>

This works as well.
  
> 3. Extension of 2
> Do regmap_add_irq_chip(), call  regmap_irq_get_virq() for creating irq mapping but dont do any interrupt registration i.e. comment request_threaded_irq() and hence free_irq().
> Then do unbind/bind and then suspend.
>    To make sure that this happen when only we have client registered interrupt or with mapping also.
>

This fails, so the problem seems to be with the mapping.

So I tried another scenario:

4. Call regmap_del_irq_chip() just after regmap_irq_get_virq() and try to S2R
    without doing any unbind before.

    To test if this is a general issue with regmap_del_irq_chip() after doing
    the IRQ mapping and not something specific to the remove callback.

The machine failed to boot. So now at least we have narrowed down the issue.

I've looked at both regmap_irq_get_virq() and regmap_del_irq_chip() but I
couldn't find any obvious cause for the issue we are seeing. But it's late
Friday so probably I should just stop here and take a fresh look on Monday.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-03 15:00 +0100
  Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-04 01:20 +0100
    Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-04 03:20 +0100
      Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-04 04:10 +0100
      Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-04 04:10 +0100
        Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-04 17:50 +0100
      Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-04 08:00 +0100
        Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-04 10:10 +0100
          Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-04 11:30 +0100
            Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-04 18:40 +0100
          Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-05 15:50 +0100
            Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-06 06:40 +0100
              Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 07:50 +0100
                Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-06 14:10 +0100
                Re: [PATCH V3 5/5] rtc: max77686: move initialisation of rtc regmap,  irq chip locally Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-06 15:00 +0100

csiph-web