From patchwork Thu Oct 4 01:16:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 1544151 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D706ADFFEE for ; Thu, 4 Oct 2012 01:16:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933254Ab2JDBQx (ORCPT ); Wed, 3 Oct 2012 21:16:53 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:46426 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933167Ab2JDBQv (ORCPT ); Wed, 3 Oct 2012 21:16:51 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q941Gk0u015182; Wed, 3 Oct 2012 20:16:46 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q941Gkoa015807; Wed, 3 Oct 2012 20:16:46 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Wed, 3 Oct 2012 20:16:46 -0500 Received: from nucleus.nsc.com (nucleus.nsc.com [10.188.36.112]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id q941Gir3013802; Wed, 3 Oct 2012 20:16:46 -0500 From: Mike Turquette To: , CC: , , Mike Turquette , Mike Turquette Subject: [PATCH 2/5] ARM: omap: introduce .get_voltage callback Date: Wed, 3 Oct 2012 18:16:02 -0700 Message-ID: <1349313365-5262-3-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349313365-5262-1-git-send-email-mturquette@ti.com> References: <1349313365-5262-1-git-send-email-mturquette@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Mike Turquette Introduces a new callback to struct voltagedomain for retrieving the voltage of the voltage domain from the hardware. This will be used to populate voltdm->nominal_volt during initialization of the voltage code instead of waiting for the first call to voltdm_scale. In the event of an error or the inability to determine voltage the callback must return zero. It is the callers responsibility to gracefully degrade when presented with a voltage of zero. Signed-off-by: Mike Turquette Signed-off-by: Mike Turquette --- arch/arm/mach-omap2/voltage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index 0ac2caf..0ded54f 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h @@ -85,6 +85,7 @@ struct voltagedomain { u32 rate; } sys_clk; + unsigned long (*get_voltage) (struct voltagedomain *voltdm); int (*scale) (struct voltagedomain *voltdm, unsigned long target_volt);