From patchwork Sun May 1 08:57:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Haas X-Patchwork-Id: 8988401 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 99B769F39D for ; Sun, 1 May 2016 08:58:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA7BD202EB for ; Sun, 1 May 2016 08:58:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC095202AE for ; Sun, 1 May 2016 08:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbcEAI56 (ORCPT ); Sun, 1 May 2016 04:57:58 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:55345 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbcEAI54 (ORCPT ); Sun, 1 May 2016 04:57:56 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id E231C4208D; Sun, 1 May 2016 10:57:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id S_8rktf9DEUd; Sun, 1 May 2016 10:57:52 +0200 (CEST) From: Michael Haas To: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, maxime.ripard@free-electrons.com, wens@csie.org, lee.jones@linaro.org, sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org Cc: degoede@redhat.com, bonbons@linux-vserver.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux@arm.linux.org.uk, linux-sunxi@googlegroups.com, Michael Haas Subject: [PATCH v2 2/6] mfd: axp20x: Add register bits for axp20x-ac-power Date: Sun, 1 May 2016 10:57:23 +0200 Message-Id: <1462093047-7885-3-git-send-email-haas@computerlinguist.org> In-Reply-To: <1462093047-7885-1-git-send-email-haas@computerlinguist.org> References: <1462093047-7885-1-git-send-email-haas@computerlinguist.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 This change adds some register bit definitions used by the axp20x-ac-power driver. Signed-off-by: Michael Haas --- include/linux/mfd/axp20x.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index d82e7d5..c4c6dfa 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -90,6 +90,17 @@ enum { #define AXP22X_ALDO3_V_OUT 0x2a #define AXP22X_CHRG_CTRL3 0x35 + +/* Fields of AXP20X_PWR_INPUT_STATUS */ +#define AXP20X_PWR_STATUS_AC_PRESENT BIT(7) +#define AXP20X_PWR_STATUS_AC_AVAILABLE BIT(6) +#define AXP20X_PWR_STATUS_AC_VBUS_SHORT BIT(1) +#define AXP20X_PWR_STATUS_AC_VBUS_SEL BIT(0) + +/* Fields of AXP20X_ADC_EN1 */ +#define AXP20X_ADC_EN1_ACIN_VOLT BIT(5) +#define AXP20X_ADC_EN1_ACIN_CURR BIT(4) + /* Interrupt */ #define AXP152_IRQ1_EN 0x40 #define AXP152_IRQ2_EN 0x41