Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp692767imm; Tue, 15 May 2018 07:49:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrZLo/i+g/nG3e35Q/rD8sJX3GanH+DnFDv4PVAHME/VQk42Dwi2a3QI7efGLV9mf4eDJB2 X-Received: by 2002:a17:902:6bca:: with SMTP id m10-v6mr14791635plt.6.1526395772872; Tue, 15 May 2018 07:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526395772; cv=none; d=google.com; s=arc-20160816; b=KmGsBUyHDhoVwmc/Pv2SyCMpGRjwgnU8nE4I9kYa8f4XVYPoVDVlW0BUjcKNciRoU0 kiT0UCDDuP3MUKzGIz84gYRkKO3hmhBonjpcCEb6tA3XSNd/O2lsYFDkjpK0IFnBXrPS ftj4wNjcacCELXmS7OvoxK+fMOlUUQGpPQjcraP9LpIISFr5EV3jS62nKqOlICKDawz0 HcLPvRVZfw8L0QQ1KyApZ9XBQep5j4GWnDyFHkvC8r7H7DqRTGPOMZ5eZO/PkKxKPF6l YQ+eCFM58V8q7ZjaE603eHog6s/vo6ZP4Zy65I1sB2aYdNqASRW9E0xYeM0aae2i5pdg sukA== 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=OT8kV3EHkZ/Zkp+0I6rdaapGrSlFkk5C8ErsyKErqvQ=; b=zaGytOoT4A+gKOL7g+mib+/6HwqUoq6jTRRvwKMOq4nTCgrQWUCmH7EDj0JXU9cjMd v1QsYlErkKzYyqFrn0fsF9DoZN5Khj99Ol0tib/th4Agh5qJTBtHAU39c4MBbGeCNCFs MfQbQK/Yy5Eq1FMYZPuI+EGdxpRecCwWzX6V+0hdTEC4hoc9rT75b+jSU9LsxCvhm8NY 1mGBC2RopoEoKy979Y4tOQPcrdobWe8/g2Ozgm11UWJhQFpRPaBEg3y7T/su6CTri4z1 n3mWKN0+4sk5r5fAVooIJG3kb6CI5WNemDLxXMJaYjHh+pLTRVCDCQYcceK6HV12e1Oy udzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=j1ITEhJP; 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 g1-v6si165558pgq.165.2018.05.15.07.49.16; Tue, 15 May 2018 07:49: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=j1ITEhJP; 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 S1754158AbeEOOmc (ORCPT + 99 others); Tue, 15 May 2018 10:42:32 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:32832 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754063AbeEOOma (ORCPT ); Tue, 15 May 2018 10:42:30 -0400 Received: by mail-qt0-f193.google.com with SMTP id e8-v6so568113qth.0 for ; Tue, 15 May 2018 07:42:29 -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=OT8kV3EHkZ/Zkp+0I6rdaapGrSlFkk5C8ErsyKErqvQ=; b=j1ITEhJPvA1C/8+dgbb+QTIn54frsXfKwiLnS3tpATbjtektzmBEiNqpc2oeRD6PYc uXQshUoUTJG1yaC4aEz9NrUl+yuJeJuHaxb0xyP7SBiiT5EAfbq8RF5BDIMU0wknKPcq y4hZ7Ns0iTl1KGDiM2ZuElSUP2608FJuoO0ZA2n61QSqAFVPi+2aenteDh3euSWDIbqP 083tFWLHWcqvfwtlXLVQUjFy962C5tfdC7sGqYi2rKbkRQ9ubj0bxfA3kQOUykMRmfIU 1CzCy8XVWw+2F2g1LxhrZVPoNq2vTqQQjVFVLvJd3supKhodsaVnEoxYtJPUvOahh2bg hzZA== 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=OT8kV3EHkZ/Zkp+0I6rdaapGrSlFkk5C8ErsyKErqvQ=; b=qM1oZj4BImn1yV09g4lczrpuMIAurnyxtEjxNwTeSGrCyB/73RXOyQPQUQYJwcX3Dq eVowqF+5qiBfIQdBDtsqnTEZeGLkfmkl8HZQ9SsYBh7kwQu3sPefsIU1UgiPCZkh6W7H snzKoTEA32eOFSPpLc7spA2Fdef07GodXTKCboiUbOZahQjsgu3r2SHsuf0lcbK35f/g fBPmEYJVqfbPkzU3MBPKCP774KLqubqLTxffAQ8H6ZSJ2kRdVwWjDxRRSd+WSr/oMihg 31QtnPmjlKBogLCgjFrUD9h2Dc1A8zk2t1YbGC8peIznVUA72gTxmvFjO6T83dFhQqqX d0UA== X-Gm-Message-State: ALKqPwehCsO81eM0E4wwYEYBuyEVJxKRrg/yWDcYGcTKZ8nPWnFgwbGa z2N5V20BAc06UQsiY4gPfbJKHg== X-Received: by 2002:ac8:2fe1:: with SMTP id m30-v6mr14539379qta.43.1526395349113; Tue, 15 May 2018 07:42:29 -0700 (PDT) Received: from localhost.localdomain ([2620:0:1043:fd00:748b:2433:2688:e1f]) by smtp.gmail.com with ESMTPSA id z5-v6sm132693qtb.88.2018.05.15.07.42.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 May 2018 07:42:28 -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 Subject: [PATCH v2 0/5] Add ChromeOS EC CEC Support Date: Tue, 15 May 2018 16:42:17 +0200 Message-Id: <1526395342-15481-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 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_drv.h | 2 + drivers/gpu/drm/i915/intel_hdmi.c | 12 + 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 | 335 +++++++++++++++++++++++ drivers/mfd/cros_ec_dev.c | 16 ++ drivers/platform/chrome/cros_ec_proto.c | 42 ++- include/linux/mfd/cros_ec.h | 2 +- include/linux/mfd/cros_ec_commands.h | 80 ++++++ include/media/cec-notifier.h | 27 +- 13 files changed, 526 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