Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp334331lqo; Fri, 10 May 2024 00:55:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9acFC1YP3xBynZVL5LZzyACxzslrVtXlYIma5zqqYfJIIOvaf4F5bBa+12uGwtQ8p7vSoS0dCpJzbARlp5774qUQ+tfE3BwRbeK9VTQ== X-Google-Smtp-Source: AGHT+IHwSFhEi6YIlIRMbq6lakzvBpGpv90IZ3w0uhj5NgSFXZWONW5svVX+zZnFW1hpikQOpUzw X-Received: by 2002:a05:6512:3d8c:b0:51e:f79e:15d9 with SMTP id 2adb3069b0e04-5220fd7ce7dmr1799124e87.21.1715327742237; Fri, 10 May 2024 00:55:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715327742; cv=pass; d=google.com; s=arc-20160816; b=NLuvdpJach+dz3wBBJA4rlAtLVnTkJK4GUOwuS+nh1q9wlElA42qMVzHIfYhOc9yD9 PRU2JcXaN4824mfhhrMphrXNlkyS4NRxnOM3f2rFFfxMEQ0yx/bXgAqXeSgdY16R+njP 4PNtAKVwzQwKut4nrGB5Dbmc0wly203FKcNQKC7FNaYCg5M3vNdMoTqLgOww1N2fZ1eW RNkQN0Qi1k1VNyLXeFYEVRNs/VwMPPDzoI88DJswwnK6QuLoJmV2zz46P4of1wldLCjM Y67edc2VyLB6+adnXD6Z3JYSDZTYdglt94NBI9Uh2PYZ87kZ2ZNM5U9mwbNFYMd0rPIh dp8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hpVHInHnkm1QEyVZUwgF5QjkPWTwADdp0awUX8QDHwQ=; fh=9GqP+ARr0/yNPyD5zXZrrkcejGJInAya/T6C4sQOGU4=; b=EH8eIEHHepCq0fs4ZaJTPBaBQADvNA/udN0m+ucON2MymurJEdD2adzZojeZdELgTH KVY8Rm0lBDLictRNkMD7t7WtdTBNn2P9kI3FCPV8SwYqL2Ry0kk+JcuegMmFJyfynh/L VyRJvj1Ac09CF5ivD1OEuAJXIUsNY2wbeQSgO4wBa2YjE6FK+4gNAd/X4onbN66W5BbF rplg+rIWPgOEnOk7pJaRuKgI+6rPohojBWepJPf8luG+Dav3ieIUmbRu+PfRTd8Iufth 6xv1kfJce2TLbe9rcre4d8X/3aPe5NiDUTkHbVqf4iDXXo1RkRWH6+RtYZ5uFElChO5Z 9BIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xo1NTgKJ; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-175418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1797b71dsi169034566b.218.2024.05.10.00.55.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 00:55:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xo1NTgKJ; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-175418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EDC191F22627 for ; Fri, 10 May 2024 07:55:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E888F15F3E0; Fri, 10 May 2024 07:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Xo1NTgKJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C129914A084; Fri, 10 May 2024 07:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715327732; cv=none; b=kgRMp7dKDCZW36dO7yhqu2XKKRtZ60M1ejK08PGxB3cCEj5NChzsqntZt15SMDptihxMxYvD67oKNrc6S6paA7NFSGCBRYCBJUw/7hdTdtxwxW8mscs6+vouT6ltQX+4574kpj3nHuGLsYeZReHhnuds5KxLUqQIoBswCLilA/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715327732; c=relaxed/simple; bh=NfCq0znA9xiQQKOgqCjjhCeBv5JL4GapTvi5dTTgNg4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f7PTau1rzR0qN8tLOs8njbtaJAnSgVs+nLPRbyO2DrMJtDyAhVu/umNd+uOGfrIsCnn+c6VtsrKFp5oP+COS1QX/WHMkseaSF3OLHBDpYk5zhXBJf21v1kW48knJ+UQ+XtgZ0SzuAQYsaIuS0YzpHSkEDJEf/rIFvAEaqnDhl/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Xo1NTgKJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0EE9C113CC; Fri, 10 May 2024 07:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715327732; bh=NfCq0znA9xiQQKOgqCjjhCeBv5JL4GapTvi5dTTgNg4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xo1NTgKJVcIRWizY4Moj56cCaQqKaTr4IAt9qxFmN4ftE2ovyUckVKIsaj6OQWTdN p86jCzWoCSRCCiTfMnXkXGX3NXMw08h66lE5PowpDhAXWq2u3Y+Z7pr5/8a4Fpw19p ndykkCosAuEu5zcVjtsTvIIljbS1e25t5ZhP5xMI= Date: Fri, 10 May 2024 08:55:29 +0100 From: Greg Kroah-Hartman To: Luca Ceresoli Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Saravana Kannan , Paul Kocialkowski , =?iso-8859-1?Q?Herv=E9?= Codina , Thomas Petazzoni , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski Subject: Re: [PATCH v2 5/5] misc: add ge-addon-connector driver Message-ID: <2024051039-decree-shrimp-45c6@gregkh> References: <20240510-hotplug-drm-bridge-v2-0-ec32f2c66d56@bootlin.com> <20240510-hotplug-drm-bridge-v2-5-ec32f2c66d56@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240510-hotplug-drm-bridge-v2-5-ec32f2c66d56@bootlin.com> On Fri, May 10, 2024 at 09:10:41AM +0200, Luca Ceresoli wrote: > Add a driver to support the runtime hot-pluggable add-on connector on the > GE SUNH device. This connector allows connecting and disconnecting an > add-on to/from the main device to augment its features. Connection and > disconnection can happen at runtime at any moment without notice. > > Different add-on models can be connected, and each has an EEPROM with a > model identifier at a fixed address. > > The add-on hardware is added and removed using device tree overlay loading > and unloading. > > Co-developed-by: Herve Codina > Signed-off-by: Herve Codina > Signed-off-by: Luca Ceresoli > > --- > > This commit is new in v2. > --- > MAINTAINERS | 1 + > drivers/misc/Kconfig | 15 ++ > drivers/misc/Makefile | 1 + > drivers/misc/ge-sunh-connector.c | 464 +++++++++++++++++++++++++++++++++++++++ > 4 files changed, 481 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 672c26372c92..0bdb4fc496b8 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -9905,6 +9905,7 @@ F: drivers/iio/pressure/mprls0025pa* > HOTPLUG CONNECTOR FOR GE SUNH ADDONS > M: Luca Ceresoli > S: Maintained > +F: drivers/misc/ge-sunh-connector.c > F: Documentation/devicetree/bindings/connector/ge,sunh-addon-connector.yaml > > HP BIOSCFG DRIVER > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 4fb291f0bf7c..99ef2eccbbaa 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -574,6 +574,21 @@ config NSM > To compile this driver as a module, choose M here. > The module will be called nsm. > > +config GE_SUNH_CONNECTOR > + tristate "GE SUNH hotplug add-on connector" > + depends on OF > + select OF_OVERLAY > + select FW_LOADER > + select NVMEM > + select DRM_HOTPLUG_BRIDGE Can these be depends instead of select? 'select' causes dependencies that are hard, if not almost impossible, to detect at times why something is being enabled. > + help > + Driver for the runtime hot-pluggable add-on connector on the GE SUNH > + device. This connector allows connecting and disconnecting an add-on > + to/from the main device to augment its features. Connection and > + disconnection can be done at runtime at any moment without > + notice. Different add-on models can be connected, and each has an EEPROM > + with a model identifier at a fixed address. Module name? > +static void sunh_conn_reset(struct sunh_conn *conn, bool keep_reset) > +{ > + dev_dbg(conn->dev, "reset\n"); ftrace is your friend. > +static int sunh_conn_handle_event(struct sunh_conn *conn, bool plugged) > +{ > + int err; > + > + if (plugged == conn->plugged) > + return 0; > + > + dev_info(conn->dev, "%s\n", plugged ? "connected" : "disconnected"); Please remove debugging code from stuff you want to see merged. Same for all dev_info() calls here, when drivers work properly, they are quiet. thanks, greg k-h