Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp903598pxb; Tue, 1 Feb 2022 12:50:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVAXdA+bVKQCg/sKQHDS02j5fRRsVt9jPCSFlUpUC2qzaoIjYy8QU8RrUw2E9q7VpAkhTl X-Received: by 2002:a17:903:1245:: with SMTP id u5mr27761438plh.126.1643748613981; Tue, 01 Feb 2022 12:50:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748613; cv=none; d=google.com; s=arc-20160816; b=CQh7nD8Kti1RTIIo3exsPDBserxMZRDShUqoyuOnzQ0ESm0KipU5C9WwN/YKChrigV +tPITR7V3+mPTu2mAp0c5Kb0Pit0UPRYyv1TVmPCgupluvCmT/NTdZLuw5VusVPjaY7D QmCTZ0bfFRPQtNmQte1ABaSOeU801qCdVlUKIhUOWItQHN6WI0uUaShXORQ2I23PyETC SWpffK3SQzyjeWnGMkbxmGDTJi1vyhvPxFFChZlnJIclALkwKHRbIG7XgOUZ5IyNbKWc RhQDTCw7L2e6PDpJRYMpKQpUsBR4SU85H7fU7krGW+DCxXWd9Ql2cI8Qd95mXes0ioTd 3r3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pMwMeY9OoKGLOudbA8SLCKYnBWFNuNdP5Adg3VOxotk=; b=S/jVJtW3b8QMv+cdnSNpNOCE9GBYRHc/x0kKX1rYaR5X72Awi/s3GWmKtoz4WngJsr xuBwXSayfxazpHXnvYxkoT4UJUTxT3zyM4MUkZqsI83IsAka6TIAnQicTjnJcn29nZeF QWjZxhWGNTemwMs+ABdcq68TiQ2ORFDQFVOx8nldMcVgfTIs+31IXj6W/lPtKqn+bR/6 RX/uN2eoiqK3JTZOMwbkOGbRyUMOVfMWTnhJmBaRxZ2f6o348njs8L2JXB5wXT9Uf2ac Ld9gGJcp26H4NrtBrQ/01U8RqAzmXMumFk6ih1cMcEaHGdVn9bfSv6+KjEk2/qYM0PSG wgMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C2kSIxH8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id br2si3086405pjb.6.2022.02.01.12.50.02; Tue, 01 Feb 2022 12:50:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C2kSIxH8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378215AbiAaUMv (ORCPT + 99 others); Mon, 31 Jan 2022 15:12:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21721 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378192AbiAaUMn (ORCPT ); Mon, 31 Jan 2022 15:12:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643659962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pMwMeY9OoKGLOudbA8SLCKYnBWFNuNdP5Adg3VOxotk=; b=C2kSIxH8y5lgl4o0876Ei7Su2bSCseSFbaRPSJqAWXnfOW6uhOq2kXfP+6cIQEzqxjEChl SNzUzwzdpW87b1lJJ+s5590QO3axGPfHuvfURjjEj9Hji6lxNXW19inQcI0P5MCAEI1Aao uUwnL2MMLI46ltbQKa/pWjoPMtnwGNY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-568-r1ievEFtOuCriTPRovFI9w-1; Mon, 31 Jan 2022 15:12:41 -0500 X-MC-Unique: r1ievEFtOuCriTPRovFI9w-1 Received: by mail-wm1-f70.google.com with SMTP id bg32-20020a05600c3ca000b00349f2aca1beso78303wmb.9 for ; Mon, 31 Jan 2022 12:12:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pMwMeY9OoKGLOudbA8SLCKYnBWFNuNdP5Adg3VOxotk=; b=bHXY7PByIIZFzggxxl683WLRdMbAtcfI7MhY94VRjycwK+XpWBVJ7BLPEdNvbYEEW/ ywLL/C+fGrz6decgXHbYHXH3FYmVDs9GqIagduq9+EZLBUVW5HvUPl+lpNClX0gZK2Jr W5lGJYOQzE2HsVno5p1LkZ5LxgimOf//cfg8XbHqvdy+YxiTyB1qTwsFGt/87M8gVxPS 3xerwEJ3BdBGaPBFbBArXcWy9hhza2Yt4z/ziywAXD0pXHOVbpV3LItFqILy8jWBB7OA dguQms4FmXEKuXDabRL8dzggVpStYQrb5lwnIP93xbFOlLpmwDn57G53IveB91JFD4l4 MQ4Q== X-Gm-Message-State: AOAM532nY9B2+hWalOJ+n7JDDjXNT0+SBE2zLTLKGY/IqSt8wyjtV441 YT/nxZanDL753EUJCy/3ygHsPc/V9yHvC6Umu9a6Ie2JwhmFdpFyC0KTdIJsmpzwgsxI8n1jTHW sIOcRye9ev+4uu2CuTeqHgkl4rSOvjsoyrAkNQRRsr5D1D+b2n9AZ+YxDCIAcH9Q4P022DUSGsg Q= X-Received: by 2002:adf:fdc9:: with SMTP id i9mr9272914wrs.142.1643659959747; Mon, 31 Jan 2022 12:12:39 -0800 (PST) X-Received: by 2002:adf:fdc9:: with SMTP id i9mr9272887wrs.142.1643659959514; Mon, 31 Jan 2022 12:12:39 -0800 (PST) Received: from minerva.home ([92.176.231.205]) by smtp.gmail.com with ESMTPSA id i9sm15124660wry.32.2022.01.31.12.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 12:12:39 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: linux-fbdev@vger.kernel.org, Maxime Ripard , Daniel Vetter , Andy Shevchenko , dri-devel@lists.freedesktop.org, =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Geert Uytterhoeven , Javier Martinez Canillas , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: [PATCH 1/4] drm: Add I2C connector type Date: Mon, 31 Jan 2022 21:12:21 +0100 Message-Id: <20220131201225.2324984-2-javierm@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220131201225.2324984-1-javierm@redhat.com> References: <20220131201225.2324984-1-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There isn't a connector type for display controllers accesed through I2C, most drivers use DRM_MODE_CONNECTOR_Unknown or DRM_MODE_CONNECTOR_VIRTUAL. Add an I2C connector type to match the actual connector. As Noralf Trønnes mentions in commit fc06bf1d76d6 ("drm: Add SPI connector type"), user-space should be able to cope with a connector type that does not yet understand. Tested with `modetest -M ssd1307 -c` and shows the connector as unknown-1. Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/drm_connector.c | 1 + include/uapi/drm/drm_mode.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index a50c82bc2b2f..975a7525a508 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -105,6 +105,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = { { DRM_MODE_CONNECTOR_WRITEBACK, "Writeback" }, { DRM_MODE_CONNECTOR_SPI, "SPI" }, { DRM_MODE_CONNECTOR_USB, "USB" }, + { DRM_MODE_CONNECTOR_I2C, "I2C" }, }; void drm_connector_ida_init(void) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index e1e351682872..d6d6288242db 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -421,6 +421,7 @@ enum drm_mode_subconnector { #define DRM_MODE_CONNECTOR_WRITEBACK 18 #define DRM_MODE_CONNECTOR_SPI 19 #define DRM_MODE_CONNECTOR_USB 20 +#define DRM_MODE_CONNECTOR_I2C 21 /** * struct drm_mode_get_connector - Get connector metadata. -- 2.34.1