From patchwork Tue Nov 13 13:21:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Majewski?= X-Patchwork-Id: 198650 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D181B2C00C2 for ; Wed, 14 Nov 2012 00:24:06 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 56BA94A1BC; Tue, 13 Nov 2012 14:24:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VYLwpWXNeQX1; Tue, 13 Nov 2012 14:24:03 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 185D64A1A5; Tue, 13 Nov 2012 14:23:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B862B4A134 for ; Tue, 13 Nov 2012 14:23:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wtDbSk+mBw2f for ; Tue, 13 Nov 2012 14:23:19 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id 8FFE24A13F for ; Tue, 13 Nov 2012 14:22:56 +0100 (CET) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDF005X7H5HJYA0@mailout2.samsung.com> for u-boot@lists.denx.de; Tue, 13 Nov 2012 22:22:54 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-10-50a249aec74f Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id B0.B3.01231.EA942A05; Tue, 13 Nov 2012 22:22:54 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MDF00AK5H593U10@mmp1.samsung.com> for u-boot@lists.denx.de; Tue, 13 Nov 2012 22:22:54 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Tue, 13 Nov 2012 14:21:58 +0100 Message-id: <1352812937-15998-8-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1352812937-15998-1-git-send-email-l.majewski@samsung.com> References: <1352812937-15998-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAJMWRmVeSWpSXmKPExsVy+t9jAd11nosCDOafMbV4u7eT3YHR4+yd HYwBjFFcNimpOZllqUX6dglcGYf/qBRsEah48P4WawPjTN4uRg4OCQETiSP39LoYOYFMMYkL 99azdTFycQgJLGKUuPR2OZSzmEni6/UTjCBVbAJ6Ep/vPmUCsUUEJCR+9V9lBCliFrjDKPH/ 2guwhLBAkkTv8QvMIBtYBFQl2n8FgYR5Bdwkdr58zQSxTV7i6f0+NpASTgF3iT/nwcJCQCWb dx5lnsDIu4CRYRWjaGpBckFxUnquoV5xYm5xaV66XnJ+7iZGsL+fSe1gXNlgcYhRgINRiYf3 hsvCACHWxLLiytxDjBIczEoivOfdFgUI8aYkVlalFuXHF5XmpBYfYpTmYFES5232SAkQEkhP LEnNTk0tSC2CyTJxcEo1MPYtU5dV/jL5u8LNxi8NqzMmtgRXGgkv4D0yX9LvcnTWLsUvvt3H 1VRZog/7z68qk1IUZ7+wc+JUxZnP5f9KL3sW1fP52TId3Qf6Zx/8YG1xropYOKf29sXQa7Mt Vi/cnP7mUeMXZ6etFhPidOepOPnxe167LhfZXqV1ukNByjPzraPh09eGekosxRmJhlrMRcWJ AAEueezzAQAA Cc: Kyungmin Park , Tom Rini Subject: [U-Boot] [PATCH v7 07/26] pmic:chrg: Common information about charger and battery (power_chrg.h) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de New power_chrg.h file has been added to "bind" together common information about charging battery available in the system. Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Stefano Babic --- Changes for v2: - Move struct battery elements to a separate file Changes for v3: - None Changes for v4: - None Changes for v5: - None Changes for v6: - None Changes for v7: - None --- include/power/power_chrg.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 include/power/power_chrg.h diff --git a/include/power/power_chrg.h b/include/power/power_chrg.h new file mode 100644 index 0000000..24c4cde --- /dev/null +++ b/include/power/power_chrg.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2012 Samsung Electronics + * Lukasz Majewski + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __POWER_CHARGER_H_ +#define __POWER_CHARGER_H_ + +/* Type of available chargers */ +enum { + CHARGER_NO = 0, + CHARGER_TA, + CHARGER_USB, + CHARGER_TA_500, + CHARGER_UNKNOWN, +}; + +enum { + UNKNOWN, + EXT_SOURCE, + CHARGE, + NORMAL, +}; + +#endif /* __POWER_CHARGER_H_ */