From patchwork Thu Jul 27 05:14:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 9866295 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 8CF2A60382 for ; Thu, 27 Jul 2017 05:16:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8171B287A8 for ; Thu, 27 Jul 2017 05:16:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75F4B287F1; Thu, 27 Jul 2017 05:16:29 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 EB4E1287F2 for ; Thu, 27 Jul 2017 05:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751849AbdG0FQJ (ORCPT ); Thu, 27 Jul 2017 01:16:09 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34978 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbdG0FPG (ORCPT ); Thu, 27 Jul 2017 01:15:06 -0400 Received: by mail-pf0-f181.google.com with SMTP id e75so968514pfj.2 for ; Wed, 26 Jul 2017 22:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=N9r5VEQXKz5m+Eensbdev1yPt9+TbahPK+INcDIqZFE=; b=keiPWwvYpLIQU9g73DfhWb8CsXVIw983viGupVyTTHC9Ljp+2a7LOO1CKnP1HlcK4y xxpuZHTRjExeORHhbzT0Q4mngifJ6pA0U+huZtXPx8nJIQhfmK9AVAHEBWz4TNbooYNF pI4O3S+JuFHLJvs26rLaAOO9ZazYBOtZ4UdAU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=N9r5VEQXKz5m+Eensbdev1yPt9+TbahPK+INcDIqZFE=; b=ZwNdTIhrw3aqcNHj8tOOTzUeEvrDxLRnq91OAA0Qp01NxjDxb1kp4U3ThCFuNDRotu Ek1mm6abhPlLVpIIYVftsS7KxwPIRuP6bYvR1uu84ktsqB3WgO380l25va55/MRyDZ3Y faUKcpLSFnlhJfTYMdbIgdoDzTRqzCGF82kTpWhBbO5/tENRn4pmPc0nuOGC4vhpKG5x i3UCRVBPSe83kO8TURvtfvKzSIjT6p07kF0JTmNOVZsNA0ezi7s33/s8C0gBr/CyoFYB xqkGy0QO4D618ZTbwn5atzWgzRctKDjADvYQzHOT6AsYZoMdKG2HD6PIgXP8yBgMqhkL 1E5g== X-Gm-Message-State: AIVw113HxuWZyhQjOzRMj7+q6crNyOo/DpZoYWKj1uzbHYrTLTr8COg6 kr1CvHS6knLCYVW0 X-Received: by 10.99.96.197 with SMTP id u188mr2943413pgb.340.1501132506033; Wed, 26 Jul 2017 22:15:06 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id n80sm35177443pfj.118.2017.07.26.22.15.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jul 2017 22:15:05 -0700 (PDT) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org, sre@kernel.org, lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: jun.li@nxp.com, peter.chen@freescale.com, broonie@kernel.org, john.stultz@linaro.org, neilb@suse.com, patches@opensource.wolfsonmicro.com, baolin.wang@linaro.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, device-mainlining@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v4 1/3] include: uapi: usb: Introduce USB charger type and state definition Date: Thu, 27 Jul 2017 13:14:36 +0800 Message-Id: <67d041fc5b387696874186f36231b8d696aec6ee.1501132173.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: 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 Introducing USB charger type and state definition can help to support USB charging which will be added in USB phy core. Signed-off-by: Baolin Wang --- include/uapi/linux/usb/charger.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/uapi/linux/usb/charger.h diff --git a/include/uapi/linux/usb/charger.h b/include/uapi/linux/usb/charger.h new file mode 100644 index 0000000..5f72af3 --- /dev/null +++ b/include/uapi/linux/usb/charger.h @@ -0,0 +1,31 @@ +/* + * This file defines the USB charger type and state that are needed for + * USB device APIs. + */ + +#ifndef _UAPI__LINUX_USB_CHARGER_H +#define _UAPI__LINUX_USB_CHARGER_H + +/* + * USB charger type: + * SDP (Standard Downstream Port) + * DCP (Dedicated Charging Port) + * CDP (Charging Downstream Port) + * ACA (Accessory Charger Adapters) + */ +enum usb_charger_type { + UNKNOWN_TYPE, + SDP_TYPE, + DCP_TYPE, + CDP_TYPE, + ACA_TYPE, +}; + +/* USB charger state */ +enum usb_charger_state { + USB_CHARGER_DEFAULT, + USB_CHARGER_PRESENT, + USB_CHARGER_ABSENT, +}; + +#endif /* _UAPI__LINUX_USB_CHARGER_H */