Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4491418imm; Fri, 18 May 2018 06:05:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrL/v0Vvww7h7r0RemZebR0MDgehARSRDn+/AzojgceGN9gwkb95M8qv7YWiTLsD1KfMgB4 X-Received: by 2002:a63:7848:: with SMTP id t69-v6mr7522255pgc.380.1526648732639; Fri, 18 May 2018 06:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526648732; cv=none; d=google.com; s=arc-20160816; b=bF7eyL4u3uGkq7isGi3ZxwsVTyCnTOO9Uo53SOLCn2Y4QdM/In7Zpe8DwykGdf8yaO /N+0BM8W5ttYUtsd0MRQWrVlJZIiuNe9RgMe+UR15uBQF5PpZqqX923Sao7boZ46slUn 29ZWpSqR/PYOvnkYZAhBRf0vc2QfZXi00nSzClpr0O36ItbsiU0dsHsxPBiWFQDoScI5 jmnMazQqOj6Kz3Y28YWHkfE91bm5cDJwZoxD020JGHkCEONdlvhOrzk6gF45j2tNdRea JsE7oUv/NzBY8aDYrBMnZ6qdahzIrozfewKrZEf18phlgbkLu3+OzN2QRDyicupxY8ge GTPA== 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=EwMICsycGgiiUGtRm1qUiEEKIXgY9QUEZqpSQLcmnes=; b=yoYM5208G6c64XZQ57O6fhx6CZnN0lLI4M1bVl7UKCK4SPkJ/Pasy9jJEShUkIG97V fi+JpZS5YdIVKNPnkrjLmewjOxteC+OeKGyQChrhxJw1vI1PxUZWTML6CP55zi4Iz0tv n6mT762pgRPmXU4Vvm+9+CZT0i3Xb+7K3xGjQj6X5p2moGRa8ohe/LWm/H0iRtU4f1Cf vGABWVdI6ojqa9DMSRxciwnPP+hg8KGEggSP+fKS9k2WY0fvdDTc64SOmnzDJVpqaVJR 9DlqI81s0wxrTrAw7yph1Omc6lvE9nY1JGULIJBnjCTZENqY6ksZogcAh/nphTBTrYx5 zzGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=0dycl7SR; 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 d6-v6si5791743pgc.140.2018.05.18.06.05.17; Fri, 18 May 2018 06:05:32 -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=0dycl7SR; 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 S1752199AbeERNFO (ORCPT + 99 others); Fri, 18 May 2018 09:05:14 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33751 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751977AbeERNFL (ORCPT ); Fri, 18 May 2018 09:05:11 -0400 Received: by mail-wr0-f193.google.com with SMTP id a15-v6so1854564wrm.0 for ; Fri, 18 May 2018 06:05:10 -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=EwMICsycGgiiUGtRm1qUiEEKIXgY9QUEZqpSQLcmnes=; b=0dycl7SRCN81IHAF6nGNJvBU/VOP0KokwdzD1ZCYEXIefzwgnMNkkGE3OYhpLqIuAq YHqP7AxlmPCp18woDPuhJyxIzTJj6R01cwu/zMWHR85Nii9OUVbMBsMH5eonm8CS85uL ZbBk0/v+22hHNIWGlsakMG8TVyScs+Q23zgciQrFId3PblVOx/GCdE09ds8dkcn0KVQt vSRNdVlQZiamhPpCOJijHld+4WZ8EtcJaHpjYPuFUoDIG3PRIHh54W5ezDqEQm+y0Fju Vr4IG1lqAU3w4j11gbfTNGdQwpMyT4J8m7EVpvMyWhjv7++p6hlmmQ9AajNzPkuV1O2a bn5w== 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=EwMICsycGgiiUGtRm1qUiEEKIXgY9QUEZqpSQLcmnes=; b=dIr0AZavap29x7aq46a395ei78vWWvY38PVCiF4hkrqr8MT1cs8aZLU/o3xWUpuukJ LRJzgbD8DvKwJsXZhwjaVUW2oWooSNP6q7ZKu7uTw+eTZ8BZcUAWpCZK2Z4+xTwOJI5j o/iSmEMTBbjAN5ArZDajJQeb/ppQKdVIgTWKvfWVJ1F6VWiQcfYEATe8QAyuu9o3Oud7 rPf/lJkXUj0aAiL3pdPl4gYF81MjTMTrGEV9ef2/m8VRgfMBzDd3U8mf2ZwcnT6zVyHI aLgpyw6EbTTx6F2YOybWaM5MkreeR81XUkYzzK/tlaOuhjljSRiMvKewWyK39ha8O67p evEg== X-Gm-Message-State: ALKqPwdJ7IKpaGvMrPFnVIEGOl7PY6hMoBiXDMsDYzhukYU0N2nqq11h +PA7VFVRt6TKRsolvkhsbBODnQ== X-Received: by 2002:adf:9978:: with SMTP id x111-v6mr7238138wrb.135.1526648709213; Fri, 18 May 2018 06:05:09 -0700 (PDT) Received: from bender.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 131-v6sm11928052wms.34.2018.05.18.06.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 May 2018 06:05:08 -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 v2 0/5] Add ChromeOS EC CEC Support Date: Fri, 18 May 2018 15:04:59 +0200 Message-Id: <1526648704-16873-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 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 Chrome OS 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 | 80 ++++++ include/media/cec-notifier.h | 27 +- 14 files changed, 557 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