Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967926Ab3DSDll (ORCPT ); Thu, 18 Apr 2013 23:41:41 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:59970 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967859Ab3DSDlj (ORCPT ); Thu, 18 Apr 2013 23:41:39 -0400 Message-ID: <1366342893.20735.0.camel@phoenix> Subject: [PATCH RFT] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7 From: Axel Lin To: Mark Brown Cc: Laxman Dewangan , Graeme Gregory , Liam Girdwood , linux-kernel@vger.kernel.org Date: Fri, 19 Apr 2013 11:41:33 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.2-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1083 Lines: 34 SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually writes 0 to PALMAS_SMPS12_CTRL(0x0) register when set_ramp_delay callback is called for SMPS3 and SMPS7. Signed-off-by: Axel Lin --- drivers/regulator/palmas-regulator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index f26344e..cfa143a 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -438,6 +438,10 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev, unsigned int addr = palmas_regs_info[id].tstep_addr; int ret; + /* SMPS3 and SMPS7 do not have tstep_addr setting */ + if (!addr) + return 0; + if (ramp_delay <= 0) reg = 0; else if (ramp_delay < 2500) -- 1.7.10.4 -- 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/