Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp371622imm; Mon, 21 May 2018 07:23:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUGOLGPUit/l6327GaV3mqCHSiB/EWRRv99bFHULn3gW4axG3bgIjbu81EBnGD6LnlTH0d X-Received: by 2002:a62:4651:: with SMTP id t78-v6mr20266381pfa.46.1526912595510; Mon, 21 May 2018 07:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526912595; cv=none; d=google.com; s=arc-20160816; b=kDZSdTUYa0oXAX9PoQgmrctJZ1p8Gy4hJVdXo+xvNcfWZd2s8ZHfEGOOsz0mI4CEG1 +F0qy+gX7EN4rZXaJ3Zn/pbEy41PdhIB3LPft8U/K7qqkzJ+FXua/JpT+C4qrPpvkicO Oi6NC+zBo5XwfE5PXmYiPF7khbi6vwSODpkoV0tgB7p932TmOe4EDHRuG5TMgkLfdl+l LCFkM2glE2mujIhy5kzDqIreoTOY6axMYUKiZZedAfBrN6h6R3KXTbLGpScFCZuKudWG 2r4dl6GctyIec7K94lpVCkrPuZe2HWGiLHlq2Fs252IPJq/nAiLyOtZYAbO0qE476tmB ZZAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Qyj4fPtdxPjuF48G1wd5S6qIhA1Ui8eQgf2BZnYBxK8=; b=QkaFmYwUxS8u3TuUWVBN1Th99KABN0Dz1DcrbTT3vLo67V3cNyVnQ397hn7oDhgZMo F62L3cR8QW7hxTPtbZedH8Zi8264ldPo0wO7ZhwrWLzdONRmvkCJhUugHwdrpf2lF/bD tlkccJmgbQXtHCV9s/EORSJSXKhG/animh0zfNpoyrZNKGgnwpybHkXlzxqmmsDDcBQS ZI4R0QJT5XhSSQl9Ifq2GgafQ0Dpn4WoN3WuWoOZAYLsn1iWQM62KG0KbZ8ELvh8qkH1 tfHH+YHhEcOGhqbAVceB2viN9i4loW1Alxw9dgyZX2TEqOt/Q0BlD5WeoIuLTpwSRc6F O4yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=llP3sWR1; 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 a64-v6si14444645pla.530.2018.05.21.07.23.00; Mon, 21 May 2018 07:23:15 -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=llP3sWR1; 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 S1752734AbeEUOVz (ORCPT + 99 others); Mon, 21 May 2018 10:21:55 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:41647 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751504AbeEUOVv (ORCPT ); Mon, 21 May 2018 10:21:51 -0400 Received: by mail-wr0-f194.google.com with SMTP id w15-v6so8651855wrp.8 for ; Mon, 21 May 2018 07:21:50 -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; bh=Qyj4fPtdxPjuF48G1wd5S6qIhA1Ui8eQgf2BZnYBxK8=; b=llP3sWR11Gkc8SJs7Cfq3EWYkJRmfDgxiutOacgINZ/Yez3red8V1YU4aqLSNaDswT kSbcNYmnyWwehjzba3w2HU/0PJ+xZb4fCQsuikerkX7Rr1KSpN0v2LWtvz8/IKTpTMxF rqJCPJ8vyuqA4TpMNbSFccOHaQX2LdQmGwOafZGArntb7UbTjcsmgDZLKGMJfTHGrM1K p1rQMwAjpJNSGAK5r8cV0X6k0Ry6uM2afwoY1qWQqvahmMn7nxp7JojBlv0HiZvnpefj LA92PL99aRVWbVL+BCAH5zEtgNHnXjdbLF6FpWOPVeeAGYkgAxncF+y+SLGEwc0IIgTe n5Ig== 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; bh=Qyj4fPtdxPjuF48G1wd5S6qIhA1Ui8eQgf2BZnYBxK8=; b=eEK0iM9H6s5jsR4ODvWfRG6I1fK51bILBR92P6E6caMEjbIU5C+T2Qgc/lGJK4YaO7 GF7+p0rF4lRbGnNYgYOqEK3wzyenUfW2A5NnwT4/e4D+OBmyTHLO8JL+V6NhTJdt+8zZ cRfrfEhsMmpG4fE8DG80fwvUGmgaNXTgShH+jwlXsEdL6iqHpjI+zmWmcCHGFb05IJeN WR5B/aoi9zYrYY3urpj5gXwy1ZsDyUS5IQy4PdS43E1Aj+7fce1o0HVc/SbK7k1kDeXg ns+s13SgtLY4hfbZWujTOBBeAPB28fXYowy93jh7meOGPhOQWhLoIS2VIfjY8WMlkXr4 sHaw== X-Gm-Message-State: ALKqPwfZ2bZQnG7sAhXBsfcr1y75OdInIfQTVc0Wv844mIt+g04G9nEi +lPnxe5JP4sSZ1EIFJwyziRONA== X-Received: by 2002:adf:dd03:: with SMTP id a3-v6mr17347769wrm.0.1526912509894; Mon, 21 May 2018 07:21:49 -0700 (PDT) Received: from bender.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id m69-v6sm27213446wmd.47.2018.05.21.07.21.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 May 2018 07:21:48 -0700 (PDT) From: Neil Armstrong To: airlied@linux.ie, hans.verkuil@cisco.com, lee.jones@linaro.org, olof@lixom.net, seanpaul@google.com Cc: Neil Armstrong , sadolfsson@google.com, felixe@google.com, bleung@google.com, darekm@google.com, marcheu@chromium.org, fparent@baylibre.com, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, eballetbo@gmail.com Subject: [PATCH v4 0/5] Add ChromeOS EC CEC Support Date: Mon, 21 May 2018 16:21:41 +0200 Message-Id: <1526912506-18406-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, The new Google "Fizz" Intel-based ChromeOS device is gaining CEC support through it's Embedded Controller, to enable the Linux CEC Core to communicate with it and get the CEC Physical Address from the correct HDMI Connector, the following must be added/changed: - Add the CEC sub-device registration in the ChromeOS EC MFD Driver - Add the CEC related commands and events definitions into the EC MFD driver - Add a way to get a CEC notifier with it's (optional) connector name - Add the CEC notifier to the i915 HDMI driver - Add the proper ChromeOS EC CEC Driver The CEC notifier with the connector name is the tricky point, since even on Device-Tree platforms, there is no way to distinguish between multiple HDMI connectors from the same DRM driver. The solution I implemented is pretty simple and only adds an optional connector name to eventually distinguish an HDMI connector notifier from another if they share the same device. Feel free to comment this patchset ! Changes since v3 (incorrectly reported as v2): - Renamed "Chrome OS" to "ChromeOS" - Updated cros_ec_commands.h new structs definitions to kernel doc format - Added Reviwed-By tags Changes since v2: - Add i915 port_identifier() and use this stable name as cec_notifier conn name - Fixed and cleaned up the CEC commands and events handling - Rebased the CEC sub-device registration on top of Enric's serie - Fixed comments typo on cec driver - Protected the DMI match only with PCI and DMI Kconfigs Changes since v1: - Added cec_notifier_put to intel_hdmi - Fixed all small reported issues on the EC CEC driver - Moved the cec_notifier_get out of the #if .. #else .. #endif Changes since RFC: - Moved CEC sub-device registration after CEC commands and events definitions patch - Removed get_notifier_get_byname - Added CEC_CORE select into i915 Kconfig - Removed CEC driver fallback if notifier is not configured on HW, added explicit warn - Fixed CEC core return type on error - Moved to cros-ec-cec media platform directory - Use bus_find_device() to find the pci i915 device instead of get_notifier_get_byname() - Fix Logical Address setup - Added comment about HW support - Removed memset of msg structures Neil Armstrong (5): media: cec-notifier: Get notifier by device and connector name drm/i915: hdmi: add CEC notifier to intel_hdmi mfd: cros-ec: Introduce CEC commands and events definitions. mfd: cros_ec_dev: Add CEC sub-device registration media: platform: Add ChromeOS EC CEC driver drivers/gpu/drm/i915/Kconfig | 1 + drivers/gpu/drm/i915/intel_display.h | 20 ++ drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_hdmi.c | 13 + drivers/media/cec/cec-notifier.c | 11 +- drivers/media/platform/Kconfig | 11 + drivers/media/platform/Makefile | 2 + drivers/media/platform/cros-ec-cec/Makefile | 1 + drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 347 +++++++++++++++++++++++ drivers/mfd/cros_ec_dev.c | 16 ++ drivers/platform/chrome/cros_ec_proto.c | 40 ++- include/linux/mfd/cros_ec.h | 2 +- include/linux/mfd/cros_ec_commands.h | 103 +++++++ include/media/cec-notifier.h | 27 +- 14 files changed, 580 insertions(+), 16 deletions(-) create mode 100644 drivers/media/platform/cros-ec-cec/Makefile create mode 100644 drivers/media/platform/cros-ec-cec/cros-ec-cec.c -- 2.7.4