Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp324644imm; Fri, 1 Jun 2018 01:20:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLK7JucU8K8QizHkde90yFbIuxjyp6Irjh5h+wgzj7WO6LrJEpheUPjJUxMZ4OSW6kd87pi X-Received: by 2002:a17:902:b410:: with SMTP id x16-v6mr10244635plr.324.1527841236699; Fri, 01 Jun 2018 01:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527841236; cv=none; d=google.com; s=arc-20160816; b=0craiLkD6fkhW/jjKSWba3Kwdorb+NL0UE1iUHEmRCnATBE3puyQz29T6rMp574VMT 0ahMWa/gkXT/6+zdqHZkDZC7pV0D2HVTKttcd1IsmWdmiBXUMzwmo0UFKAMINJCVflkf RY2Aw5L17UZ/MGY4wVuEoEjtsEjTlrrV+f+1bhP2kRjaJoNXKQZkvB3SyUT7qsIxKqZa GC2Pm20g0sclW/j9E07b/z6Ahlx44oxgdf4+hmrdlFRNHFFhp22GG3VFT/pJDD4ZYb2S oeTnML5N4pSTv4d7+zIHTxsYGFD35dk8SHuWRuKOmxCxCTHiFn+erebwLifPa1ZmGT6a MsKg== 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 :arc-authentication-results; bh=oaegYL5uoD2WMMGgIHqA069Bm4zj8lTV5w/xUpGrAjc=; b=0Uqg9+dRYAEJohPamUiGoDN0M+F7FX8tAmEs2iz3gnvkQ2sinOYKs/1+H86VOekyOR Qiy/Vig1bwxtIPjqAYBDQcuJSQpFgGCUA339QHPqiM1bu03AkXdQVKFY3jj97t2/1FfH ycaT04j0XGfHWhS8dNcw5P0R+izIAFw19lvHM6d5eca0YNVSfxMnPc4NadIQe2cfv1ZV AFTRZHbRUdB6cA4q08EleeiSBMTUNkjCt8xAzABnFxehXis9TKatlWDt9hzgdWa57XIw Gyq5CjTqxhd/nEI4ljxf+y0ohHCTbzFqvbxGqb3tT2hRD5+iav4rdIoBqrn8uTZ02lJS 2ZcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=DqUnDgEb; 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 m3-v6si38945728pld.296.2018.06.01.01.20.20; Fri, 01 Jun 2018 01:20:36 -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=DqUnDgEb; 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 S1751433AbeFAIT2 (ORCPT + 99 others); Fri, 1 Jun 2018 04:19:28 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35443 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961AbeFAITX (ORCPT ); Fri, 1 Jun 2018 04:19:23 -0400 Received: by mail-wm0-f67.google.com with SMTP id j15-v6so1179029wme.0 for ; Fri, 01 Jun 2018 01:19:22 -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:mime-version :content-transfer-encoding; bh=oaegYL5uoD2WMMGgIHqA069Bm4zj8lTV5w/xUpGrAjc=; b=DqUnDgEb8AoBcpXt2GoaEYm6sNFDfWqK83ulgwwwwRJUSsY0tqTCx5EhK0rlYKbRDL yPhJ1YIkDZ8rwAGlAI3eTiYr5zzq/JHjjhttplm2+onlDw3fi6OvCWMbB9mTcy0c9HFN XWo15rm1klPiDlb+PUYls0CLXohU3tKKSXJNZopmcTfREdBJhch76t++ihkYzHHHdCiQ hK5KNfeGVpGjjXYT1y17QVxiV8QRY0aZJPcPx+zpZYrS/PDx8Tb/HipmilZWT/wcNAf2 ibwFQH4r3yci/Oz67XU+/ZHycjxEzo1u/no1AqnibbqIAsjHU6RxGdOLT0rFsZlXONJj gTTg== 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=oaegYL5uoD2WMMGgIHqA069Bm4zj8lTV5w/xUpGrAjc=; b=WlKlDmjBiSlATB5fK5Rd782zEar8j/c4J/IiOPPXAq4n+yK+nlBDq+bz9lpdeSbzbb LqnSkAMhsnr45xtWEPSxEGyCfBqhFGAMaT6eWrK7wnu2CHDujHQNzbOAudIzZtARXKSg 2qKzjWojXqfaQXl7GLZ77KjNOCdgwYf8xrB92Ip6IRmCALduq+7ImX/pABa8YeWZFp4N RMMoDItwxaWqcPc0H40x7DynuLVLaC658Ia9ETvgldxP4D24He1pMNfjSoO/RhQGik0D bIrNaHpDh/ZzdyZWx1WEAzFdc7J4TNb9I9DIOg21ATbQHYrxIiOLisq+hj5k1rSGwvyp IERw== X-Gm-Message-State: APt69E18WS4F3khDbdADPggk2KM+MT3x+ezMf6T+/9fMeWDWk5rsrLAk Tdqkm7gtNmeJqyzV+wx45161mg== X-Received: by 2002:a1c:9ec2:: with SMTP id h185-v6mr2056691wme.68.1527841162038; Fri, 01 Jun 2018 01:19:22 -0700 (PDT) Received: from bender.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id h7-v6sm555949wmc.44.2018.06.01.01.19.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Jun 2018 01:19:21 -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 v7 0/6] Add ChromeOS EC CEC Support Date: Fri, 1 Jun 2018 10:19:08 +0200 Message-Id: <1527841154-24832-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 v6: - Added stable identifier comment in intel_display.h - Renamed to cec_notifier in intel_hdmi.c/intel_drv.h - Added Acked-by/Reviewed-By tags Changes since v5: - Small fixups on include/linux/mfd/cros_ec_commands.h - Fixed on cros-ec-cec driver accordingly - Added Reviewed-By tags 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 Reviewed-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 | 24 ++ 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 | 100 +++++++ 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