From patchwork Thu Jun 23 20:46:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 913822 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5NKl90x032495 for ; Thu, 23 Jun 2011 20:47:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934413Ab1FWUrH (ORCPT ); Thu, 23 Jun 2011 16:47:07 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:49754 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933925Ab1FWUrF (ORCPT ); Thu, 23 Jun 2011 16:47:05 -0400 Received: by pzk9 with SMTP id 9so1398956pzk.19 for ; Thu, 23 Jun 2011 13:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=QAIZ1veOBwICePJwtpKWq7akF5GdN+ZxiZ1fmlN6CFg=; b=qy4eUkTqqAxSyvsfTulzVaWhqxuERO8HpCxKbRODJoFYo6faJNXdyruiPs3i6edGKP fAB33M8sltZbMgmHyCwum4ub4blNpPlLVZfTpXu3Nx4NbDs0wSjLo0iaHNC5L2ZvuAf7 Myk3fFEkGcS8yWTEuaX5ck4mO3m0A3FhihLu4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=JE3y962puSHutnUJ4UZIP5xo+fr92jd4IyM4Iz2tGgOyLPrRiwmB5eU14UWt73WNgx iy38l0v4xzIpFtEQObvcdYOFoPYjGPcxV9QJ6T/Lc4hqzfvVV32mg7ivBuZZCI2lddGT u+f/hPpi+4jPd6XsfqoUAVsnNVQ5/mouzq0+Q= Received: by 10.142.196.18 with SMTP id t18mr523031wff.152.1308862025252; Thu, 23 Jun 2011 13:47:05 -0700 (PDT) Received: from localhost.localdomain ([122.167.86.144]) by mx.google.com with ESMTPS id d15sm1337399wfl.18.2011.06.23.13.47.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 13:47:04 -0700 (PDT) From: Jassi Brar To: linux-kernel@vger.kernel.org Cc: ti@lists.linaro.org, linux-omap@vger.kernel.org, lrg@ti.com, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com, Jassi Brar Subject: [PATCH] regulator: twl: Add 'fixed' set_voltage callback Date: Fri, 24 Jun 2011 02:16:54 +0530 Message-Id: <1308862014-11212-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.7.4.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 23 Jun 2011 20:47:10 +0000 (UTC) Define dummy set_voltage callback for fixed lines, without which voltage constraints fail to apply. Signed-off-by: Jassi Brar --- drivers/regulator/twl-regulator.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 87fe0f7..8223e49 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -591,10 +591,18 @@ static int twlfixed_get_voltage(struct regulator_dev *rdev) return info->min_mV * 1000; } +static int twlfixed_set_voltage(struct regulator_dev *rdev, + int min_uV, int max_uV, unsigned *selector) +{ + *selector = min_uV / 1000; + return 0; +} + static struct regulator_ops twl4030fixed_ops = { .list_voltage = twlfixed_list_voltage, .get_voltage = twlfixed_get_voltage, + .set_voltage = twlfixed_set_voltage, .enable = twl4030reg_enable, .disable = twl4030reg_disable, @@ -609,6 +617,7 @@ static struct regulator_ops twl6030fixed_ops = { .list_voltage = twlfixed_list_voltage, .get_voltage = twlfixed_get_voltage, + .set_voltage = twlfixed_set_voltage, .enable = twl6030reg_enable, .disable = twl6030reg_disable,