Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1863365imm; Thu, 24 May 2018 01:56:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqC15Btl48v+09duuWQkG8fzH/O8HesaSUGtTZR5KySkmbEoL6/6q48yCV37u7Wz4oQ6K8U X-Received: by 2002:a17:902:ea:: with SMTP id a97-v6mr6293082pla.28.1527152180111; Thu, 24 May 2018 01:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527152180; cv=none; d=google.com; s=arc-20160816; b=k5Q9VH4kBI9Pngsmez9TVclmYutnxUZzOAv4mEueRm1D6ykSndRlRQNrfXt10VbaZj pjeQg6Qqs42r0ss5/Z2xzKTiz5ydQUlioBq0IQhCmP6tpmek7D3T2LYkvPs0loUR6pQ4 ajkmQeKTaXTLlPTOrA9faZLqa2Hje2ahOEvr+y6zT0cUTf7e0empit8m3AGgq6jeVLwu /RFAkSK8XN1wisU9ZKtPrXYmkELPyiiAI/nL89TttGUsn0UcQUe+X0spP1GxJbSalhax IXF0XQjqhcUwcIvTS9FDyP8ag1yEp73oIWfNqUJc3KL4AR3qoOfzC7uTmD1MgvKIbjWi k/7A== 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=30hYagg9gU6H9tjmtiAGEdulb/DvhgKhoPiV6DQdCCw=; b=lqMHVNudW91wXn8+2EBRNIQz6NgNUgwoUmjXZmxoobMpzsKN5w7JwI1h3184Nqt1Nj ISZDI7SS931486ahBo9YrzmfeT7RkES5a3NmNbjSRD+xSj4vj+M13PsePnAGPcUX8kl/ dXqkrDqqurHIryYAiE2MoF51ZXTir1FN0/3BA97esgEbCMafEn5XVV74XinB0QmUHXLz fFTvKAZd+YDgoEu6mRlr55P+1uk/8nyH8+sQ7JLaK00at0TszGUhLWFETtKZ1B06Vb6k xCXLafVHNG4BaXzIpLPvfbsFBeajeY0vrOWamtt/ab0XLntwAm+d+nYxU3flIyxStSzi ly1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cspVvGHT; 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 i67-v6si20815324pfi.95.2018.05.24.01.56.05; Thu, 24 May 2018 01:56:20 -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=cspVvGHT; 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 S965599AbeEXIzM (ORCPT + 99 others); Thu, 24 May 2018 04:55:12 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:42038 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965007AbeEXIzH (ORCPT ); Thu, 24 May 2018 04:55:07 -0400 Received: by mail-wr0-f194.google.com with SMTP id w10-v6so1601020wrk.9 for ; Thu, 24 May 2018 01:55:06 -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=30hYagg9gU6H9tjmtiAGEdulb/DvhgKhoPiV6DQdCCw=; b=cspVvGHTh6SbtsexAsFq5Vtc5bpy/HCx7iVAx4tMrd8dGgOHbvj/+B9jhbMayiS1vq FHqFKhleXs+UE81zbCZ6PRDzZxaD8VYuBk8rLH4+cyBR5LwDP2g+YP5/PWAihUYADcUw vklNDVLoMqRRdcoijBuR7ar6nm025ZeLVaIXRQbPfFzYqfB8j38eNY3xTomOhiIUgSSi 5t2KwbmRygrPv5e8+n0Bh4xYQxrh4Zn+hP7/i9gjnaUi8UfRjxPLqE6WlKQ7fEc9lJ77 YA/MTYd6bzb5HVE1D/502LUKWLIgSYvFWespIhuWPTZf0zYFWBykbpzjFPEqVUHILmgK sdug== 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=30hYagg9gU6H9tjmtiAGEdulb/DvhgKhoPiV6DQdCCw=; b=DhRmrP6Q4ciHp3+jdBmwxozwEUriy57N8HF+vI3KO1thlX25m4p4hbN5hGUXVYmkFS ZTcYUECGiBWZawhqUm/t9dWKQnwrqhfXrjxOubdJ5dYuChQySxmf1iN7FT0RP28Tfza5 5F383hJ7hUavFg7/KJAzCVpJuGsvOCIe7Eu0lWcn7pOT2lKg6EWtnvjdpWMiiJVb5MSP XmoBvF/TK5T6W9QitbzRXSZ2WAegMOtajdjsTa2Cnj4X3WccFZjTTdrYJnxx/8qfjLWf zQO52GW2lwHRBYgojUFhy7RMBI5qKeOLqGqkiI5esg1qxQFFb3dCzUuJN+vIzy7RPXfc 23MA== X-Gm-Message-State: ALKqPwe04l2kjVLmZNvku9AhjUq1vw7qAEZoTFMea/oQ2dZNR4rG9d9+ X+2IbGeDhiY21Og5wVWkTKUMiA== X-Received: by 2002:adf:8756:: with SMTP id 22-v6mr4763779wrz.117.1527152105971; Thu, 24 May 2018 01:55:05 -0700 (PDT) Received: from bender.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id z192-v6sm3348462wmc.10.2018.05.24.01.55.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 May 2018 01:55:05 -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 v5 0/6] Add ChromeOS EC CEC Support Date: Thu, 24 May 2018 10:54:55 +0200 Message-Id: <1527152101-17278-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 v4: - Split patch 3 to move the mkbp event size change into a separate patch 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 (6): media: cec-notifier: Get notifier by device and connector name drm/i915: hdmi: add CEC notifier to intel_hdmi mfd: cros-ec: Increase maximum mkbp event size 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 | 104 +++++++ include/media/cec-notifier.h | 27 +- 14 files changed, 581 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