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: 106875 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp5397826qge; Sun, 2 Jul 2017 23:08:17 -0700 (PDT) X-Received: by 10.98.68.156 with SMTP id m28mr8143024pfi.159.1499062097157; Sun, 02 Jul 2017 23:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499062097; cv=none; d=google.com; s=arc-20160816; b=lFfVa6JTW1XyDQ+MoiZ6lbPSV6oi9Qy8HbA7pCUsLuoBg4/SgljVezx3sT1aZ4LnmX n/KZ39JrpuR4XbhsqfklPkbsczfKExNWqXgzhoVNi6kJ9gKa2RB9WR53mmosVlCpKmAo LuZtgTE+s2Q1xXatWXp6vx0zrecnQ3umiZ4a466Tg7w2LA4W+trDYdiYQepKV/yyT08+ I0KxBEfuoSlpUAtgqj5CAhQLQqWIojjp5JTv/xeSLZkTkBXIFedVjUv0/KhQ8avRYGNo LSGbPqBHmaDuY4KDeX/uuITog3bJ1TJMinuzJslW8E+VEMWafeYaSQVqe/edjcmzFi7y dKNg== 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=sTSIvAmJ+8+Iz+yFrja8kxZHyZrRJBGU67lZtBIhk7w=; b=fY7LC2onJ1wbm0+R3yC8DHL5qF+yrwK+WhwrjBxiu2WCU+/iXe7K9HZDTyN/oNdp1p y2efpuXxqn/ECioJK3ds02A9HZ0X1X1MHJzvm8UCXkoajyFkwjZDvYlKnxZ12qrQ6HNR oLt8V7DCjSNbnEb/IJR8ikzL7+3lxoET3D3pSuoqnmueqrr5dyZKyKkbl7czCdb59CUs psdcLFmXb/Rl6kCy7cKJbeU21xgHG+0yzIRbS9MsgdaFwyZm4Muz7XYMVEJG5pW4/Vrg krdc1eoPgawDXXsfL1p+obVUgVk1YDd3LZqJvDn8z76J/4fKkPIMZZ9zPkWfsr632OkO /08Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=SbTBBPc1; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (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 r7si12403050ple.505.2017.07.02.23.08.16; Sun, 02 Jul 2017 23:08:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=SbTBBPc1; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752089AbdGCGIB (ORCPT + 4 others); Mon, 3 Jul 2017 02:08:01 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:33995 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130AbdGCGIA (ORCPT ); Mon, 3 Jul 2017 02:08:00 -0400 Received: by mail-pg0-f41.google.com with SMTP id t186so90370625pgb.1 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=n0AssebHfcJxquVwd81Owd7gknLeAJC0VvlfIFmzhRmi9u7wtSTxfTMJHV6qloWUzm 2MIuOmfh5v0c7meU+RE6SIH5g0mc5rW4obTKrhWUHIrftswEdl1cZpDsX/pRNnpN85Tb 0v09nkPCcD5VyA9yB1/AmRBMdkU8RC1vhd2X8fXqi1ZfWc3CNASR8+EF/ojLzlT8CUFX jrgqeZm3bsgf6aWrE88M/s7kvybEjqSJBzucv/qywt+795YuLtaDQ2SooapyawKs8fh6 zPmH7FaxE3LJQgsCZkOQs04hPWM4WXrckB1obrJ/H1Nw+d2OCmJRwerMpow6lm9f3gYK JBmA== X-Gm-Message-State: AIVw113OAeK6BYDfPOpEF/qxtdneAlEegVmx8+S9l8lBNAvIv4JYnbrK N+fSNCAUz1IOTBl8 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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 */