From patchwork Mon Jun 30 15:57:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 32766 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F2EC21131 for ; Mon, 30 Jun 2014 15:57:55 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rd18sf53891696iec.2 for ; Mon, 30 Jun 2014 08:57:54 -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 :in-reply-to:references: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=EWLpuplsLj1bbxZU6U8B00SQP8nfS3lGp4E8OSdmbQM=; b=hXsmeQXp3v/BuW3BVB+ju4+1vyUc2i/zWk25+7POxrgpRyJX9kSeByA9hMlc3MNKIA bYIjs48F+3mejTzybYfOK8UVsgx+lLWAXuyH6q7cgnKKb6o+lk6n3sk192w+39LDIKah kJeDpSXiQhci0HrugpeCi5/RD1VWztv3KWRURG3HwzuB+qPfX6quY7wH8gDNFiyUi209 RNwqfyVBhKSeKBXC+z8ruRF9qM3Lrx14bEktA3mYhFiwE20pFZJl0Yyu69lLa91ZSN/q E0kL+FgB5yMO5RKDtJb03IqPyGe0EXpW73D7ndo0fA2tnLvTsI0U5CNivBWfzkEiFE+j qCbA== X-Gm-Message-State: ALoCoQnyUYZVdREa1MrjYzS9fyVGSoPN2kCsfszgwJ5TLVXgwW4A+N2xqObkduq3pO8EBsQwH+qr X-Received: by 10.182.105.230 with SMTP id gp6mr23916781obb.18.1404143874615; Mon, 30 Jun 2014 08:57:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.114 with SMTP id o105ls1633552qgd.30.gmail; Mon, 30 Jun 2014 08:57:54 -0700 (PDT) X-Received: by 10.52.119.179 with SMTP id kv19mr32725804vdb.3.1404143874478; Mon, 30 Jun 2014 08:57:54 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id tk8si10214338vcb.62.2014.06.30.08.57.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 08:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hy10so7709986vcb.15 for ; Mon, 30 Jun 2014 08:57:54 -0700 (PDT) X-Received: by 10.220.203.134 with SMTP id fi6mr29024468vcb.18.1404143874395; Mon, 30 Jun 2014 08:57: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 tc5csp150360vcb; Mon, 30 Jun 2014 08:57:53 -0700 (PDT) X-Received: by 10.69.26.103 with SMTP id ix7mr52257615pbd.41.1404143873071; Mon, 30 Jun 2014 08:57:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ud3si23650574pac.2.2014.06.30.08.57.52; Mon, 30 Jun 2014 08:57:52 -0700 (PDT) Received-SPF: none (google.com: linux-omap-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 S1756004AbaF3P5u (ORCPT + 6 others); Mon, 30 Jun 2014 11:57:50 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:58251 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754706AbaF3P5r (ORCPT ); Mon, 30 Jun 2014 11:57:47 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5UFviAt002538; Mon, 30 Jun 2014 10:57:44 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5UFviHD026740; Mon, 30 Jun 2014 10:57:44 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 30 Jun 2014 10:57:43 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5UFvhbL011772; Mon, 30 Jun 2014 10:57:43 -0500 From: Nishanth Menon To: Liam Girdwood , Mark Brown , Samuel Ortiz , Lee Jones , Keerthy J CC: Tero Kristo , , , , Nishanth Menon Subject: [PATCH V2 6/6] regulator: palmas: Fix SMPS enable/disable/is_enable for tps65917 Date: Mon, 30 Jun 2014 10:57:39 -0500 Message-ID: <1404143859-8160-7-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1404143859-8160-1-git-send-email-nm@ti.com> References: <1404143859-8160-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@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.220.170 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 --- drivers/regulator/palmas-regulator.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index ae0f639..a7ce34d 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -1312,6 +1312,11 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic, return ret; pmic->current_reg_mode[id] = reg & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; + desc->enable_reg = PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, + rinfo->ctrl_addr); + desc->enable_mask = PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; + /* set_mode overrides this value */ + desc->enable_val = SMPS_CTRL_MODE_ON; desc->type = REGULATOR_VOLTAGE; desc->owner = THIS_MODULE;