Received: by 10.223.185.116 with SMTP id b49csp5293503wrg; Wed, 7 Mar 2018 09:20:16 -0800 (PST) X-Google-Smtp-Source: AG47ELuWHvwmO4jYJm8OzHKE6NnbDXuHBxtWvRGgvMKu+vCKHxRUuZQ+ussQlki7Or8z5y7DVShS X-Received: by 10.98.32.200 with SMTP id m69mr23286927pfj.82.1520443216869; Wed, 07 Mar 2018 09:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520443216; cv=none; d=google.com; s=arc-20160816; b=txFT2yKbHApvp5RUvNJzptj1l/BveN6Ue70YiYq5kHdS8A2U6uXXVSS6HFfrE4lWdR ULzXYZ1zrVgMCRNTRvIadn/Y52aTqWGWxEfKj5XcpJNF0KY56yPUBvFZJGf4Gj2sSzAi Y/vSf08GHLEwHhtWgXCltZ7ontxLL9PY/RneSTXDgso3kycg1MzyKjnXJ8ofZXdsF6oX nMYC9Gv21pbABQl4tgUel011SwtCgvKxkVfFLHdgYHbpnxqvLWHmMJA4moMWXrGyMp4M Tf9bl8j3UueS2VyRL30xePX3pJzbzyINRRa+Up11A7jrVINnMIhC7wveLYWaScMwPTgI Q0eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=XoL7zwRpDtwynNDxY8XkGN7aoqhwx7+tZA1hJss2QcQ=; b=ftpe8b4BhdLadneogiN5WepURuG2RUZVElBHIPSADwhuTabz4GjJr1yCfpJp7m7FHm E76ZFA4RhiC41sm3xziMlfnnueK1+2PZwdUPmsHJMOVbzMxhU+qwzOaqbmXV73aPiUPX k3r2WJTMKq/n1fZd7JhZ/R/MAM1t3HMNiZiYCFqY28+EkmUrx/nUDCwBZ4PH0ES8Pwh2 JKhPM8UZh17yK4eFSnbIZ/U7zLvIEZWcT5rhdiVzbkqss1Qg+NlWocRFkUD8Rj+GOKJp b5yZLT4vME7mZv0i2kCx8DuOvAsK6PsR+Ub+9FsgP8v2UAusOgnNSR0rrR66l8/BVXH7 4DgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si10558490pge.24.2018.03.07.09.20.01; Wed, 07 Mar 2018 09:20:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933578AbeCGPRO (ORCPT + 99 others); Wed, 7 Mar 2018 10:17:14 -0500 Received: from muru.com ([72.249.23.125]:59828 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932448AbeCGPRK (ORCPT ); Wed, 7 Mar 2018 10:17:10 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id EB55680BF; Wed, 7 Mar 2018 15:18:05 +0000 (UTC) Date: Wed, 7 Mar 2018 07:17:06 -0800 From: Tony Lindgren To: Maciej Purski Cc: Mark Brown , Fabio Estevam , linux-omap@vger.kernel.org, linux-kernel , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Marek Szyprowski , Bartlomiej Zolnierkiewicz Subject: Re: Regulator regression in next-20180305 Message-ID: <20180307151706.GG5799@atomide.com> References: <20180305231246.GB5799@atomide.com> <20180306163035.GE13586@sirena.org.uk> <20180307141027.GD7290@sirena.org.uk> <339dfd3e-5c5d-1e91-8890-5bfb69049d12@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <339dfd3e-5c5d-1e91-8890-5bfb69049d12@samsung.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Maciej Purski [180307 14:38]: > > On 03/07/2018 03:10 PM, Mark Brown wrote: > > On Wed, Mar 07, 2018 at 01:57:12PM +0100, Maciej Purski wrote: > > > > > I'm trying to figure out what is so special about these boards. The only > > > strange thing, that I haven't noticed at first, is that all regulators share > > > a common supply - dummy regulator. It is defined in anatop_regulator.c. > > > > No, that's a regulator framework thing - the regulator framework will > > use the dummy regulator as a supply when there's nothing described in > > the DT so long as the client doesn't explicitly tell it that the supply > > might be optional. > > > > Ok, thanks for explanation. I think I have found a possibly dangerous > scenario, but I can't see this situation possible in Fabio's case. > > Assume, that we have a chain of supplies, consisting of at least 3. Say: A->B->C. > > When we're setting voltage on A, we lock it, call balance_voltage(), lock > suppliers and call set_voltage_rdev(). So we have regulators A, B, C locked. > Then set_voltage_rdev() is trying to set voltage of its supply by calling > set_voltage_unlocked(). > > Now we're on the regulator B. Set_voltage_unlocked() calls > balance_voltage(), which again locks its supplies, if they exist. B's supply > is C, so we end up with having a deadlock on regulator C. > > Tony and Fabio, do you find this scenario possible on your boards? For mmc0 at least typically the supply is on the PMIC for omap variants and it's controlled over i2c or spi bus like most other regulators. Then boards some have additional GPIO controlled regulators. So yeah some kind of locking issue between two or more regulators on i2c or spi bus could be the reason. Regards, Tony