From patchwork Mon Sep 26 23:31:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Wiedmeyer X-Patchwork-Id: 9351367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A7D2C6077A for ; Mon, 26 Sep 2016 23:32:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AB0D28EAA for ; Mon, 26 Sep 2016 23:32:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EDAF28EA7; Mon, 26 Sep 2016 23:32:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C784A28EA7 for ; Mon, 26 Sep 2016 23:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932792AbcIZXcP (ORCPT ); Mon, 26 Sep 2016 19:32:15 -0400 Received: from wiedmeyer.de ([85.116.192.112]:38938 "EHLO wiedmeyer.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932747AbcIZXcN (ORCPT ); Mon, 26 Sep 2016 19:32:13 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by wiedmeyer.localdomain (Postfix) with ESMTP id 785038E91C0 for ; Tue, 27 Sep 2016 01:32:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiedmeyer.de; s=dkim; t=1474932731; bh=kGu5mnusvbN63TEuDLIpkSxnVMUEs71GuQlWNzdaNVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ClJkOhHgZq29U30OroUk1FnbnFltEofo6ILgUwJ2fumWWqCBRv/6LC9mjoKby6JCA +KeyoTtwoQYTBVMhevLBMgw7dMfVNsiYHtVy0Fm6nYeARjb+MQ3euC1g4Oykb92M1t 1YadRs/JnkjqiyZBlmEBQPr7xdRlOr+e9OyKImwlB6QjeVsX+lh6EB+6I43o9SfOv8 BAgajhp+tOxy1+2jM8AYYcY7rs0uHjuR80wNmCP59zwHWsJ30oK4glSVbzjOuS8pnL I3OV+vLgPnRvtupWTMfMkOFst6ogECL6iywlFYAfZwaa4H0N2nCgP/KlpPiiDynQYa IZ6CEUZIJXikg== X-Virus-Scanned: Debian amavisd-new at wiedmeyer.de Received: from wiedmeyer.de ([127.0.0.1]) by localhost (wiedmeyer.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4iA94DDCK6Y6 for ; Tue, 27 Sep 2016 01:32:09 +0200 (CEST) Received: from machinist.lan (OpenWrt.lan [192.168.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by wiedmeyer.localdomain (Postfix) with ESMTPSA id 55A5B8E91BD; Tue, 27 Sep 2016 01:31:54 +0200 (CEST) From: Wolfgang Wiedmeyer To: krzk@kernel.org, sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org Cc: cw00.choi@samsung.com, b.zolnierkie@samsung.com, broonie@kernel.org, lgirdwood@gmail.com, lee.jones@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Wolfgang Wiedmeyer Subject: [PATCH 1/3] mfd: max77693: Add defines for charger current control Date: Tue, 27 Sep 2016 01:31:08 +0200 Message-Id: <1474932670-11953-2-git-send-email-wolfgit@wiedmeyer.de> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1474932670-11953-1-git-send-email-wolfgit@wiedmeyer.de> References: <1474932670-11953-1-git-send-email-wolfgit@wiedmeyer.de> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This prepares for an updated regulator and charger driver. The defines are needed to set the maximum input current and the fast charge current. Signed-off-by: Wolfgang Wiedmeyer --- include/linux/mfd/max77693-private.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 3c7a63b..ca18344 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -222,6 +222,9 @@ enum max77693_charger_battery_state { #define CHG_CNFG_00_CHG_MASK 0x1 #define CHG_CNFG_00_BUCK_MASK 0x4 +/* MAX77693 CHG_CNFG_02 register */ +#define CHG_CNFG_02_CC_MASK 0x3F + /* MAX77693_CHG_REG_CHG_CNFG_01 register */ #define CHG_CNFG_01_FCHGTIME_SHIFT 0 #define CHG_CNFG_01_CHGRSTRT_SHIFT 4 @@ -258,6 +261,10 @@ enum max77693_charger_battery_state { /* MAX77693 CHG_CNFG_09 Register */ #define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F +#define CHG_CNFG_09_CHGIN_ILIM_500_MAX 500000 +#define CHG_CNFG_09_CHGIN_ILIM_500_MIN 470000 +#define CHG_CNFG_09_CHGIN_ILIM_0_MAX 60000 +#define CHG_CNFG_09_CHGIN_ILIM_0_MIN 0 /* MAX77693 CHG_CTRL Register */ #define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3