Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp214309rdh; Thu, 23 Nov 2023 01:42:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKrWU0m+3xFBb8QeeZEtFQnE4vqMzi0LObE70b1LIwtdD3jDHMC/e87hQtPHP+iiRKdsJJ X-Received: by 2002:a05:6808:118d:b0:3a9:ba39:6d70 with SMTP id j13-20020a056808118d00b003a9ba396d70mr6704671oil.23.1700732527173; Thu, 23 Nov 2023 01:42:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700732527; cv=none; d=google.com; s=arc-20160816; b=efrUQ8ww8PxvhAvUsve+9VARlrv0WV6tWU2BgLJlIKm2Ll6OIP7l6d1gwO2Q/zTt4J 4MGKZXJWm42SGgYhV9Enf5vTb3YOqvVxfHaAC1IAgiX7QxKHizYlz7mFS9PTsljVOQLO GiTdDcdlQFgQSc6f68oUbjYdHI+Kj1sP7oDeTG8MseS74nNC4G0TNTHFo3qBMrwX6FTw 3G9DJRgVmaGqZy9GeVeDaA/+ptadaVtuX02JSbcA/uxW1RAReAQUiT7sEYaxtwTF3pU+ hvFunOFRn1ksGh8yz1pGBVo3jIOWQW1Cy1ovnnP8X76d/UJk/5c5WVaIQZbnhqhf+mD0 gBvw== 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=qvHXeOl9LDkuvADN7QZ3xhK0GHlO5gQYDZefl63t5jE=; fh=tPhpO+G+K0SmApE2sapi9verRONEKIDKx6Joih4F+X0=; b=Pi9MsYoy2DNbM7uDqfQ+eRvSNU4ZzOagNj7Osb8uOAVnUCkJJyYwEeTaGcIIAEGIEq fj7I714bg36AE5M0rDuJv7mUrTb1j3Dew+avmmKapYas+rifuTwGQlFrXgaix9jQl3Ew QU7Ruo7cxHPXxgPIxvQKK7H8W8A2GpywmzfbhgEViZRB6DHyAJa8k6zXVWklST/4OlcN 3foObdBI35PtAIjQEll6VKsdsH0nqR77HJCa09Vyfzsvcidhs3ugKYduTY+1JaGm68HX FQ10BwfOSbV9OcY9++ahwIHV1d0lKNdR8Ma5Zv9pHmWYmF0JiqnivSaL9EL7cBVlrTlc IkQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QT5Zx0xj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bq17-20020a056a02045100b005ad8009e301si1076164pgb.250.2023.11.23.01.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:42:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QT5Zx0xj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A2DF6831807A; Thu, 23 Nov 2023 01:41:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235132AbjKWJlF (ORCPT + 99 others); Thu, 23 Nov 2023 04:41:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232787AbjKWJko (ORCPT ); Thu, 23 Nov 2023 04:40:44 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B02F8CB; Thu, 23 Nov 2023 01:40:50 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9fd0059a967so341013466b.1; Thu, 23 Nov 2023 01:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700732449; x=1701337249; 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=qvHXeOl9LDkuvADN7QZ3xhK0GHlO5gQYDZefl63t5jE=; b=QT5Zx0xjlKBFQFSdf6/WfoaeV6yfuDcOxuxxLtgtKRgeZdcQ4PwJSqaLLqrDA2+rKz a+lj/QakBerplMn6+BRIDup85YF2iI4UttD9LcdoqJqF3bxILWfYm/wyLVVpAwhphlR0 w4PIps911JCHGt7KyiBhTeaqFhhzfzsfvfrOvAcZck25dST0J4QB/cRMdyZ3OOUgejon u/UOG8Sy95JFEi1KlCsiRr3xgT1CSMaySh6UcxNoxNL/ZpJ1Gk8AOx4kVbdXYaRocnWk Mfh+cuVBBY7uPA1sDKlhRiJr9GnRLKvw3UoeHFrivnH26y0jfwLXSQws190llOZRfFaA mWhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700732449; x=1701337249; 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=qvHXeOl9LDkuvADN7QZ3xhK0GHlO5gQYDZefl63t5jE=; b=kS3hBBr/muHbaEkWLx+jY1bboRl3rPaqz2WGiTjzaDyzEbcaMAJn2e6FjRWZ+rpgy+ 4COvBEp6yChBf7wDHN0uug4QKBMMCG7TJ2MuF57Vf+7YLmVmI2LaOIMnz4bkgAszX+cY 3Z0DMxqkwX5v0Koea6B8MhyZH6zhBNsDiweKEUohquXH4ZoBfJYRyY5h1vIeY2A7m5HG cZqu/Tk0f52cuY2lkEngLUkaQh6fwe6wdByX0Nq/0GHV11GAPujn4aZ1ndeTbDH2j5Wz G/s4oCXcLQFHgbq+W1MZWSlj57vw42+I6LupLYutAQGF5D8z9LA8l8RNJOHAFEzS0xnX Tl7Q== X-Gm-Message-State: AOJu0YwExOnWK/OTXOP1+DA/ZPS8aTBkIkdVCnV9F+eKVTCvh83Zth2q HnjNk013tkERQBG2ixgxi20= X-Received: by 2002:a17:906:3299:b0:9ae:659f:4d2f with SMTP id 25-20020a170906329900b009ae659f4d2fmr2095489ejw.26.1700732449059; Thu, 23 Nov 2023 01:40:49 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c23-c0f2-3200-2223-08ff-fe18-0310.c23.pool.telefonica.de. [2a01:c23:c0f2:3200:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id s9-20020a1709066c8900b009e5ce1acb01sm546199ejr.103.2023.11.23.01.40.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 01:40:48 -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, Thomas Zimmermann Subject: [PATCH v5 05/20] drivers/video/fbdev: remove I2C_CLASS_DDC support Date: Thu, 23 Nov 2023 10:40:25 +0100 Message-ID: <20231123094040.592-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231123094040.592-1-hkallweit1@gmail.com> References: <20231123094040.592-1-hkallweit1@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 01:41:58 -0800 (PST) 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. Acked-by: Helge Deller Acked-by: Thomas Zimmermann 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 */ -- 2.42.1