Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3585993ybd; Tue, 25 Jun 2019 05:16:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+UYDdH+8+AF6rkjrJF+VDQTLn8lEkDAPHwudcv1QM6B6OnRafj62EDC571D/+JagjPhP/ X-Received: by 2002:a17:90b:d8a:: with SMTP id bg10mr31757642pjb.92.1561465011123; Tue, 25 Jun 2019 05:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561465011; cv=none; d=google.com; s=arc-20160816; b=HrBfMdvwKwBZc5/F+Dw51lxNBH6QCjfbHOeIGIY76frnZF12kM8YBqj47O4JI7y0/J YIfDo5AzKbPQGnXkPXVEM2wt5qX673KQM+PtqJ3OiCNFZcBCHCfkwrRjCuj45ktbyx6Z 2U1Q3lLuJupHh2PG+8HSdKAc5Z6IaZpVZNAN+MX/kOLBR2KqUskrmD7wE24MpVWPQ6hT Ul/7mhP7ZhKFEZ3M52W47p8MDLEJ+7BgI69DqAV4W4511xBevZXGTTcE/KXtr+9Zecsy kY1KuO/a22IUZeLRZBbghaXHSnqryqcMT3WiFo8DXOLu+U0YOaNEJJLF5T6+mPtBJjjd F3pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Q81J1Mwr6LSFft8LVWX+z/1NkHs7l1zFJdMBVBc97+0=; b=1D1NheJXvhxpz62+PuW7gPX3YnEzfpPVKgueNa1KwJUM2XeajA8uYADNdWXfg+6Aof Ej9yL4b0Ecl/ElSqpXWajjjhKhsMnM8GhEEwKGwPyIUqlrH0QC2FJN2fC5gOlgNBooVT Lt3UlUfxJ8aOSs4MMgDVmm3iwdt/F4rGvFZs9wd9ywmH7GqIMdnfDTv+7hC1P2OIwk27 W2NhS5A5TpDyB4u3giizFwbGO6ojxOzei1hh/eFxaHm64pJ0n1ihzQfmK7TKZsQ1q22g jnD84WDAqZisLTsrNzlFGAPNFMbzTojlm3m2T7HlhIAur496P0QayPqSEDiS8XYRPEkn YygQ== 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 p19si13081105pgk.309.2019.06.25.05.16.35; Tue, 25 Jun 2019 05:16:51 -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 S1731514AbfFYKYt (ORCPT + 99 others); Tue, 25 Jun 2019 06:24:49 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:56360 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726301AbfFYKYt (ORCPT ); Tue, 25 Jun 2019 06:24:49 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 7C869288DC0 From: Andrzej Pietrasiewicz To: dri-devel@lists.freedesktop.org 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 , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 0/2] Associate ddc adapters with connectors Date: Tue, 25 Jun 2019 12:24:39 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190625101655.n246vbwtupb4eoyz@shell.armlinux.org.uk> References: <20190625101655.n246vbwtupb4eoyz@shell.armlinux.org.uk> 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/ddc lrwxrwxrwx 1 root root 0 Jun 24 10:42 /sys/class/drm/card0-HDMI-A-1/ddc \ -> ../../../../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. v1..v2: - used fixed name "ddc" for the symbolic link in order to make it easy for userspace to find the i2c adapter 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 | 7 +++++++ drivers/gpu/drm/exynos/exynos_hdmi.c | 11 +++++------ include/drm/drm_connector.h | 11 +++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) -- 2.17.1