Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3573205ybd; Tue, 25 Jun 2019 05:04:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjgRnN9Z6zGem7uA+6g//Xm7zUMriO9FwpE574IlTv3MddCXXbvyrBkjVSYrYknjzVpgwo X-Received: by 2002:a17:90a:62cb:: with SMTP id k11mr30200905pjs.26.1561464281560; Tue, 25 Jun 2019 05:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561464281; cv=none; d=google.com; s=arc-20160816; b=bVbUwfYfj3dsGDBL6X8MRb1spWroOAaWb1j0e/Wlr2XOS4QTLyhk8/8rSLMfH7qP7p 1J6P0zAf4HR8LehzRFfVE7ZCPKlGdLg3dGlg76RvfVUuL0O4IBUNnhnN8tL032ZHjGo5 DPAQkBpRTNmp0m07sSLHBlEbpE8OoyzNzjHKO+Q9ypMHJuLLDvNybaZmm19WWjoRC6y6 DWEPoVYWXykihNwyJZvuehzk+26uZr/rzOR+16bCPWuT2qj7LXI0P3Gzn4EYdR+TYIZU kagxi9cnU8EvXRWD0TH/Y61BgrHwp8rREwKx6Tsofp+cm7KShpBetBTJ78bIQduNWTSg yU8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from; bh=eibEmcM3L8C9dfqmKf614fs/xTmXCFAZsGAQZiF0qTw=; b=MP3Ih8MtnPDNqTmRSwbHKs7NwLgSOPrs8PwQakTIsP/TcnlpZJaBz+kv4Bg2amgYHA I3iXkAqmGz7JM3gd3iD+4RghKEdcRw9ZKTQVEnuvQnM974ENhMF3Ie0x/moYMGl3L84U NyDJsb8T0s104keL4A0mho7Z1z3SY73E1Gf0SO61wc9hKYObgfvJJ9pdi9Lawx4PafGl Pf9WeIN6A9rifuZHPCwsBclmL1zJ6RIDm+Rgtu6hlu9nEP7IRBk63TGZhZ1SiYKaOisM nWjAhxK56h1epsVsaiJYUsUfbSAlpK5+g5w007G38WD9SwgN331rDZdMeZfznVCNgUd/ 19zA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r72si2609464pjb.33.2019.06.25.05.04.18; Tue, 25 Jun 2019 05:04:41 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729347AbfFYJqs (ORCPT + 99 others); Tue, 25 Jun 2019 05:46:48 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:55822 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727729AbfFYJqr (ORCPT ); Tue, 25 Jun 2019 05:46:47 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 9C04B2607B5 From: Andrzej Pietrasiewicz Cc: kernel@collabora.com, m.szyprowski@samsung.com, Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 0/2] Associate ddc adapters with connectors Date: Tue, 25 Jun 2019 11:46:34 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is difficult for a user to know which of the i2c adapters is for which drm connector. This series addresses this problem. The idea is to have a symbolic link in connector's sysfs directory, e.g.: ls -l /sys/class/drm/card0-HDMI-A-1/i2c-2 lrwxrwxrwx 1 root root 0 Jun 24 10:42 /sys/class/drm/card0-HDMI-A-1/i2c-2 \ -> ../../../../soc/13880000.i2c/i2c-2 The user then knows that their card0-HDMI-A-1 uses i2c-2 and can e.g. run ddcutil: ddcutil -b 2 getvcp 0x10 VCP code 0x10 (Brightness ): current value = 90, max value = 100 The first patch in the series adds struct i2c_adapter pointer to struct drm_connector. If the field is used by a particular driver, then an appropriate symbolic link is created by the generic code, which is also added by this patch. The second patch is an example of how to convert a driver to this new scheme. Andrzej Pietrasiewicz (2): drm: Include ddc adapter pointer in struct drm_connector drm/exynos: Provide ddc symlink in connector's sysfs drivers/gpu/drm/drm_sysfs.c | 9 +++++++++ drivers/gpu/drm/exynos/exynos_hdmi.c | 11 +++++------ include/drm/drm_connector.h | 11 +++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) -- 2.17.1