From patchwork Sun Nov 19 11:28:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460393 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OfH8qvfC" Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A50AFE6; Sun, 19 Nov 2023 03:28:35 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-53dd3f169d8so4670451a12.3; Sun, 19 Nov 2023 03:28:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700393314; x=1700998114; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6DB25C7bMVd6OfgWCKQSEO94Aa30Zg5F+mwrgxtdXDA=; b=OfH8qvfC+y7ShrVdEefLlwn0YHgeAsUuvqvRxPla7vIXXXW62mvlaOFVeZ/GaSzKPD HEEvFyAaUYA6DgYCuzT+lIcG64sBJPHxnt8qLQzZYHvkEj+6tMIkP0FzmWajRCsx7QE7 eK26QtRmK6bmJr6mQyE1HSPXokDA74yHkfRE47P7TrHwZetJ+kIiUPf7lqAh5laSKXf9 VndFA1l2MJl0yG1AHKFitQT/iGSVqUK0OFMYqJ6gMyxi+4EFaL+uxx5AAyXs47DUpAo9 9IrtbSN86TtPfiUJ2Df2g9O3uUYldRGNbj5YHshNM6vFww3iGaogV6OLflW65gVq9oy5 rgXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700393314; x=1700998114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6DB25C7bMVd6OfgWCKQSEO94Aa30Zg5F+mwrgxtdXDA=; b=m8Obgs5f4PBZEWKJf6QKeFLvZipE0FJk1KTE/9gvXHD9AGzHpEutRAitPQGFBEwdyf jrTuGTqFzxkulqc9c/e64b+lhA3W5pI4vhD5qPn/JfBbIEaYc5ky2tQubGCvCq79Snjk hyQ3zUfjrygzTMbucWohtcBHoccUGR/zEXnbgQAtNu94xNsA/n8cJ22s9xhdbzFQdlNV hW+PLlDlZzMzFwjUVs3RaaJ+AbrZTRDuaNSEkjfTWevVJ2r/dM1mL7xFjj0hb3dYcE4L CEZl1V4t4ZxEol1WyP2V5n4dlkJNrOCVietN3p2zOW5h+gaH+qISx+ueicTC7UqJmOuE 9E+w== X-Gm-Message-State: AOJu0YzUG4954vFlZH2w9twgFceVp/PYvLk6XMl5iSELw9jZ1+3agy0m 8h7Vz9Qt7syWcb7J6/0iuiA= X-Google-Smtp-Source: AGHT+IH2fnvLE9Y6eVfFKztByCM9+1ZwApSr8kek3DtNxua0cNXLNxfmHPPCiBsAptA+rR6QXC1RVw== X-Received: by 2002:a05:6402:885:b0:540:9d0c:75fc with SMTP id e5-20020a056402088500b005409d0c75fcmr2974587edy.26.1700393313913; Sun, 19 Nov 2023 03:28:33 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c23-bde4-3e00-2223-08ff-fe18-0310.c23.pool.telefonica.de. [2a01:c23:bde4:3e00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id k22-20020a1709063fd600b009f8af454d0dsm2420378ejj.112.2023.11.19.03.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:28:33 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Helge Deller Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 05/20] drivers/video/fbdev: remove I2C_CLASS_DDC support Date: Sun, 19 Nov 2023 12:28:10 +0100 Message-ID: <20231119112826.5115-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119112826.5115-1-hkallweit1@gmail.com> References: <20231119112826.5115-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Preferably this series should be applied via the i2c tree. Signed-off-by: Heiner Kallweit --- v3: - fix compile error --- drivers/video/fbdev/i740fb.c | 1 - drivers/video/fbdev/matrox/i2c-matroxfb.c | 15 +++++---------- drivers/video/fbdev/s3fb.c | 1 - drivers/video/fbdev/tdfxfb.c | 1 - drivers/video/fbdev/tridentfb.c | 1 - 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c index 1897e65ab..9b74dae71 100644 --- a/drivers/video/fbdev/i740fb.c +++ b/drivers/video/fbdev/i740fb.c @@ -163,7 +163,6 @@ static int i740fb_setup_ddc_bus(struct fb_info *info) strscpy(par->ddc_adapter.name, info->fix.id, sizeof(par->ddc_adapter.name)); par->ddc_adapter.owner = THIS_MODULE; - par->ddc_adapter.class = I2C_CLASS_DDC; par->ddc_adapter.algo_data = &par->ddc_algo; par->ddc_adapter.dev.parent = info->device; par->ddc_algo.setsda = i740fb_ddc_setsda; diff --git a/drivers/video/fbdev/matrox/i2c-matroxfb.c b/drivers/video/fbdev/matrox/i2c-matroxfb.c index e2e4705e3..bb048e14b 100644 --- a/drivers/video/fbdev/matrox/i2c-matroxfb.c +++ b/drivers/video/fbdev/matrox/i2c-matroxfb.c @@ -100,8 +100,7 @@ static const struct i2c_algo_bit_data matrox_i2c_algo_template = }; static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, - unsigned int data, unsigned int clock, const char *name, - int class) + unsigned int data, unsigned int clock, const char *name) { int err; @@ -112,7 +111,6 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, snprintf(b->adapter.name, sizeof(b->adapter.name), name, minfo->fbcon.node); i2c_set_adapdata(&b->adapter, b); - b->adapter.class = class; b->adapter.algo_data = &b->bac; b->adapter.dev.parent = &minfo->pcidev->dev; b->bac = matrox_i2c_algo_template; @@ -160,27 +158,24 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) { case MGA_2164: err = i2c_bus_reg(&m2info->ddc1, minfo, DDC1B_DATA, DDC1B_CLK, - "DDC:fb%u #0", I2C_CLASS_DDC); + "DDC:fb%u #0"); break; default: err = i2c_bus_reg(&m2info->ddc1, minfo, DDC1_DATA, DDC1_CLK, - "DDC:fb%u #0", I2C_CLASS_DDC); + "DDC:fb%u #0"); break; } if (err) goto fail_ddc1; if (minfo->devflags.dualhead) { - err = i2c_bus_reg(&m2info->ddc2, minfo, - DDC2_DATA, DDC2_CLK, - "DDC:fb%u #1", I2C_CLASS_DDC); + err = i2c_bus_reg(&m2info->ddc2, minfo, DDC2_DATA, DDC2_CLK, "DDC:fb%u #1"); if (err == -ENODEV) { printk(KERN_INFO "i2c-matroxfb: VGA->TV plug detected, DDC unavailable.\n"); } else if (err) printk(KERN_INFO "i2c-matroxfb: Could not register secondary output i2c bus. Continuing anyway.\n"); /* Register maven bus even on G450/G550 */ - err = i2c_bus_reg(&m2info->maven, minfo, - MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0); + err = i2c_bus_reg(&m2info->maven, minfo, MAT_DATA, MAT_CLK, "MAVEN:fb%u"); if (err) printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n"); else { diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c index 589b349cb..07722a5ea 100644 --- a/drivers/video/fbdev/s3fb.c +++ b/drivers/video/fbdev/s3fb.c @@ -252,7 +252,6 @@ static int s3fb_setup_ddc_bus(struct fb_info *info) strscpy(par->ddc_adapter.name, info->fix.id, sizeof(par->ddc_adapter.name)); par->ddc_adapter.owner = THIS_MODULE; - par->ddc_adapter.class = I2C_CLASS_DDC; par->ddc_adapter.algo_data = &par->ddc_algo; par->ddc_adapter.dev.parent = info->device; par->ddc_algo.setsda = s3fb_ddc_setsda; diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c index 22aa95313..51ebe7835 100644 --- a/drivers/video/fbdev/tdfxfb.c +++ b/drivers/video/fbdev/tdfxfb.c @@ -1267,7 +1267,6 @@ static int tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, const char *name, strscpy(chan->adapter.name, name, sizeof(chan->adapter.name)); chan->adapter.owner = THIS_MODULE; - chan->adapter.class = I2C_CLASS_DDC; chan->adapter.algo_data = &chan->algo; chan->adapter.dev.parent = dev; chan->algo.setsda = tdfxfb_ddc_setsda; diff --git a/drivers/video/fbdev/tridentfb.c b/drivers/video/fbdev/tridentfb.c index 816d40b6f..516cf2a18 100644 --- a/drivers/video/fbdev/tridentfb.c +++ b/drivers/video/fbdev/tridentfb.c @@ -274,7 +274,6 @@ static int tridentfb_setup_ddc_bus(struct fb_info *info) strscpy(par->ddc_adapter.name, info->fix.id, sizeof(par->ddc_adapter.name)); par->ddc_adapter.owner = THIS_MODULE; - par->ddc_adapter.class = I2C_CLASS_DDC; par->ddc_adapter.algo_data = &par->ddc_algo; par->ddc_adapter.dev.parent = info->device; if (is_oldclock(par->chip_id)) { /* not sure if this check is OK */ From patchwork Sun Nov 19 11:28:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460394 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QO/WlsLW" Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5E94D8; Sun, 19 Nov 2023 03:28:36 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9dbb3e0ff65so466607466b.1; Sun, 19 Nov 2023 03:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700393315; x=1700998115; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JTrCOgNzORg+kX6P4q5KSwq1S4WQ2CSsbEPwGEitBjk=; b=QO/WlsLWhy46Ra/Qs3atyPrxHzx9yQS7nfygUrCEBwk+lT+3B+d5U9XAs+V/wBia3t rxBYcW3hQFWwCQSMPu04omsUA4/+kE7WQawGmDwUrZ/hJYHQd4BnKIXuLRfo/jNonHAq Y/50eQEaflrsLajjO8u1ZbAmw9sQKIVsIZGxzESi7HoKsid9IJ1zt6nD3/jWWfwsRQhq Fy+jVtRIQ2X4XCpYASY0IutRmjNT93ga3kC4NMzwi13pctg0xrlehs9HekL/p5bfhDY5 mK+O7xX0dbzp5cmeCYbHiIQuSLK1TnSwHDRIZ6hoAYYmzejgVoWR8LJBFFC7vw4IHEpy pHMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700393315; x=1700998115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JTrCOgNzORg+kX6P4q5KSwq1S4WQ2CSsbEPwGEitBjk=; b=oCeZWGF4kvtOUbdQDHflhlviDExR4fUGVqV+GXTHSWa+ScAUx5i87JkJkLFNRKJjRf 1fPHzqaOUuMcn1XG1CqMCR5/XPznWZhLrpp3L4337+ZIdC2mmUC1NfsrfmMhWswst/oE Ri0sD6DKlQvlcuPcjLTiTE+R55zehmzEpPtpFdjbfullogTRocAjiZ+OpzSzEXS6YdX/ dd7zGFlCjp00w179x8eqsIfoS9UsEbMs0z5ZlUTniTpo13bA7P1vAcTqLcvznutLHhvW 8cdS+idHyChrg9tuf/hGbbtoFGQKVQmBe7jVgHvQ+VHxX7ZyV2IBi+fRQDMbuRTcXlvS qnaQ== X-Gm-Message-State: AOJu0YxvXkf4+hfDp55CRGVxSinVkdg1oj3KuTYt/++AV68RRF4ti/Mi c75DA3wiNAcQPCl4/iVIbY0= X-Google-Smtp-Source: AGHT+IGjalgverwn4S+5/ObyVC+zY2/IsZIJGBRuqRZihGBcwWfCh8FC+wiaF3tbr+HAjd7T9RyHjQ== X-Received: by 2002:a17:906:1b:b0:9e2:af56:c380 with SMTP id 27-20020a170906001b00b009e2af56c380mr3594717eja.6.1700393314983; Sun, 19 Nov 2023 03:28:34 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c23-bde4-3e00-2223-08ff-fe18-0310.c23.pool.telefonica.de. [2a01:c23:bde4:3e00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id k22-20020a1709063fd600b009f8af454d0dsm2420378ejj.112.2023.11.19.03.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:28:34 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Daniel Vetter Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 06/20] drivers/video/fbdev/core/fb_ddc.c: remove I2C_CLASS_DDC support Date: Sun, 19 Nov 2023 12:28:11 +0100 Message-ID: <20231119112826.5115-7-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119112826.5115-1-hkallweit1@gmail.com> References: <20231119112826.5115-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Preferably this series should be applied via the i2c tree. Signed-off-by: Heiner Kallweit --- drivers/video/fbdev/core/fb_ddc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/core/fb_ddc.c b/drivers/video/fbdev/core/fb_ddc.c index 8bf5f2f54..e25143219 100644 --- a/drivers/video/fbdev/core/fb_ddc.c +++ b/drivers/video/fbdev/core/fb_ddc.c @@ -116,7 +116,6 @@ unsigned char *fb_ddc_read(struct i2c_adapter *adapter) algo_data->setsda(algo_data->data, 1); algo_data->setscl(algo_data->data, 1); - adapter->class |= I2C_CLASS_DDC; return edid; } From patchwork Sun Nov 19 11:28:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460395 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hYKRM9O9" Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421ABD4B; Sun, 19 Nov 2023 03:28:39 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9fa2714e828so160026466b.1; Sun, 19 Nov 2023 03:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700393318; x=1700998118; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ytoy8pfr5Vxi1e0JcRyR6n1bj9XY0g4pH3ARHnOackE=; b=hYKRM9O99tjQmagsfGQf4vdehfOpCpAO2wBU55AgRlIOpp2LpvtWb1V+0WobaLifcd JXkNdsaDYVM24jqmdcEUKEsJB3kPOTwNF1jaH1LURfpCHZDrdXXwlYUABXVCN7JVyYpz Fc0VWK1kqn+2c+IndaQ2JnkbcIQs0LAmoBDoiy+59ZQpsBiNDSAUr8KIDBO5lEwPQjIl sp435aaN9X4UOet/P8DXCeopdi4IXXjT+JAiU+CWHpflS247AJ8axMi+n6r78P5oS4tE iAllEzArJW8/zO1BIpnQZY+zgC4Tvle+XCU07vH3N0lgd81YuBR+9IJxxDGyKcqiN4Bi WTmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700393318; x=1700998118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ytoy8pfr5Vxi1e0JcRyR6n1bj9XY0g4pH3ARHnOackE=; b=IahFmxLf6hmigT6k6+onztfhdm4ZQcDXLEheEbQB+mHWq9zRphDb5lgmlcMccSyiZj oh4dE432T94ms1VncpcmCQ+Nh3wgsNWGNMlcOSh8M3pouMwiwzTKD0CIO17iX1kE+UG8 LcjlWT25wags4gepkVnf49vKRyeYDZhwNMevcbWx2S3EcVWBN18cyuvfHDoAWax9jMEA DbGAv639iM0rKdpxZ0oMzSaLNce20pWyCewxMTk03ZTcQ5p7WdL7QyM4JU1bHRBn3zg3 X1BZ/j5Od+8b2cEh9/U7oo52qJfkkLKyqX69IDA48lZUVQ/ibQIEi0OFdw2f7E/is+CO v6BA== X-Gm-Message-State: AOJu0YzTJ6VdMuHIhGQ/AW+QmRq/PtvWGj6qtxn1qiyk3q59szRYu4Z9 nHYyTXSVdvKOC2Ongq3LK/Q= X-Google-Smtp-Source: AGHT+IEnmNpCAkcRrOzwrSosgUk4OeD4St9qXEp+f9gvbMOTGQeLWy9ztO80popOTUrnH8s4A6uwug== X-Received: by 2002:a17:906:520b:b0:9e6:38f2:8439 with SMTP id g11-20020a170906520b00b009e638f28439mr2984313ejm.60.1700393317363; Sun, 19 Nov 2023 03:28:37 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c23-bde4-3e00-2223-08ff-fe18-0310.c23.pool.telefonica.de. [2a01:c23:bde4:3e00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id k22-20020a1709063fd600b009f8af454d0dsm2420378ejj.112.2023.11.19.03.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:28:37 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Florian Tobias Schandinat Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 09/20] drivers/video/fbdev/via/via_i2c.c: remove I2C_CLASS_DDC support Date: Sun, 19 Nov 2023 12:28:14 +0100 Message-ID: <20231119112826.5115-10-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119112826.5115-1-hkallweit1@gmail.com> References: <20231119112826.5115-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Preferably this series should be applied via the i2c tree. Signed-off-by: Heiner Kallweit --- drivers/video/fbdev/via/via_i2c.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/via/via_i2c.c b/drivers/video/fbdev/via/via_i2c.c index c35e530e0..582502810 100644 --- a/drivers/video/fbdev/via/via_i2c.c +++ b/drivers/video/fbdev/via/via_i2c.c @@ -201,7 +201,6 @@ static int create_i2c_bus(struct i2c_adapter *adapter, sprintf(adapter->name, "viafb i2c io_port idx 0x%02x", adap_cfg->ioport_index); adapter->owner = THIS_MODULE; - adapter->class = I2C_CLASS_DDC; adapter->algo_data = algo; if (pdev) adapter->dev.parent = &pdev->dev; From patchwork Sun Nov 19 11:28:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460396 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T6ESpNBD" Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA73D54; Sun, 19 Nov 2023 03:28:40 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-54394328f65so4735711a12.3; Sun, 19 Nov 2023 03:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700393318; x=1700998118; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lj6lXffwhPaiA+tttg2gWfCsavHU7fIAFEm3bWLvYqY=; b=T6ESpNBD+BilFiIBbXODWPBXtiLXQMhZzVuKaBd4gsf7x9fV0hvxf+mG8X5+pv6C+l lECeXi/AY/DGrslulZtqbJN6S5AX5sOBdZzFNdFDwykwav8AMNkeyDhOCNmg2+tWdv7b 0tOXpbT/HVBzFuRveR5+UjN6seaFsJ76Z4MSeiZD4ApDKUwrlNU9yzR0MxYt8hkEAeLP 6hjqIi3/2mebqxFVxdXGdHORfMxW2ax16vX+jRi4a2IUtnO78tDt2mIXksZxCLmqBfYA iyZn1KKpiIykU786No+AVEn3tosgoXJMJlX/nmsXhHBTOOaCss+BHk3HCGb7/8Zps9WQ bDAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700393318; x=1700998118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lj6lXffwhPaiA+tttg2gWfCsavHU7fIAFEm3bWLvYqY=; b=rodd8xXFJvy/fZgkLpyk/9DjUGc6XMwWGT33JrFm938KBCqX0wU2+lV/TVe64ueCRw MkhigGWTU247fKMr1Hzl3atpybmVMg9wmyZKYHpTo9zTM//sM5ScSW9Ui6KZ4eD0Qedb VGz+5msz4sMoYaN1Z88uhaD5KBLgtxsXOZgU/0WrV1dFSfpfo8BZOxreNweI3zYjf4mE +A94y3TEUkapFl0f+YCBQ6DEqbVEFBydPV8RY1+CJlhHd7m3hSkDIAt0Z/aqltNkJHLI P+jTDgzt0l/HuRbmwuV6ziTsvFYwEXbhKRAGD1/rP3Mn1QUqkeL/LC21FQ1vbIFeKTd7 hW1Q== X-Gm-Message-State: AOJu0YyLUB8rvm4EgaH6M2fIkCNz4TjmqH9+yzAOVn2uFjzveCXS/KKh X+4aMEXuz1nrauTxX1fFH/E= X-Google-Smtp-Source: AGHT+IFZggot9AqS3X6Qt+Jt5dcuKalJ7+U5FRGLkcM87LKer+UjD3CjY5GltxnAdA4qRjb5SMpr7Q== X-Received: by 2002:a17:906:10cc:b0:9fc:1236:beff with SMTP id v12-20020a17090610cc00b009fc1236beffmr1696210ejv.65.1700393318307; Sun, 19 Nov 2023 03:28:38 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c23-bde4-3e00-2223-08ff-fe18-0310.c23.pool.telefonica.de. [2a01:c23:bde4:3e00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id k22-20020a1709063fd600b009f8af454d0dsm2420378ejj.112.2023.11.19.03.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:28:37 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Russell King Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Helge Deller , linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/20] drivers/video/fbdev/cyber2000fb.c: remove I2C_CLASS_DDC support Date: Sun, 19 Nov 2023 12:28:15 +0100 Message-ID: <20231119112826.5115-11-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119112826.5115-1-hkallweit1@gmail.com> References: <20231119112826.5115-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Preferably this series should be applied via the i2c tree. Signed-off-by: Heiner Kallweit --- drivers/video/fbdev/cyber2000fb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 52105dc1a..79775deda 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1234,7 +1234,6 @@ static int cyber2000fb_setup_ddc_bus(struct cfb_info *cfb) strscpy(cfb->ddc_adapter.name, cfb->fb.fix.id, sizeof(cfb->ddc_adapter.name)); cfb->ddc_adapter.owner = THIS_MODULE; - cfb->ddc_adapter.class = I2C_CLASS_DDC; cfb->ddc_adapter.algo_data = &cfb->ddc_algo; cfb->ddc_adapter.dev.parent = cfb->fb.device; cfb->ddc_algo.setsda = cyber2000fb_ddc_setsda; From patchwork Sun Nov 19 11:28:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460397 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YrfThuXA" Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB84D65; Sun, 19 Nov 2023 03:28:42 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9c603e2354fso655277466b.1; Sun, 19 Nov 2023 03:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700393321; x=1700998121; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gja50uK+VGu03YOVtNxYd9PQDwE60KteuWGZ1s7ZCqk=; b=YrfThuXAeUShmEjxj61tmH0kT5nCZyzp+ByN7NdfTXr4QN5tmUAcc3P2Vg2h2p7HaI R07ak3B+Ema1bIbDUfAsW0p0yKDELKUjPbaUiDPxSdsSI9D0xO8gGxYMHT2KRLIMkNkr lZaeAe8/X+E+UxwQCfRjh2UjgCsa85rxbIRRQH8CZ2wg24UQtLHvbdgAZW8k7eqnVFvk HdiDE4HwrDMTVgXgACicPJZBoZdkDDqozOp1LGFoGNuL7YlWPwf8DuXvI7FF63OHL8RL uTivVnYASGWj1kP+z6h9RNpfiBJtFJCWL7XvW0JAjfawGcJyC1p7a7q5tcHVFKwekmei e0Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700393321; x=1700998121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gja50uK+VGu03YOVtNxYd9PQDwE60KteuWGZ1s7ZCqk=; b=A7ziA92w+WQ0Nj0QWaJJ2NjgoGqQXfW2vDhyzvKovGobcwOeDD9HWtGEoU9i/GEP2y v5V5fWMQtHpm+m2yxQfZPZ/+gcmArOctUGCurJN88lpQrxVBX7My9l69y3FI2Nf3Pmx7 xBmNNCwH6aFHI2HAqnXpNzsG4KCLSQ7/aPFF9ThxkoHx98M167GMQ35qau3CABb9OHHb y90BjKXBhiA5zDJrNdRhDgKEWSWvF8L+sB7+kLAQcTmktdZgzmUJ7ubWOJqwOiBEHJHS uZR6Tywae8XEqA3Pcuog/pRcpRP2hSStXMnVmb3YZ7az8k0N6gTO2ioCkAHKfe8E3yUI y1zw== X-Gm-Message-State: AOJu0YwaK6vEdYmpLmJ2kfrKk8Mbi8oTOV3wTUfV9cOopT/JkHIi9etW qDyaUEzQz9FiEg1quJqQDSgJNlo8uGtXHQ== X-Google-Smtp-Source: AGHT+IFOQx1CLu4gRyNAZImWfbKRXYxuIkAJlM3SnSjaoqSkAxs60CqJJdA60K/QCwcTb894UlOqCg== X-Received: by 2002:a17:907:d21:b0:9f4:1bd6:2d26 with SMTP id gn33-20020a1709070d2100b009f41bd62d26mr12971501ejc.0.1700393321074; Sun, 19 Nov 2023 03:28:41 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c23-bde4-3e00-2223-08ff-fe18-0310.c23.pool.telefonica.de. [2a01:c23:bde4:3e00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id k22-20020a1709063fd600b009f8af454d0dsm2420378ejj.112.2023.11.19.03.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 03:28:40 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Maik Broemme Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 13/20] drivers/video/fbdev/intelfb/intelfb_i2c.c: remove I2C_CLASS_DDC support Date: Sun, 19 Nov 2023 12:28:18 +0100 Message-ID: <20231119112826.5115-14-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119112826.5115-1-hkallweit1@gmail.com> References: <20231119112826.5115-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Preferably this series should be applied via the i2c tree. Signed-off-by: Heiner Kallweit --- drivers/video/fbdev/intelfb/intelfb_i2c.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/video/fbdev/intelfb/intelfb_i2c.c b/drivers/video/fbdev/intelfb/intelfb_i2c.c index 3300bd31d..f24c7cb4c 100644 --- a/drivers/video/fbdev/intelfb/intelfb_i2c.c +++ b/drivers/video/fbdev/intelfb/intelfb_i2c.c @@ -99,8 +99,7 @@ static int intelfb_gpio_getsda(void *data) static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo, struct intelfb_i2c_chan *chan, - const u32 reg, const char *name, - int class) + const u32 reg, const char *name) { int rc; @@ -108,7 +107,6 @@ static int intelfb_setup_i2c_bus(struct intelfb_info *dinfo, chan->reg = reg; snprintf(chan->adapter.name, sizeof(chan->adapter.name), "intelfb %s", name); - chan->adapter.class = class; chan->adapter.owner = THIS_MODULE; chan->adapter.algo_data = &chan->algo; chan->adapter.dev.parent = &chan->dinfo->pdev->dev; @@ -144,8 +142,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo) dinfo->output[i].type = INTELFB_OUTPUT_ANALOG; /* setup the DDC bus for analog output */ - intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA, - "CRTDDC_A", I2C_CLASS_DDC); + intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOA, "CRTDDC_A"); i++; /* need to add the output busses for each device @@ -159,10 +156,8 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo) case INTEL_855GM: case INTEL_865G: dinfo->output[i].type = INTELFB_OUTPUT_DVO; - intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, - GPIOD, "DVODDC_D", I2C_CLASS_DDC); - intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, - GPIOE, "DVOI2C_E", 0); + intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].ddc_bus, GPIOD, "DVODDC_D"); + intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, GPIOE, "DVOI2C_E"); i++; break; case INTEL_915G: @@ -176,7 +171,7 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo) /* SDVO ports have a single control bus - 2 devices */ dinfo->output[i].type = INTELFB_OUTPUT_SDVO; intelfb_setup_i2c_bus(dinfo, &dinfo->output[i].i2c_bus, - GPIOE, "SDVOCTRL_E", 0); + GPIOE, "SDVOCTRL_E"); /* TODO: initialize the SDVO */ /* I830SDVOInit(pScrn, i, DVOB); */ i++;