From patchwork Mon Nov 13 11:23:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 743608 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 ACA9F1CF88; Mon, 13 Nov 2023 11:24:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qnzppg/O" Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C33DD58; Mon, 13 Nov 2023 03:24:07 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4083f613275so35514495e9.2; Mon, 13 Nov 2023 03:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699874645; x=1700479445; 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=Qnzppg/OYbqEGRW/GtPZVhaKQpQMx2An4Yxyf2Park1jV/oLJ9rWppWbs4mM5t32HD jZtHNXY19W1zM+keGI3gZ2pubjI54AhzLVMipuKYTXaQITMU2en4DvWE0p40wyNIzcyv vCfutGG1wsUXa0OZNTSzZL4Jk3CFqUVR1AGNWpcr9HET7JZvft48zTH6R+xiGgRR967l iHUSwYpUT2lC7Y8WNrvrp0ZEzEFxgQ8QrZm1Y9eaYqfglBx/rJbBYg1wNIrFWnFZcouB zzgtv1GKMphBYS42zruIsZDZSUce/cq3xRCjZ+H41b4eqXJgSZKqLAho9Wzxw66B/fcd 1TuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699874645; x=1700479445; 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=INoEthd1dJt7lceGLfVMfQV7rZ0vvtfwzuLd9cdeAXBe4jw+TaN2arpUNNDSic9tJw 3mArkd8Kk5EFYBUxGEl02t++Zf4aBVd7lJgKNN89iqCQvGptSFQBlt16NQZHhHI3Wb26 4VbEMSV7nJH9mSbGd4BM8jtEAL9rGEF/4L/VLk8rs81KWAvRhtzH4SSs6PCAUBvDCtGS ECZC5OeEVnQ8d0RkU68HltpsNQAoGWw2oPS/ei7LxKtL0QKwIau8qrMXZ6TcuPR+48EP Y7OpOGExZWxImmHz26Czj6ng3bNuO4d+UzhFRlKXjV7bbY622kKCdWVoASYZcaE3A6+I pkVw== X-Gm-Message-State: AOJu0YzhSdXsm4BHXSwZ9u9Ad4yZrqYTgFnlFMzptyDDIGsu8KSYxFqo LlF0a4rtiWCmXqC8llKIwbEhX9NDC4w= X-Google-Smtp-Source: AGHT+IFwoPnKRqNYZ50VTFF9dpExU5UAtXF1Gn/qxxZ3ZoO0LlwSRlRkjGu84hHJe+NLBkdc3zHFzA== X-Received: by 2002:a05:600c:3595:b0:406:849f:f3cd with SMTP id p21-20020a05600c359500b00406849ff3cdmr5399554wmq.29.1699874645374; Mon, 13 Nov 2023 03:24:05 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-6e16-fe00-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:6e16:fe00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c4f1300b0040772138bb7sm13565787wmq.2.2023.11.13.03.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 03:24:05 -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 05/20] drivers/video/fbdev: remove I2C_CLASS_DDC support Date: Mon, 13 Nov 2023 12:23:29 +0100 Message-ID: <20231113112344.719-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113112344.719-1-hkallweit1@gmail.com> References: <20231113112344.719-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/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 */ From patchwork Mon Nov 13 11:23:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 744253 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 68B601CAA9; Mon, 13 Nov 2023 11:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CAqnNSxd" Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A47CD66; Mon, 13 Nov 2023 03:24:08 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-407c3adef8eso37313565e9.2; Mon, 13 Nov 2023 03:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699874646; x=1700479446; 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=CAqnNSxdBdnLnhckMEA3rB5VY2m0qAyQ5xVovcXYG/3mU60K4Rufs4LgDvgvfrIuLO 59Cc25qcugmwK468tHm1Ga+24IYZBiIwtosBmncmhh53qNhY3sX2ga5TkUTFQvKwi5tC ocUsr9kOUqq8SY5s7dwogPKT3v7S/kLULu+pS2qX+a7NaOmKCySZYHd5AkT8/x4O4X+C G3Bcm4BYBOufG/YtbIX2xaQKdqZTdTKaAI+2rFrp3vQbpCP9BNRiCqKebqch/1D2Kdsf FI9AX6gWJ2qswnrJx1+QhTCQ+Rgid6miSNk34xemIMCH8ydLvPPecYURxMknWQyWCEjG KNEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699874646; x=1700479446; 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=gwnyNU89pEX3GDp/fJakdyJSfXChXfNecfWrqzf/37yqyRg/YSWl8t7k7sNO0X3La9 YseB9u8nfIDmaNgBHFlCP6tdxDx/OcvoOx2QewVXqoK2Ncw+tFcwoCYUPTdo81UMR8I+ 94Xtt21MSZq8z5xcTS2XBiAf1VgfA0NFhtv4o5szU1x07GgcUDR+TlLgsrWUqomtQy2C jFrsH3udRAc7sE1XOF0kI+PbStEK01Ivmrpk0ZPahQ96WGf8/7HJYZnogoOaLaLLhSVJ UZAtV1YUrKvyfQ4YJGxVTrdqQQt/JYJISZj7JASoZod4Lv070xyLuWPgHDzw2knY92Uy mBOA== X-Gm-Message-State: AOJu0YzSmjKS+4lxVbDrQ4oVQlBAlCXDTa6JD2gBxak9CAlhHDfF1u8G LpRrdKQ7kVF491UmgYfOB/8= X-Google-Smtp-Source: AGHT+IGL3EktaBJFjj+0Glil7T8bNSbTgzf/Pqk4mNBNsYEc7WZFPHt2hi+DW9OAvH9O20i3TarP6A== X-Received: by 2002:a05:600c:1910:b0:40a:3e41:7df1 with SMTP id j16-20020a05600c191000b0040a3e417df1mr5289314wmq.37.1699874646477; Mon, 13 Nov 2023 03:24:06 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-6e16-fe00-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:6e16:fe00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c4f1300b0040772138bb7sm13565787wmq.2.2023.11.13.03.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 03:24:05 -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 06/20] drivers/video/fbdev/core/fb_ddc.c: remove I2C_CLASS_DDC support Date: Mon, 13 Nov 2023 12:23:30 +0100 Message-ID: <20231113112344.719-7-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113112344.719-1-hkallweit1@gmail.com> References: <20231113112344.719-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 Mon Nov 13 11:23:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 743607 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 6941A1CAA9; Mon, 13 Nov 2023 11:24:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ipzaTwod" Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0564ED66; Mon, 13 Nov 2023 03:24:11 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4084b0223ccso33255075e9.2; Mon, 13 Nov 2023 03:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699874649; x=1700479449; 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=ipzaTwod3GdrFmrSA/AU29Avlo5JKerlODNEjy3PN9D8oGpmr0nLbslPo/AUr/okcO SQ+KIYPxH6wKoZspnJGlDpOQdDI/HnmrsMqarOM/K/5Sy06PFp9z+Zr9HeqR5zLWUEN/ 3GPZVig61tHHGFUg8otoHuMTM6+mYBWTCf+NMCgA0NTysMYoO55Y7tWHgZvJxmuv4a29 wWQGuMI/vzexspXgjE2D6RGktU66ZZLSaL8d4h+qGlQ+RB+4KMcPzoxP0PSgDObPEDEl HwLLaOTiaQhLRYxRvxZxckqHBQsBGRpFVcoMG4s9ykUSoJvKEFgtj7R+FqxcvSQa4OpX wi/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699874649; x=1700479449; 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=OGLza3mqn7fZ8QbK0z7ImQqXkt6q2qCeCfA992DgQ9K8w7aQhH7pkUaXTogEmE+utQ F+XN7HzHT0ccApkLThmUlgf0sTQ363MgpdKeneWnTIVqNm6TH8kuMMmFJfckkh+etjTm Fi6lGcngi8Qcf+u9acg/kYuQCwGA3SNfDXxkVCqLmX52V4vMdi6TQlkrO0uzmiwFo4ki sB2YC4HIP9lN9M6wVzMI7W0cbNEvB9EliX+8euMWAWbF8wyON7Q4HBOxEAxRdGaBW1K5 Ln1XiUzcZN/C4Inq5jXZKBO87yv3jtJHMO2fH5333Nw0GCL+qLY6E7I7HfqSkneIXjfX OYlQ== X-Gm-Message-State: AOJu0YwDhPmmH5o4PNP6VcwJwQXcFdC+zQeXfapjMZuTurTGGpjk9gbE QuxH6bp8wib+OteuMwXYq1c= X-Google-Smtp-Source: AGHT+IFWxagdYbQ04Cy1zXQ8J3RXxuSkeTrcraaBkbbYjfhgHWD8ZbRjLDfDALyWkgIWGKQzSnNbyA== X-Received: by 2002:a05:600c:4f0e:b0:406:5359:769f with SMTP id l14-20020a05600c4f0e00b004065359769fmr5703626wmq.0.1699874649154; Mon, 13 Nov 2023 03:24:09 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-6e16-fe00-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:6e16:fe00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c4f1300b0040772138bb7sm13565787wmq.2.2023.11.13.03.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 03:24:08 -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 09/20] drivers/video/fbdev/via/via_i2c.c: remove I2C_CLASS_DDC support Date: Mon, 13 Nov 2023 12:23:33 +0100 Message-ID: <20231113112344.719-10-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113112344.719-1-hkallweit1@gmail.com> References: <20231113112344.719-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 Mon Nov 13 11:23:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 744252 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 6EC471CF88; Mon, 13 Nov 2023 11:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aUSLXbxp" Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0C6FD6D; Mon, 13 Nov 2023 03:24:11 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4084b0223ccso33255165e9.2; Mon, 13 Nov 2023 03:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699874650; x=1700479450; 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=aUSLXbxpet9c4fkSx6LQpXKzDXPHhv4HR5C9HuJJNENqLZRFlcT/u2qNePNrS96zrT oncHAPfCZtKmdsdD4dMYYxlj4eOfZ/LAXhK5dCxesmmhHAC/lr1iedqhkC+t7v0BVydn 5RxwpTQLOMCxvgdju05nhDNR+6wdAqsjruyknbycVVX43HQuvi4JKCGD4QTZ7Dq66s7g +llrrW6yvZYriHouJQ96y3yxzUOGDi9pv1X5Nq9FJWdYc/lgmDVO/1W1MVAK9KA2wAJw FZdiMfVLxYft6N5iQ2wfTYUgti6aUbnS6Rw0p8UazlS2k2R2cUrgHXg7QBMbzcJsrIaN JXQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699874650; x=1700479450; 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=r/6xSsSwr1IHSJb8YhA+9YIlT3cCLO3uRrwFhG0HCer1ZcEcCi6JSDRme/Vf4Zm/r+ SKql18J0uX5uvfdLfaeO+aX/VcTIWSm2zRiFFzEKIm0VuOA1Fx9eZj4jC0O0Nr2KGML1 VlMSS/qPtbwN8idOxv19hCHl+wiavBrRO3q0MetKKkWcipP7PU6if0FWYnst7koss6tB RYJO51l1h3RZSI3ipbx3Znfzg2G8cA5OfwuLDSfu8u4hhsTxYSnXVPj4dRoLFDbYjpQc m2LG6H+WdRHUno9wZbfusLCPNzg70jLag4VNAFZbaea8ndltUHKTHcpEZMspCP7hHAfk Ez1Q== X-Gm-Message-State: AOJu0Yyy/NnmXRhqkF7H8feT7qGGk/BbP3y1Qm0I+wWVb4agwjCRd3jZ ER7SshGrAVM2h75btqmmMNk= X-Google-Smtp-Source: AGHT+IFLTl+fAOmA9wfAnqq5QL35Y8l0EQWxEuKGeK/UmNhJYPQBWfJpPA26uHWh9GGQv+cTL2zTow== X-Received: by 2002:a05:600c:348f:b0:406:411f:742e with SMTP id a15-20020a05600c348f00b00406411f742emr5433441wmq.34.1699874649928; Mon, 13 Nov 2023 03:24:09 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-6e16-fe00-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:6e16:fe00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c4f1300b0040772138bb7sm13565787wmq.2.2023.11.13.03.24.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 03:24:09 -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 10/20] drivers/video/fbdev/cyber2000fb.c: remove I2C_CLASS_DDC support Date: Mon, 13 Nov 2023 12:23:34 +0100 Message-ID: <20231113112344.719-11-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113112344.719-1-hkallweit1@gmail.com> References: <20231113112344.719-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 Mon Nov 13 11:23:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 743606 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 19DE91CF88; Mon, 13 Nov 2023 11:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UdqEQ4FE" Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BEB6D62; Mon, 13 Nov 2023 03:24:15 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40839652b97so33681485e9.3; Mon, 13 Nov 2023 03:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699874653; x=1700479453; 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=UdqEQ4FEUnSKCX7MsCz8sF2YqQDh/MHR8mYLUP262slvDrMhq3BjqMKQhkiGkqoW9v 6hMmtTtt1vDdgPWwkWGsbjhkWhW0zR/XT3glU19qGOfxd/yjmxpxL9EA74nvHuWLF3U5 O8dIeIRt2BSb8LQhTb196XqkUetdeoO/Ei+x8vfncx2aNkB0BcQErr6tzsmntBh9+sye 2BNbMmHpkrhbP/LIjq7KHqBgq3M4lDC6gCCpwxYcJDwrhOo3+oxJFqI3dqni8VGOoJE4 +PjlhrCHr/g4WwFkfAv6spMp/Q7TDkwCuc7qK9D0qewXe+wzRbfL+Zz5TQ6PDx+f2Gin pPew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699874653; x=1700479453; 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=ILjY7GbR3Cujdhsas31Ow+ugwhzyc0EJp8jF1chh6LYrP9cjWfu3Y+cCEIvGU9drHP ZOweasxpG6tfkSQb1rKAkVefrmRZ2Zo7M2CXu1aQpGmOoYp2pN5e6dLmFkkzjRHkOpr6 hWB9f46+NnOigNShFu1X2acY+IZ985EyKR7TBnnR6kTtVO12AWz44jhhbxwUnwOSV3E0 hoV9HDC6DRY1JZHQsCr8TNKpQdtsb6ki1L/pVJj0BO2wfV00UE8XvnBANURNpxtOX4R9 KLsaUH8XzeOOxBRQfNuiENq4uIiaxsf0Jw1CS8IDYJebU6CA/J7CVaO3VrAnJwRSAG/v P8UA== X-Gm-Message-State: AOJu0YxNpEOWMWbmVokRsdsb//Hq9MqxSLDtnm5rwXxH+I+0E9kkhoqx G0h0wWvZ+lfnYO5zcosHPis= X-Google-Smtp-Source: AGHT+IHy+wgfr5xLKsgYxJHWa4lnkaxfLqJyegu6hthXuvkFsozVMyaPKqUw4LKtY+yJp0F7WGOiug== X-Received: by 2002:a05:600c:35c9:b0:409:2c35:7b3e with SMTP id r9-20020a05600c35c900b004092c357b3emr5232809wmq.8.1699874652877; Mon, 13 Nov 2023 03:24:12 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-6e16-fe00-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:6e16:fe00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c4f1300b0040772138bb7sm13565787wmq.2.2023.11.13.03.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 03:24:12 -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 13/20] drivers/video/fbdev/intelfb/intelfb_i2c.c: remove I2C_CLASS_DDC support Date: Mon, 13 Nov 2023 12:23:37 +0100 Message-ID: <20231113112344.719-14-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113112344.719-1-hkallweit1@gmail.com> References: <20231113112344.719-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++;