Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630Ab3DOIuv (ORCPT ); Mon, 15 Apr 2013 04:50:51 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:63120 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501Ab3DOIut (ORCPT ); Mon, 15 Apr 2013 04:50:49 -0400 MIME-Version: 1.0 X-Originating-IP: [114.39.99.165] In-Reply-To: References: <1365424274.21989.2.camel@phoenix> <516BB444.7010508@stericsson.com> Date: Mon, 15 Apr 2013 16:50:45 +0800 Message-ID: Subject: Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators From: Axel Lin To: =?ISO-8859-1?Q?Bengt_J=F6nsson?= Cc: Mark Brown , Lee Jones , Yvan FILLION , Liam Girdwood , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1419 Lines: 40 > My understanding is for shared mode regulators: > It can be in LP mode only when *BOTH* are in LP mode. > If only one of the regulator in HP mode, then *BOTH* should be in HP mode. > Did I misunderstand something? Let me put this issue this way: Current code behavior: get_mode() returns IDLE if only one lp_mode_req flag is true, but mode register value is HP. AB8540_LDO_ANAMIC1 AB8540_LDO_ANAMIC2 mode register get_mode() returns lp_mode_req=true lp_mode_req=true HP REGULATOR_MODE_NORMAL lp_mode_req=true lp_mode_req=false HP REGULATOR_MODE_IDLE lp_mode_req=false lp_mode_req=true HP REGULATOR_MODE_IDLE lp_mode_req=false lp_mode_req=false LP REGULATOR_MODE_IDLE with this path: mode register value is consistent with get_mode(). AB8540_LDO_ANAMIC1 AB8540_LDO_ANAMIC2 mode register get_mode() returns lp_mode_req=true lp_mode_req=true HP REGULATOR_MODE_NORMAL lp_mode_req=true lp_mode_req=false HP REGULATOR_MODE_NORMAL lp_mode_req=false lp_mode_req=true HP REGULATOR_MODE_NORMAL lp_mode_req=false lp_mode_req=false LP REGULATOR_MODE_IDLE -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/