Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1282884rdb; Sat, 18 Nov 2023 09:43:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHoUXA3ultEdTtbreoT69XRpPSEk06/pwh0vx7bUaf9cxo64lFVbzm4Bm3CrOztLeEHXJK X-Received: by 2002:a17:902:b906:b0:1cf:58dc:9c83 with SMTP id bf6-20020a170902b90600b001cf58dc9c83mr266645plb.31.1700329409534; Sat, 18 Nov 2023 09:43:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700329409; cv=none; d=google.com; s=arc-20160816; b=Lu8tSPLjlK7w0mvSwKAaBd6Gbf2DgAfmlc7C0yEG9HYALB+rAvDxNxfmSBqi4Txv0W NWMrLBbiKFtU1GNjncjJcYCom4jg4HAU84OyOjYR8Ust2HYpjajthInSIw+AGU2pJAP2 T6Z4P3ijZnEKT0yRW07/q+tPrDcz/1vX/Cs9bcAsbZS3szOqGICUr9yQ/tjL/GdgPTyK E47e7OePr6UM/a9WL5mv44n7kHjm47WmVHovxJ9nBqWlGR8V8syrgd1nSByqMZyafOYK 5sNwwQWO8KKqYYf79+pwEl04Jp58O3MWeGX+yH333e9dtGUorQafQirB08PxAL2bOQ0f bGgQ== 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=4ibVEHgtEJ5eQu45MMiPygdDJxNCKoN0M/oBQUtm4Q4=; fh=KgpNZ16GjTgoW3DartFy1bLtSh8DxXm24r2CmfmXlZk=; b=tOkgnkZ32OsCoOz9PJyVfE2w3vk4PgAFlZH+6schzU3Axbzp6MdRGi06PdDA1k5LIa yVW3TWs/cHv9fFtgRF8OYt5Zq7Dcq/fWWvuU6AIoHCwdP5r9f4WrR0Xt9UITgc8SBGNm X7vIN6kxSZkPrtcGUwV8/8rM5bVKB1SP82RvDzlZBDNoVburzafBDIaD1Efap4FKFBzS YyVSK4EstE+QVnbxLOSnIkH8h6z8toyYD0vu7689iFh/xxMEEdrJ5FYxx6fosnjerpoa cNy0OxuhX4CS6XHd1AuW0xKYhUE1LgfajbbATd9iIGhr1JXUA6dprUKNxrS3bpXT4prU mQnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BZhIdi2i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id lv13-20020a1709032a8d00b001c7388413besi5001130plb.529.2023.11.18.09.43.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 09:43:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BZhIdi2i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 721CC8051A2A; Sat, 18 Nov 2023 09:43:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbjKRRmq (ORCPT + 99 others); Sat, 18 Nov 2023 12:42:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjKRRmg (ORCPT ); Sat, 18 Nov 2023 12:42:36 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C01DC131; Sat, 18 Nov 2023 09:42:32 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40853c639abso4728455e9.0; Sat, 18 Nov 2023 09:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700329351; x=1700934151; 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=4ibVEHgtEJ5eQu45MMiPygdDJxNCKoN0M/oBQUtm4Q4=; b=BZhIdi2iTZk95IuPPyj80cxyta88+5u6oPD8X2WtkaQgM3FAv3I3t0KaDijvQ5QCRR YgavJelCXjfcEg8VQHP05tXXqwNbrZ8uMQPqcV1cEEcjaJwCEi8AaLU7ir9n0El78vN6 Z4FdfABzp6UDv6uZSMDjRBrAnDwp2Y0ScN+GW9MgFltlhYYf06oWgFOcyotvnUjLXvHn LbsDT2JVhHiyNX7YqkZSu/+aRR/D+wz7utNGqtWxQbRIEAfG71tSmJhSg59dogB9prvM kHIEC0TOUCdXcJEybjeSZA6a3msLmxIcPDoHDgwSRheyJrxK/uAUEDwLgSmP972inkJJ 6v5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700329351; x=1700934151; 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=4ibVEHgtEJ5eQu45MMiPygdDJxNCKoN0M/oBQUtm4Q4=; b=SLo+jDWjPVIb4a0A4rGpHiCDI1si9dff9QbQSHdTqKE5NpLFodVd9yCqiLIqG9L/vb 5z2sDQ0DYIcTTndfkYsjAN1hklGgDGaAOBaX+reR8QQBKdd+MhCw7QqXjNbRHjhrc5dJ VI5fBOlzEGgS6g1znTDbTlhBeHtn5EIt0V2hAewAoe6loEsUwzTCM4XnOQVz7vOmPFJI Xkx0JzU9yzEf0lbp6mxhWm6zN85iNikx8K/NQ6lP83ewXguMj9zCFlZ+h3pBwlw0fWWJ E4SwczwFL1s77mTCOGUp25/B7DZtF8qDuEk42ME0OXi1qQAXaKkqqcrkuBYjaC5leJRx 7xkQ== X-Gm-Message-State: AOJu0YxzN6Un0oUq3TtpdiYvw3AlgFi3SvK9xIp12daonB9Y07yrYNQ+ kKBUa6FJvsNlVtKwJTKRMUM= X-Received: by 2002:a05:600c:4e92:b0:401:38dc:8916 with SMTP id f18-20020a05600c4e9200b0040138dc8916mr2681496wmq.10.1700329350876; Sat, 18 Nov 2023 09:42:30 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-77bf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:77bf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c340a00b004068de50c64sm6964211wmp.46.2023.11.18.09.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 09:42:30 -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 v2 05/20] drivers/video/fbdev: remove I2C_CLASS_DDC support Date: Sat, 18 Nov 2023 18:42:05 +0100 Message-ID: <20231118174221.851-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231118174221.851-1-hkallweit1@gmail.com> References: <20231118174221.851-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sat, 18 Nov 2023 09:43:19 -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. Signed-off-by: Heiner Kallweit --- drivers/video/fbdev/i740fb.c | 1 - drivers/video/fbdev/matrox/i2c-matroxfb.c | 12 ++++-------- drivers/video/fbdev/s3fb.c | 1 - drivers/video/fbdev/tdfxfb.c | 1 - drivers/video/fbdev/tridentfb.c | 1 - 5 files changed, 4 insertions(+), 12 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..fa07e1e5c 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,20 +158,18 @@ 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) 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 */