From patchwork Mon Jul 3 06:07:13 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: 9821975 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 2CFC76035F for ; Mon, 3 Jul 2017 06:08:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D08526785 for ; Mon, 3 Jul 2017 06:08:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D5D728504; Mon, 3 Jul 2017 06:08:50 +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=unavailable 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 A404126785 for ; Mon, 3 Jul 2017 06:08:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752130AbdGCGID (ORCPT ); Mon, 3 Jul 2017 02:08:03 -0400 Received: from mail-pg0-f47.google.com ([74.125.83.47]:36677 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbdGCGIA (ORCPT ); Mon, 3 Jul 2017 02:08:00 -0400 Received: by mail-pg0-f47.google.com with SMTP id u62so89922559pgb.3 for ; Sun, 02 Jul 2017 23:07:59 -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=SbTBBPc1qAxaUb6DqLi9+6OJRUBIXcAqABopcv+C8W7sVBOnc2wXDbJa/GAvvlSqhw IAtzIq/NbLTPmjDg4XQIyYCIfsqSH1vR8EY1Pg1lh6xOis93h9uSumuvtulDFY+SHMKd a5Aj/03tWfXUVSWxjUvDyBi4y6EBBk36Hk/Wc= 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=t7N7Iew4iy4AMzeBPbMtpE0ti84u9Bk21gSPnzd1DOiZ+da1bcoEZWFM9OXfXBXmIS xEvdM5Sswto1aH9bgDhBzkyaoGzf8gfvuUa6HHbAzyR0jXYnuXF+UTn4y566eQOLzY6j mkrE7LKiQb+XdVAwhdqtV54xUO3oFtlmgqKRFSIKvLCLN3W2+dMpLUq5y0Vo45Tc/tsE QlYQduvgRta6BvhhjPvZvGPdeZLZjBJ6uCRkVdZgZRXDMFtP4i1gSYvGAzX2cA4lDRlt /BFfKGaRC8+TBTZDphfTpGnSJRjnSzAzT+Pv2VRMNEPC5AwwsgKNH8N+lpguOi6zq7sx 6uZQ== X-Gm-Message-State: AIVw111SLdQ5QHS8kdy9x8JEsleYMFwTeAmmFFD1ojg8cDZCRKn8ag6D 3djsDNdSaHDOqrVg X-Received: by 10.99.147.19 with SMTP id b19mr8700494pge.154.1499062079286; Sun, 02 Jul 2017 23:07:59 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id x64sm33177577pfk.20.2017.07.02.23.07.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Jul 2017 23:07:58 -0700 (PDT) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org, sre@kernel.org 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 Subject: [PATCH v2 1/3] include: uapi: usb: Introduce USB charger type and state definition Date: Mon, 3 Jul 2017 14:07:13 +0800 Message-Id: <54d4a3ae584900a74e04b5cd27157dced44fdfef.1499061617.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 */