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: 108810 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1625008qge; Wed, 26 Jul 2017 22:16:12 -0700 (PDT) X-Received: by 10.98.76.201 with SMTP id e70mr3028048pfj.262.1501132572285; Wed, 26 Jul 2017 22:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501132572; cv=none; d=google.com; s=arc-20160816; b=o6CyzTW0D+XVslQbwmXSgz6oISmjbMNH0Q0CpOL+NgN5Rpz2SLboHpWXxiIQfHasMr QDYvNcZ8OjhlovjUgAF7kAEE1hMXFMmnf8rp/iGdcrIWbSYY37JLJAXUs2nrP/f80IJq 3P1FkGBYqWfcygap3Nz1lUyIuuguqwwX/ClxETSCVttQFM9nviCG+iygV+z8ODvlqBue xo74+BgJW37Z/li0QodBMF38b+HSSul2GLy9c0RrRgijZ8PwMq/UnN327bNi1s/XW8wO VPHXuMuhO2rKfuU8iJ49oih5ij0VTe8ARAHi6JXFZl+a2E8wMX8/JeDaYJcdz+OTHpPW CKFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=N9r5VEQXKz5m+Eensbdev1yPt9+TbahPK+INcDIqZFE=; b=KZ8nASw3xydmo9NiZcEYpp6q+0HngvBl5OebohmqLNcBXsy7hAERyme1j0Q+zT+lkJ SWXMXsDjCskIJ1I3/woBWUAGuLRJJacAaJFYXazmLleJkWk86RkexLaBUziqGGcFsqn7 6sh820N8fhi9onEQhjK6MVXD/NDzYO2Od5a/u4dKhw6oKwlEiaGLSRJAK1+yGMjugKUL QVnfA4DMpwGtnAcbZ5uhyu2LAIAVJWxx7xYTPIiC0Ig7XabXT58+j3qveg5vK3PhwXfY zcyxAbFkLaob3CUfrFUrwqyhAzzeAuZ8bIl3KNaGwHDWNF9ALoL4lRG05rpjyH0WzXdi mKhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=keiPWwvY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e81si10488287pfb.482.2017.07.26.22.16.11; Wed, 26 Jul 2017 22:16:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=keiPWwvY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbdG0FQJ (ORCPT + 26 others); Thu, 27 Jul 2017 01:16:09 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:33074 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751647AbdG0FPG (ORCPT ); Thu, 27 Jul 2017 01:15:06 -0400 Received: by mail-pf0-f174.google.com with SMTP id d67so11256047pfc.0 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=T4UPDiDuGGgdqHeoYACU3bWHmlna7nYla37ru2Nf+x9kjooxKWvyfb7aEVKB6JZGH7 mypTBvgzdhohOSfzIE5ZOuCuuQs19L7fGqLk3J1ngWi9mHSCfQFj4AA3rFeBRc/XdulB hZgSLF0H6qJ+NMeTujzAjlbuvRDw4OjqpS4m0DkHFHJePpcQtGz9awR3akUGk/iVJCjO r43EPNrUXsdJkXD8RZowioHVjtd98Su14H8C6prvy0yHB/il+d5k9pqWxTv+cr592CpT ZjNss+TnjrTJn+CoSmYz8IwE2yKSbhod+ejOh5pWVg8nOOix4AoW05gV5cGBxNQ0ZtSZ S+4w== X-Gm-Message-State: AIVw110A9xhrv9cQDVXBAUOP+7/v7fkq4fI6q766EpS3OdWcdbZ7IBKk zyWlwFUHJLkyTmdp 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 1.7.9.5 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 */