Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4036243imm; Tue, 29 May 2018 20:20:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ3D8gYGGjqFDgqmTcC8Le2y+7VIOMoxXdzbIG5ZMggEiIKZxtG5UICCkyFkxJyGg1jQlf2 X-Received: by 2002:a62:5281:: with SMTP id g123-v6mr1065327pfb.22.1527650408774; Tue, 29 May 2018 20:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527650408; cv=none; d=google.com; s=arc-20160816; b=YGq7Z1OKbBu+6mIkO7X6zx1TC4mQt6OZhdmirBnaW9qbVUKRxJCg7N6nVlD6KsJ5wZ Z7HFXEUz7iQC93V4SjqFMf6wJyjSKRbMqlc6SrgBzWBHXfKxDV+/8Mx6ke4lxWaLKNIa dHXlCI5jUBQGDu6MRhbMs6oxUMHH6AkG3LWx77XrHNGbQcYgArB2zVL1Fnfrxz3BzBUb DdnRaGEWC56o9UbNub8Mpmb70W7QxQJOUStaFXioGYcf5WTWu5SUoM+H1glvnXqp52FX nYqCzW0SmT0+FQ5dSQ51XS875YWom7FZsEXhih9V0XCLDvbaRvf+siknsCTSck9nYiYq nO7g== 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:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=wf1qqV/BBWh/4BPTKvLuM/wYz29XMTub8Q7Pprq1WwA=; b=sSM/1KpR02T2KR0TlIf3nNfIhAPtK3Fa29KxoHX8Ua/+k7+3tYE7ZoWUAbwiBYAuDm EQBbRkopk+ZOermp4eRdOfK1ukp0h6Cyvi0/j5+n4jWGtGr/P0Rx5pDOS81stG9yYpyb qZFz2J6Wze39BQqzcFF3o6yuhVZXUfkiLw3czqW/jPY3g4LKKn0lF76XHHc75tID4gUN 2Vehu9RDbydUcxXU5LEMcTDfjrlLCkXBaUtgThCwnRs43VOooZ1tQQ7563njuvkhAZKA OR6zyl+zDrQJwHgtAwBEvMA3n/7LfzHSHxgUm1L8nwL5997UwSgE27+/O/LMrhP+xdua oDKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=owuojtk7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22-v6si13133334pgn.257.2018.05.29.20.19.54; Tue, 29 May 2018 20:20:08 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=owuojtk7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936939AbeE3DRy (ORCPT + 99 others); Tue, 29 May 2018 23:17:54 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38990 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935703AbeE3DRo (ORCPT ); Tue, 29 May 2018 23:17:44 -0400 Received: by mail-pf0-f195.google.com with SMTP id r11-v6so707108pfl.6 for ; Tue, 29 May 2018 20:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wf1qqV/BBWh/4BPTKvLuM/wYz29XMTub8Q7Pprq1WwA=; b=owuojtk7ocdGLT0+yfjUNQOlTwgAViRD3E0QKwvnixBqxUl0UkI99ZY7t6pECHD/PW JWIMYa+ephgxr24/oONK3pazorjlSeD1qDfe6E/OqXH0XJcfSubHH6eGdg9xfLnKLI9V 2gIw3azVxFK/iml3A6qTfh3DS7LD5VG+uyjrCnKPXmGBwR3XXEAFIuA5KaR/hFONKNYs vMxqxEAg0UV2heHgYpDiO0ZIaFpZ/uUBBIGlRbGTvXbwu79l19vlSISvYGyf2arSIbR1 n2KMpG8JaemO4kQE69q9+FRv/v9JjasbLPuqg4FKRhyMEFIR3u7/auoyO//RupmOZ/pH eloQ== 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; bh=wf1qqV/BBWh/4BPTKvLuM/wYz29XMTub8Q7Pprq1WwA=; b=H5/6jqZLkc0pvlnJPfW7kF3Yzw6WKtcuEmSZT/dZMiu0UB/kdBlGRQ27oAAXWNGTOv 7MFtqOW/yPh2n7qEoxS2qwPQs2RtqdmfYbVERnJQoM8Nkaluz2Rgil8JrEG+JkJx6exv wwaUF2wG1NDi+ASQPPma2k3CV8yDZ/PrCIqF22l4g+oYkOGs3YeemC5nxRxfCKWVZrnQ Ujli8OJstKd2UGoEA5CqpKt5fwjiNrBpB+HlRxZti3ZjZauJ9fiQNt3eUNxg5Fs1p1Wm R8RUFuBueHMk9pKWXCofM80NFrvy+E7ypEmVvLU61UZCgebtvURK1MGyU/mSw+to+ert kWhA== X-Gm-Message-State: ALKqPwetsxxXJKA+PAABLLxdWAENf8Ox2lQeF3sPgHeN1bnGDZ3+/snA 9mcACyuvdIiYQPjY4x4b3V+lHg== X-Received: by 2002:a65:6690:: with SMTP id b16-v6mr819021pgw.326.1527650264046; Tue, 29 May 2018 20:17:44 -0700 (PDT) Received: from localhost.localdomain (c-69-181-66-249.hsd1.ca.comcast.net. [69.181.66.249]) by smtp.gmail.com with ESMTPSA id k73-v6sm12372784pfb.31.2018.05.29.20.17.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 20:17:43 -0700 (PDT) From: Fabien Parent To: Sebastian Reichel Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, eballetbo@gmail.com, gpain@baylibre.com, Fabien Parent Subject: [PATCH 1/3] mfd: cros: add charger port count command definition Date: Tue, 29 May 2018 20:17:02 -0700 Message-Id: <20180530031704.18597-2-fparent@baylibre.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180530031704.18597-1-fparent@baylibre.com> References: <20180530031704.18597-1-fparent@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A new more command has been added to the ChromeOS embedded controller that allows to get the number of charger port count. Unlike EC_CMD_USB_PD_PORTS, this new command also includes the dedicated port if present. This command will be used to expose the dedicated charger port in the ChromeOS charger driver. Signed-off-by: Fabien Parent --- include/linux/mfd/cros_ec_commands.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 0d926492ac3a..e3187f8bdb7e 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h @@ -3005,6 +3005,16 @@ struct ec_params_usb_pd_info_request { uint8_t port; } __packed; +/* + * This command will return the number of USB PD charge port + the number + * of dedicated port present. + * EC_CMD_USB_PD_PORTS does NOT include the dedicated ports + */ +#define EC_CMD_CHARGE_PORT_COUNT 0x0105 +struct ec_response_charge_port_count { + uint8_t port_count; +} __packed; + /* Read USB-PD Device discovery info */ #define EC_CMD_USB_PD_DISCOVERY 0x0113 struct ec_params_usb_pd_discovery_entry { -- 2.17.0