From patchwork Tue Jun 25 09:46:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Pietrasiewicz X-Patchwork-Id: 11015173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE06C924 for ; Tue, 25 Jun 2019 09:47:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D00C32845E for ; Tue, 25 Jun 2019 09:47:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3E7A28ABA; Tue, 25 Jun 2019 09:47:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F1B32845E for ; Tue, 25 Jun 2019 09:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ieXy6/7HfgvC/dJfBI/q2xYx++at7SvouKWKn1JWL30=; b=c7O NQLrsGgjtJmuIR+AQY0JKwafVHexztfMoW7MFD4S0909ceMKBc5rmwKlxPWQoX3dkf5WnmrxeTLhz YM/D24MrMyaIkg/wa10zWUNmQgrZ2w3SaILa5VPYG3/WbeqDxM8im7twEFt8w6AInej6pwT2q1OXS wL7LmWsOGBtJ9PzvNtMm5VZFfqZkQO8OR0ACPGKhn4iA+6k3oqVi3FgQEmQ6+VCNFXeIEDvmRqQhr xkgtf2R+sUA7hR3Rjue3QZxmGGnX5gwg0Z/l6AEYXuTHE4iIOLC6kyQTkfCzDX/ifHcZhAoy9ezdT rGGQlj9j4EanF9RVKXoS/ikRTC2XjKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfi2Q-0002d2-OE; Tue, 25 Jun 2019 09:46:54 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfi2K-0002aF-Lp for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2019 09:46:51 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 9C04B2607B5 From: Andrzej Pietrasiewicz To: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190625_024648_861400_E9F942FB X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Joonyoung Shim , Maxime Ripard , Seung-Woo Kim , Maarten Lankhorst , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Inki Dae , David Airlie , Kyungmin Park , Kukjin Kim , dri-devel@lists.freedesktop.org, Daniel Vetter , kernel@collabora.com, Sean Paul , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) Reviewed-by: Andrzej Hajda