Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp57699ybb; Thu, 9 Apr 2020 17:10:04 -0700 (PDT) X-Google-Smtp-Source: APiQypKLz7Tj+/oKAq+aLcIwszzBRf5qoQJY9qwf/U/q3l1zvbHJX2POdCjsuEiIm/S67Cz0q2vG X-Received: by 2002:a05:620a:891:: with SMTP id b17mr1651194qka.114.1586477404827; Thu, 09 Apr 2020 17:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586477404; cv=none; d=google.com; s=arc-20160816; b=iA9rQb0kFYkUJPTjtBj6u02R4uQdhIQ5YtxFxNL+HPZJUp6E7oJ6a1iL1fzASLstQw 4Cp0eG1Yw2OiQ5H49hEHZh5iqZxBFRxEGRm548CF9YIQa844OM/PX5gvXMRs9UsVpUZQ iBseg1kaYN25shbzaoBS6JOp3mDSCuLsXWXPBFLYKK/TDp0nhw8MKtNmXI+Ksg63Gbqc Rfw+K9ijyXIF9BqNDd1a6QHwC0Gx52DCpC8HvR0aQNzK8oF5vf6rCvAG3TVFlPuRhHmL tLp4fqI6uCpXkDIZHZmvc6uFaWxwtpU33gZZyAXNuk1saurBT2ijCwyckW1pk4Uvw+gt 5DCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6Tjv9zMJn2YHc3izqrZKgOj37Bk9MfHeVEZyetQC/ao=; b=S9kbEab3E+yFGvmxunE656XE0deLFb8PXsYXjG9IlR0q2apv2pbHkXxgMMyL5C8DmZ Eu5dz8f/tFJ6JYDWKrN4wDAYAX7RuzK+PWNHUm9O9+NzmvqSHV36mrCCWn+zRXnfvLci bauMjcz/lTr27Bmj0jTxvjb+Q5DiYzTXOQ6U3HZRDojBAwZijJocHpuYa1LbK6Knxo9P cB9y5rSV3nOvNYndNaEnpUSjKNyrxgZ3CY2xoxT8FiTxyvt14Jd4l3N031U45qBchoQ9 ByZ2vAxO3UeIlhTvc/WPs5oNOV9PUI1jnKLqkhtsvTRHvXtnj06oMGaZHG3IucskVfEF 7jcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ACNJOI5I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i22si438283qki.1.2020.04.09.17.09.50; Thu, 09 Apr 2020 17:10:04 -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=@chromium.org header.s=google header.b=ACNJOI5I; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727074AbgDJAIp (ORCPT + 99 others); Thu, 9 Apr 2020 20:08:45 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:39086 "EHLO mail-pg1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbgDJAIp (ORCPT ); Thu, 9 Apr 2020 20:08:45 -0400 Received: by mail-pg1-f182.google.com with SMTP id g32so253083pgb.6 for ; Thu, 09 Apr 2020 17:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6Tjv9zMJn2YHc3izqrZKgOj37Bk9MfHeVEZyetQC/ao=; b=ACNJOI5Ik2B/KlyI/tdVPSM/uzmXiNN+zk+UCQxAw7w1puIbxZkcbJhhIvdFHnac9n 6JpBEOQLXi85DJUux9yqFxNj/F2W0K5xhYv/YYDxU/3MS2ffUd2tRvLZlgXv8AP+NsjL 461vvzaoLBoXHGVRSjRN8RZ3FCcdfsan2m9j4= 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:mime-version :content-transfer-encoding; bh=6Tjv9zMJn2YHc3izqrZKgOj37Bk9MfHeVEZyetQC/ao=; b=BpADla1P2rkzZkf7kDD8SMEyadjeNjG/gvUx8I2A+9SMYUItFPULdTQhXPPr/O18+v UsqRMb3s2F6dKoAOlDK0oIDuzF/YvzIzJY0BflnTkut9VLuRAkZkIdkknXX82hhxzqRF CRDo1A0bi+hHE+SJ9zGsLj4pKkzx5LElWBb65/kQh7ix9rT9rb9VNCuBQXxcgK8BvA8M A83NQ5Bbh8VPf7MKk28Gt5lCs+hW2QTtsc0HyEHv600aItVJfgpT0/PT9Xta0xxm4iiC E4jsXk2E5GUk8sYNmROXqy2ycdrp+iQnTZZDnXxZHeWOPDyafCeAiThLVHmOVV3rJS8C Nvug== X-Gm-Message-State: AGi0PubdItL8gfIk0maZ5/XCr+zr5siqGsVU+1eI9Cx5ioceEUzrOhRY j8j71b6TW3HiDzb28KgQOdK7nNxqvTM= X-Received: by 2002:a63:df0c:: with SMTP id u12mr212134pgg.387.1586477324308; Thu, 09 Apr 2020 17:08:44 -0700 (PDT) Received: from pmalani2.mtv.corp.google.com ([2620:15c:202:201:476b:691:abc3:38db]) by smtp.gmail.com with ESMTPSA id 6sm216421pgm.51.2020.04.09.17.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 17:08:43 -0700 (PDT) From: Prashant Malani To: linux-kernel@vger.kernel.org Cc: heikki.krogerus@linux.intel.com, Prashant Malani , Benson Leung , Enric Balletbo i Serra , Guenter Roeck Subject: [PATCH v2 0/3] platform/chrome: typec: Add port partner registration Date: Thu, 9 Apr 2020 17:08:17 -0700 Message-Id: <20200410000819.198668-1-pmalani@chromium.org> X-Mailer: git-send-email 2.26.0.110.g2183baf09c-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following series adds port-partner registration when connects/disconnects are detected. In order to do that, we also register a listener for the cros-usbpd-notifier, which will inform the driver of EC PD events. While we are here, separate out the Type C port data objects into a separate struct. v1: https://lkml.org/lkml/2020/4/6/1155 Changes in v2: - Added Kconfig dependency. - Fixed style comments. - Removed unnecessary devm_kfree() call. - Fixed incorrect error pointer return. Prashant Malani (3): platform/chrome: typec: Use notifier for updates platform/chrome: typec: Add struct for port data platform/chrome: typec: Register port partner drivers/platform/chrome/Kconfig | 1 + drivers/platform/chrome/cros_ec_typec.c | 119 ++++++++++++++++++++---- 2 files changed, 103 insertions(+), 17 deletions(-) -- 2.26.0.110.g2183baf09c-goog