From patchwork Thu Jun 26 18:31:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 32588 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2717D2066E for ; Thu, 26 Jun 2014 18:31:59 +0000 (UTC) Received: by mail-we0-f199.google.com with SMTP id u56sf3096888wes.10 for ; Thu, 26 Jun 2014 11:31:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=PDNBEkQvkNywog7HECNMkW5gXXGEmo48Jii5EiJWvQI=; b=JW0aamKgMYB9RoaYoqCOCMeQPTRTF5EAr+FDRnibUYRTmdeD/e0mU47TLkk4yTnHTo wN3F24e7HrXbphupezZ+/D0F9Jaloa6EKSdVsdUz//iv0PkP6DVEz/4umBd0qtbUAZNv lSy7IFcNAHbIu91TMY8nR0MIUiZfxZRSc1t8gn964zPfcqO3iM28/WkX1nc3COjiqZEx gfjP58Y1IIu3hT0/ajZtk9Tq0X+c/qK0Pyw6BPmDy95+aVaFwmcFjiZvY7Q/UW5Cf+Cx tTGi93mzeoom/8XsF9aGX4fSp2GBZMT1R3OHUukjnDJldJCu3XP5aR5PLKdp5A7bR3tT NbyA== X-Gm-Message-State: ALoCoQlJjabT3RxwK0OTTZ07r9Zrw0gwaP1+rCQhSRn7Kkg5RlqYQi36d9ZjSNov7qTDV3OjJDLK X-Received: by 10.180.90.13 with SMTP id bs13mr734402wib.6.1403807515262; Thu, 26 Jun 2014 11:31:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.74 with SMTP id w68ls352428qgw.53.gmail; Thu, 26 Jun 2014 11:31:55 -0700 (PDT) X-Received: by 10.58.8.12 with SMTP id n12mr15366581vea.28.1403807515122; Thu, 26 Jun 2014 11:31:55 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id o5si5139199vez.30.2014.06.26.11.31.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 11:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.179 as permitted sender) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id sa20so4152467veb.38 for ; Thu, 26 Jun 2014 11:31:55 -0700 (PDT) X-Received: by 10.220.203.134 with SMTP id fi6mr5357665vcb.18.1403807514974; Thu, 26 Jun 2014 11:31:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp50333vcb; Thu, 26 Jun 2014 11:31:54 -0700 (PDT) X-Received: by 10.68.136.99 with SMTP id pz3mr24261384pbb.150.1403807514270; Thu, 26 Jun 2014 11:31:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wl6si11094183pab.29.2014.06.26.11.31.53; Thu, 26 Jun 2014 11:31:53 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751286AbaFZSbo (ORCPT + 27 others); Thu, 26 Jun 2014 14:31:44 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:47118 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797AbaFZSbn (ORCPT ); Thu, 26 Jun 2014 14:31:43 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5QIVbEa007597; Thu, 26 Jun 2014 13:31:37 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5QIVb9f018614; Thu, 26 Jun 2014 13:31:37 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Thu, 26 Jun 2014 13:31:37 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5QIVboe028745; Thu, 26 Jun 2014 13:31:37 -0500 From: Nishanth Menon To: Mark Brown , Liam Girdwood CC: Keerthy , , , , Nishanth Menon Subject: [PATCH] regulator: tps65917: Fix SMPS enable/disable/is_enable Date: Thu, 26 Jun 2014 13:31:34 -0500 Message-ID: <1403807494-23907-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nm@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , We use regmap regulator ops to enable/disable and check if regulator is enabled for various SMPS. However, these depend on valid enable_reg, enable_mask and enable_value in regulator descriptor. So, similar to fix we did in commit 318dbb02b50c ("regulator: palmas: Fix SMPS enable/disable/is_enabled"), populate the same for TPS65917 SMPS registration. LDO definitions are already in place. Fixes: d6f83370ed97 ("regulator: palmas: Add tps65917 PMIC support") Signed-off-by: Nishanth Menon Tested-by: Keerthy . --- Applies on: git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git branch: topic/palmas (4c0c9ca Merge remote-tracking branch 'regulator/fix/palmas' into regulator-palmas) Note: Ignored the minor style check from checkpatch --strict as fixing it would create an 80 char warning drivers/regulator/palmas-regulator.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 7c8b441..c7aa1b1 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -1333,6 +1333,14 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic, pmic->current_reg_mode[id] = reg & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; + pmic->desc[id].enable_reg = + PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, + palmas_regs_info[id].ctrl_addr); + pmic->desc[id].enable_mask = + PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; + /* set_mode overrides this value */ + pmic->desc[id].enable_val = SMPS_CTRL_MODE_ON; + pmic->desc[id].type = REGULATOR_VOLTAGE; pmic->desc[id].owner = THIS_MODULE;