From patchwork Mon Aug 14 04:29:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reka Norman X-Patchwork-Id: 13580 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2536286vqi; Sun, 13 Aug 2023 22:37:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCXk9RLBlYut1ZNfNUZYJeyNWMY23ZZJWz2POytVIH8i1L8/ij7W3MyO2PWqiT/fFJQsWs X-Received: by 2002:a17:902:9893:b0:1bc:61ce:c1b with SMTP id s19-20020a170902989300b001bc61ce0c1bmr8920571plp.43.1691991456776; Sun, 13 Aug 2023 22:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691991456; cv=none; d=google.com; s=arc-20160816; b=Hm60pQf8kLUJ2Qs5AU05tJiKmJQuScFGKLqtowtjHfAL4XWfbNWZBZhkNkajrVHGw0 VmbKeUWORNoljr+DqYM8rTM8qL1pb8w+dfN/v0PQkcA6g0qB14N3bh/upG7aNArdvALi KaBeJYeYcUYX6+aLBWFrupPUbiO5W/I64L8nqlOgzRAmIe7PHSDI0zfPsZTeekmUTMYx LunYS/+LfRdz6hjvLAOH1i1deOOOOdpK8+156R5HLPGoPhWikH1Jyn/gg+NwH+n96rin zKQJlcOfH+GHXjzYC2y+WiKe2Hk7EL2T0clF2D20ujSqGge7cepJ8lDtw9AVM22fOdwx DVEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JGX2iQreR4Wa0lEJRVthG1ZLrq79VS9RRmn8uvS4tBw=; fh=Z54ABTjWKY0UM+xzbKZvDcqrpuAhT1VnH73TfCDbJK4=; b=0qyXR56G6f6YAyTvjpCup8K9D15qn8qZJyF3G1E/pmmdQRnn062dkR0DrYyVimqllD ZG5uI6D8ObOvHPAgpcADAOH5osPevc4ylLdRW0qmwQj9xyVO4r8x4C35AyGFOUSUkv6O QhgSBh2xKz/w6vH882vP3n/aKFDXqiW9dgo6MEygTGdHN9Z+U0IZYMtAiy2PjzVyIVi1 W4vuLRROiIF1ZbF6+uCzrzlP1qRs9S3rznuOHo+tbc7lHsMj4L3MQPgbKoNq66PKbg3x VGk3keb/gUpFVy1MYDNjqWvhK1Cv4GO+B6sDlkgx4WdSzcVyPjNp/P3/x7eejisLpRkH pWxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="ReM7E/zJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a170903120a00b001b81e6ce809si7670749plh.5.2023.08.13.22.37.23; Sun, 13 Aug 2023 22:37:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="ReM7E/zJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233040AbjHNEda (ORCPT + 99 others); Mon, 14 Aug 2023 00:33:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233020AbjHNEdT (ORCPT ); Mon, 14 Aug 2023 00:33:19 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED63B124 for ; Sun, 13 Aug 2023 21:33:16 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1bdb801c667so21751305ad.1 for ; Sun, 13 Aug 2023 21:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691987596; x=1692592396; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JGX2iQreR4Wa0lEJRVthG1ZLrq79VS9RRmn8uvS4tBw=; b=ReM7E/zJUHj/2KoAnU/iyMfZfy0EDj8RbAiNZqdllHBsHTqXMjVsIukPm6CcNsmU8H IIxwpd16TYxaYMxKOcotA6ZC0D7bTIOJ5G/OUrO1SLPvArdnekH8sqqB+J0EAwZ4ii6/ RgnDKUczA0XpHMepz7C4LaxVrXpnKGWoGfPrA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691987596; x=1692592396; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JGX2iQreR4Wa0lEJRVthG1ZLrq79VS9RRmn8uvS4tBw=; b=iRh3EI/FWpQPAaLC3ieA5bzTPiWacnjn5a3pg41jVeFN1looHr08mmk15t7WLw6KvY Ecnw7gTG/2yQXzQbFNEGuw559JQ0sg7WhYT4lU189VFvfi/X7lhZt5nzDynhFAs0Eqmo OzPkJmrBklNO62n3HgKGwf54uNlZfBh1QnkKMmtVAu3+sLIx58KDWquaDizeMVNouQkr NNDlLRKxnWKA5i3MDmvl3Gqwo56MKcaz4lQQ0weOfwYcugn9xfZUSPYfDK+cYujGGP/1 uga8ziZqBfT+YxHUlikdh9sgsmNa8x7JZETX7Kz84DOyaC1+Uc0bXDiJYFXn/gFYGSwy NgMA== X-Gm-Message-State: AOJu0YwSFJL8niy3kH4FOx7+jHlL5WdA6ymwsRGZulSTB15XtgLYpoIg hE+GNmKX6Fx/r5wWIjqBsp4uAQ== X-Received: by 2002:a17:902:d4c4:b0:1bc:411f:1097 with SMTP id o4-20020a170902d4c400b001bc411f1097mr9455934plg.47.1691987596346; Sun, 13 Aug 2023 21:33:16 -0700 (PDT) Received: from rekanorman3.syd.corp.google.com ([2401:fa00:9:14:4ae6:d1a4:27c2:80ff]) by smtp.gmail.com with ESMTPSA id ju17-20020a170903429100b001bdb0483e65sm6761865plb.265.2023.08.13.21.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 21:33:16 -0700 (PDT) From: Reka Norman To: Hans Verkuil Cc: Neil Armstrong , Daisuke Nojiri , Stefan Adolfsson , Reka Norman , Benson Leung , Guenter Roeck , Mauro Carvalho Chehab , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 0/9] media: cros-ec-cec: Add support for multiple ports Date: Mon, 14 Aug 2023 14:29:09 +1000 Message-ID: <20230814043140.1108917-1-rekanorman@chromium.org> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774181633447615474 X-GMAIL-MSGID: 1774181633447615474 The Google Dibbi chromebox will have two HDMI ports with CEC enabled via its EC. Currently, the cros-ec-cec driver and the host command interface to the EC assume there is only one port. E.g. the commands have no parameter to indicated which port to operate on. This series adds support for multiple ports. The driver is modified to manage an array of ports, each with their own CEC adapter and notifier. The host command interface is modified to support multiple ports. All changes to interface are backwards compatible. Reka Norman (9): media: cros-ec-cec: Use cros_ec_cmd to send host commands media: cros-ec-cec: Manage an array of ports media: cros-ec-cec: Support multiple ports in set/get host commands media: cros-ec-cec: Support multiple ports in write command media: cros-ec-cec: Support multiple ports in MKBP cec_events media: cros-ec-cec: Support receiving messages from multiple ports media: cros-ec-cec: Allow specifying multiple HDMI connectors media: cros-ec-cec: Get number of CEC ports from EC media: cros-ec-cec: Add Dibbi to the match table .../media/cec/platform/cros-ec/cros-ec-cec.c | 376 ++++++++++++++---- .../linux/platform_data/cros_ec_commands.h | 66 ++- 2 files changed, 354 insertions(+), 88 deletions(-)