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: 9901611 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 6EA2E60230 for ; Tue, 15 Aug 2017 11:08:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 620292880C for ; Tue, 15 Aug 2017 11:08:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56AC628835; Tue, 15 Aug 2017 11:08:45 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 EF47B2880C for ; Tue, 15 Aug 2017 11:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751692AbdHOLIn (ORCPT ); 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 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 */