From patchwork Fri Oct 19 15:43:54 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: 192748 X-Patchwork-Delegate: trini@ti.com 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 7CAAA2C0093 for ; Sat, 20 Oct 2012 02:46:15 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3E77B4A50F; Fri, 19 Oct 2012 17:45:54 +0200 (CEST) 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 IW1kFralmvD8; Fri, 19 Oct 2012 17:45:53 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 86A9E4A561; Fri, 19 Oct 2012 17:45:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B8964A49E for ; Fri, 19 Oct 2012 17:45:16 +0200 (CEST) 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 Tkbh7l2xC2Cw for ; Fri, 19 Oct 2012 17:45:13 +0200 (CEST) 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 B95434A4F3 for ; Fri, 19 Oct 2012 17:45:00 +0200 (CEST) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MC500EWED28VX00@mailout2.samsung.com> for u-boot@lists.denx.de; Sat, 20 Oct 2012 00:44:59 +0900 (KST) X-AuditID: cbfee61b-b7fd46d0000046e0-ea-5081757bb5be Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AE.39.18144.B7571805; Sat, 20 Oct 2012 00:44:59 +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 <0MC500FFND1YC320@mmp1.samsung.com> for u-boot@lists.denx.de; Sat, 20 Oct 2012 00:44:59 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Fri, 19 Oct 2012 17:43:54 +0200 Message-id: <1350661451-1273-8-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1350661451-1273-1-git-send-email-l.majewski@samsung.com> References: <1350661451-1273-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd3q0sYAg7sP+Cze7u1kd2D0OHtn B2MAYxSXTUpqTmZZapG+XQJXxocN95gLLvBXdHxfx97AeJGni5GTQ0LARKKvvZ0ZwhaTuHBv PVsXIxeHkMAiRolXvxcwQziLmSTev33MAlLFJqAn8fnuUyYQW0RAQuJX/1VGkCJmgQeMEl+a VoIlhAWSJK5cfQFmswioSmxq2cMKYvMKuEr8WXoPap28xNP7fUDrODg4BdyAtpWDhIWASi40 32WZwMi7gJFhFaNoakFyQXFSeq6RXnFibnFpXrpecn7uJkaw159J72Bc1WBxiFGAg1GJh5fx cUOAEGtiWXFl7iFGCQ5mJRFeN/bGACHelMTKqtSi/Pii0pzU4kOM0hwsSuK8zR4pAUIC6Ykl qdmpqQWpRTBZJg5OqQZG92drQ34r9NelreRXt92wSr38qveGO5m5W6RLbh8r6Di/rvqi4Gum v6x3Yphz70r9Tsy1UvDJfFPF+O7BoakCRXGLnomHWianPtFJisqrTzSInFQg5L/haLZIUOJG v9tXN7BerHoz/9FDVjb33pMLhb835012TshrD070DPe88cQpM3haZYISS3FGoqEWc1FxIgAC yD1r9gEAAA== Cc: Jaehoon Chung , Kyungmin Park , Tom Rini Subject: [U-Boot] [PATCH v3 07/24] 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 --- 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_ */