From patchwork Tue Aug 15 11:07:53 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: 110129 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5523621qge; Tue, 15 Aug 2017 04:08:45 -0700 (PDT) X-Received: by 10.84.133.133 with SMTP id f5mr30917188plf.134.1502795325064; Tue, 15 Aug 2017 04:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502795325; cv=none; d=google.com; s=arc-20160816; b=u8zAA21HrLkYCyqHL/umfp78MsTGvaxkJ1gCtK32vZRqHi1AO6VTJU3WGL4/1kp9jn oQGijNuo8KYXtL0YE+Dj/K91h+7vvVhFXEGdIouWj1K7ZEiTlVA5nTDspjTS9OhyX+vS vIvMA44/GhAQA0WH/msxbWlImq4hd04ScXzRJXAbtVPU+PCZOea6F8KB1q4kC4LyXcmI 27GHtOYkjV2/IWKn8ptL58SFE8wdr1cI3u9bB600oT43pPM42+ccAYR7ViI3w2+JZYWC 6+zmzy7sSTC4NKc9DhRFjTJ9b+ISbbBCI+U5e6g1dqfjym7BTRO8sdl67qZsXBYmXZNS O2cw== 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=C7azOU2dJtvAOGAour+IPI8H9Yg+Z63Am/T8Dn4a8r+4NfmEbp2n9R91akFsY77tSS lncwySNBEt2aqiY3Pa3cqQopbE5aBuL/5B1N4MKnLSEl/9dR7iVCNFHGhxcyGwjUcUx9 zYBJschJDO2y37sM0LM5mrtOL5fVOyowpGdVo/PiHvlMZPMw4KHjOynp1MgmoC4d/0iJ mgNMFRpVlRdPYALjsQdtg7YyaCOt0kGlIm824z0+sWhGx6yjX67DRqu56ydiyp7I1qf/ uLBvejk5jA/8q4Syz6Nh4kIYOGuAyNk89u3j2/9By+sAi1lQOuOQE1ovTkw6LXYPA5Mm G/Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VK/BaZCC; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 g12si5994408plk.306.2017.08.15.04.08.44; Tue, 15 Aug 2017 04:08:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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.s=google header.b=VK/BaZCC; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751692AbdHOLIn (ORCPT + 12 others); Tue, 15 Aug 2017 07:08:43 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:33956 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbdHOLIi (ORCPT ); Tue, 15 Aug 2017 07:08:38 -0400 Received: by mail-pg0-f41.google.com with SMTP id u185so4047216pgb.1 for ; Tue, 15 Aug 2017 04:08:38 -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=VK/BaZCCelORKU/XRXAzp8XS56AdUHrXGp+8hjRChToJSAgwwy/8AbuNA2061lbVWA QhEVncImq3Kccwoo+F6MVfc/61s24b9mETM9WYyPecw4aCqxEqzP2EQ9FrosxFju9Aan KYyEHZWD7YoiRYb3JZC5zNTS1NJoMuSB6cqSM= 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=EnO7vVMSlLcSV1kAe+OSvDng3ZrvmRN96oPu8WASokTvTwRqUdR3VB/c0DETIBYzFn UL5i2EsIDCLDZFMJ/j1J1UOcucrfYRvw7KG5VMzRkeFE228LupNzzmOQ39LrxretI47a OAh74d8JKYwrmT6RHQd+XGIcHRpTfkCPUlynpX/j4JprsWWmya38b1g8ZvL5w5SHhKtr o9BOtIdoE6m53gNau/NFrNKfvdB5wvUla1ugrQclvbzIv6l7fLWJkzC8jTv29RxGeFlm 1YqYBUHCU+bU+zE8ZWXnFq5SMm5xcZRwdNo6In1uZDwx4fP5Qs3T3mTwcT4BqhYGmyEE Oqvg== X-Gm-Message-State: AHYfb5gSGa+QF6oxHtzwEFHfhULdqO9R/NV6ggnSnA7khMUSBNvtJKEF tGviu4B1vYuwTUW8 X-Received: by 10.84.174.1 with SMTP id q1mr30947056plb.10.1502795317980; Tue, 15 Aug 2017 04:08:37 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id p77sm16705197pfi.153.2017.08.15.04.08.33 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Aug 2017 04:08:37 -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 v5 1/3] include: uapi: usb: Introduce USB charger type and state definition Date: Tue, 15 Aug 2017 19:07:53 +0800 Message-Id: <67d041fc5b387696874186f36231b8d696aec6ee.1502794830.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 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 */