From patchwork Sat Dec 27 17:52:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 5544991 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97246BF6C3 for ; Sat, 27 Dec 2014 21:47:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD9CF2020F for ; Sat, 27 Dec 2014 21:46:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2C84020173 for ; Sat, 27 Dec 2014 21:46:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751543AbaL0Rx3 (ORCPT ); Sat, 27 Dec 2014 12:53:29 -0500 Received: from filtteri1.pp.htv.fi ([213.243.153.184]:45563 "EHLO filtteri1.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbaL0RxW (ORCPT ); Sat, 27 Dec 2014 12:53:22 -0500 Received: from localhost (localhost [127.0.0.1]) by filtteri1.pp.htv.fi (Postfix) with ESMTP id 6C77021B898; Sat, 27 Dec 2014 19:53:21 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp5.welho.com ([213.243.153.39]) by localhost (filtteri1.pp.htv.fi [213.243.153.184]) (amavisd-new, port 10024) with ESMTP id O-C-99i+ueNp; Sat, 27 Dec 2014 19:53:14 +0200 (EET) Received: from amd-fx-6350.bb.dnainternet.fi (91-145-91-118.bb.dnainternet.fi [91.145.91.118]) by smtp5.welho.com (Postfix) with ESMTP id 0271C5BC009; Sat, 27 Dec 2014 19:53:08 +0200 (EET) From: Aaro Koskinen To: Tony Lindgren , Samuel Ortiz , Lee Jones , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Aaro Koskinen Subject: [PATCH 6/7] mfd: menelaus: make vcore and regulator controls internal Date: Sat, 27 Dec 2014 19:52:58 +0200 Message-Id: <1419702779-16001-7-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.2.0 In-Reply-To: <1419702779-16001-1-git-send-email-aaro.koskinen@iki.fi> References: <1419702779-16001-1-git-send-email-aaro.koskinen@iki.fi> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make vcore and regulator control functions internal to the driver. Signed-off-by: Aaro Koskinen --- drivers/mfd/menelaus.c | 13 +++++++++++-- include/linux/mfd/menelaus.h | 12 ------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 4a900cc..8660adf 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c @@ -163,6 +163,15 @@ #define MCT_PIN_ST_S1_CD_ST (1 << 0) #define MCT_PIN_ST_S2_CD_ST (1 << 1) +#define EN_VPLL_SLEEP (1 << 7) +#define EN_VMMC_SLEEP (1 << 6) +#define EN_VAUX_SLEEP (1 << 5) +#define EN_VIO_SLEEP (1 << 4) +#define EN_VMEM_SLEEP (1 << 3) +#define EN_DC3_SLEEP (1 << 2) +#define EN_DC2_SLEEP (1 << 1) +#define EN_VC_SLEEP (1 << 0) + static void menelaus_work(struct work_struct *_menelaus); struct menelaus_chip { @@ -534,7 +543,7 @@ static const struct menelaus_vtg_value vcore_values[] = { { 1450, 18 }, }; -int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV) +static int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV) { int fval, rval, val, ret; struct i2c_client *c = the_menelaus->client; @@ -743,7 +752,7 @@ int menelaus_get_slot_pin_states(void) } EXPORT_SYMBOL(menelaus_get_slot_pin_states); -int menelaus_set_regulator_sleep(int enable, u32 val) +static int menelaus_set_regulator_sleep(int enable, u32 val) { int t, ret; struct i2c_client *c = the_menelaus->client; diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h index 21eeff5..bcabc03 100644 --- a/include/linux/mfd/menelaus.h +++ b/include/linux/mfd/menelaus.h @@ -18,17 +18,5 @@ extern int menelaus_set_vaux(unsigned int mV); extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); extern int menelaus_set_slot_sel(int enable); extern int menelaus_get_slot_pin_states(void); -extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); - -#define EN_VPLL_SLEEP (1 << 7) -#define EN_VMMC_SLEEP (1 << 6) -#define EN_VAUX_SLEEP (1 << 5) -#define EN_VIO_SLEEP (1 << 4) -#define EN_VMEM_SLEEP (1 << 3) -#define EN_DC3_SLEEP (1 << 2) -#define EN_DC2_SLEEP (1 << 1) -#define EN_VC_SLEEP (1 << 0) - -extern int menelaus_set_regulator_sleep(int enable, u32 val); #endif