From patchwork Fri Aug 10 13:13:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 10562681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 096CB1515 for ; Fri, 10 Aug 2018 13:17:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDD252B9B7 for ; Fri, 10 Aug 2018 13:17:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1E762B9E1; Fri, 10 Aug 2018 13:17:21 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 831412B9B7 for ; Fri, 10 Aug 2018 13:17:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728306AbeHJPrM (ORCPT ); Fri, 10 Aug 2018 11:47:12 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52510 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbeHJPrM (ORCPT ); Fri, 10 Aug 2018 11:47:12 -0400 Received: by mail-wm0-f68.google.com with SMTP id o11-v6so1853270wmh.2 for ; Fri, 10 Aug 2018 06:17:18 -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=EKERvPyccN5L6jSux9V7ILEhqtIjCsSZuoPK0qXWjtQ=; b=FlWt0QWQkvC2jCEGddZZXlWvOtTIqPrS7CDfGSQlO2pWIwqxoGMx2LcsyV+45S40ng 61Ev0E6Vwl+a3BykxHy65WOTDZMPveZ35Xts0aRCTZyRt15pY5uIbg8B2RsqYXXJ1I2W wz3YkhyIwVjODK5aBCF/y4PPVx5trIAyerNtr1CFducwBVJjpRzCoIx8pxjz7AKqEo+H 30AaZMivqxGiwGhUlfm7dVm3Koop4+Hgahh8s5DmU1CqbMtnazRM1yQXg6hs+geEagi6 sA/ImXOtBXoOiWVvJ/l3AQGAJH46Skjm6OaFSd2zUDZZ6lMeWGwXvSnCZ8LZzfaYERI8 gSCw== 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=EKERvPyccN5L6jSux9V7ILEhqtIjCsSZuoPK0qXWjtQ=; b=JHAJLbsGr3mTycndbTp/UFJBmY98aDpK4regJP96XkTz6Zl4T/wNupSFLbBG8KZtub egbDamHXBZh7jJkLxwUkBcJHg38T/gX1aOQ/Pnd7Ov3DBGMZ6Mff7blcY6IxZrf68o1x 3EUMgR41+sEHX9KP8zeb3z6NfDnStrZno+wPyUKiDZSilL2Ym4P7Jis+cQOtQbHB3w9V wxbUvPINXKVsRMIjHK3IamSopGJ3MUSQqxIpVCA6wntM+Se5kxxJ2hG4YG6av3ziCbvO lcLjfmSlJ/ND/OobTqrnyUKwmi3Rh2ItEAYueoO5H1aHDhJcfwXlbZ3Iu1zMsM0pBZ4h wepQ== X-Gm-Message-State: AOUpUlGeT1J+lPFHavufx/fPnrn1kr3IWOif1dx8ro04e94G0fPS30cj jTgD5UFLeJ6pbgR5nT8UvcjrCA== X-Google-Smtp-Source: AA+uWPwZMBbBYV9iQpzCSTR+viV+cpv+hcJT13Eunir9doqtLsTkcGhw8Dznxne+PMdiBDMcIKnGWA== X-Received: by 2002:a1c:b213:: with SMTP id b19-v6mr1443257wmf.141.1533907037844; Fri, 10 Aug 2018 06:17:17 -0700 (PDT) Received: from radium.baylibre.local (AStLambert-681-1-8-155.w90-86.abo.wanadoo.fr. [90.86.13.155]) by smtp.gmail.com with ESMTPSA id i205-v6sm2069523wmf.30.2018.08.10.06.17.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 06:17:17 -0700 (PDT) From: Fabien Parent To: Sebastian Reichel , Lee Jones Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, gpain@baylibre.com, Fabien Parent Subject: [PATCH v2 1/3] mfd: cros: add charger port count command definition Date: Fri, 10 Aug 2018 15:13:47 +0200 Message-Id: <20180810131349.3883-2-fparent@baylibre.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180810131349.3883-1-fparent@baylibre.com> References: <20180810131349.3883-1-fparent@baylibre.com> 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 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 Acked-for-MFD-by: Lee Jones Reviewed-by: Enric Balletbo i Serra --- V1 -> V2: * No change --- 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 {