From patchwork Sun Nov 19 10:14: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: 13460344 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="daAI2dT0" Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A9AF115; Sun, 19 Nov 2023 02:14:55 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9f27af23443so477268366b.0; Sun, 19 Nov 2023 02:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700388894; x=1700993694; 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=daAI2dT0R2juqVd4F/qCjEv3E+28uPTQsE4lEc4JoXzusx9x7iG2gjYJ6gyrQMnEs1 mspmc35PS5o7Xy//4hjYI5Wzwwq/BpP7FgDoW8HEH6ALLyXVglpAhA7X0qFg350Wh3+K 2nK5v0hUOv3EugaK4q3MP33z5pmzTvUirrsodp2Rk/FyeR6/UMSmBsgwI50ewZ8ShOiz AN/ELoCrrJDiuEWHeLnS1D3DY4geNSjpEm5VZG2caIjKLWFOk9O1U7YO2cccBRWfw8jK yBoAMkrQLxUWuItXO+kgdKyZ+w+edWv00PdM33Tv293QyDfUmx/eVO/BKoS97ccROlVL 6t6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700388894; x=1700993694; 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=Dyw9b2vTnAwx13z/4j7Nzo+RKZTtDDD0RlUgsNaFxSvBOI9VGlhBrUCxNuAyT+Hdns FeQYJRbBxIBEp0OIzT2nPGk0s1SE8TXqur/cgXzOscng/r9ENgZK2dKbtqJF2sdH0yhE AEhkJ215Bmfpa4AbpaEmpTHV2ycXdQ0Yb/Nbjjn9m/L6G0da4p2XBdGSypqsutPVhUz2 vqstxQJB6/Rh4KvYZwMVupH0a/Ao3eYBLYIwrzsw6FR4kTaw4xO1vlwV1dciLn4KTLZb ikBc1bF58T7uebF6kC1m6uhS8UAPpcllUloOkQgbfUDa9MHHBZGeCDWzUP7s6dpdXPMm Cf2w== X-Gm-Message-State: AOJu0YzZ6WC7cq/2htS2/ysROde8GUXTrdVUggsZbzi+l9NVlctytwoG Nv1K3Z9F4BkhXhyML1lVDdpiSdVDFZN30g== X-Google-Smtp-Source: AGHT+IFSg9U5qIMb4AcJbjF+T77S5CydHJz/amx7poWoeUOMU+9+UHjyyGXBcelTE4xsBAI3I9B5Tg== X-Received: by 2002:a17:906:2253:b0:9b9:4509:d575 with SMTP id 19-20020a170906225300b009b94509d575mr3597295ejr.2.1700388893905; Sun, 19 Nov 2023 02:14:53 -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 p20-20020a17090628d400b009928b4e3b9fsm2743581ejd.114.2023.11.19.02.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 02:14:53 -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 11:14:30 +0100 Message-ID: <20231119101445.4737-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119101445.4737-1-hkallweit1@gmail.com> References: <20231119101445.4737-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 10:14:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460345 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QTY637og" Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AFF1E5; Sun, 19 Nov 2023 02:14:56 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-99bdeae1d0aso471890566b.1; Sun, 19 Nov 2023 02:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700388895; x=1700993695; 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=QTY637ogyl6fV3J6sSZXCo4WD1WykxFeUdP6G5TOM/Rn2hq1UW7jXOzdS+U4hBmcwL 0+3MNQIB+dxqzEzlOmqzUsx7RrL5rpnjK4e38Qn9fjx2UhLjtoU+I638R6l+SMsy3PRM ET+TADO0g1uUhnbZkQzugz5L+OdS/tPRwNsVKGMikO8edjAbeuz1u9JMNj0QNawSZI71 XQ16sUxqu6qQKneyg4eGVwFv4GGF+pHKMN+Z/KAxzjtpEMEGZ1+LhWO7691XZBYNi7aA g+LCzaUJntQztPJXdYad8vrAJXIwT4KuvjJ8ZSbNog8OL1wXcCdSWIePDAGnP08rnUht FcTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700388895; x=1700993695; 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=WEx9BTLzg9JhOhH/Y7tdSKD9vFL5vrPFln++GepAenzCQyIXx3xPq8GmiL54HTyHr7 jHUL0FNh3tN+2YMznvmFGmWfAHiYcB94eVxOo5cWJpouA26Jf/Qrm59Vcws0k6YXhpM8 fJxndxNZa8B/H1/wThQo7HVqXyuBPebLMx8MLsxN9zPH5xR1AvE9QyFUPy1FlylmRxdo YFhv/CVp02vwIx9BGf8enzN6fHFpraT5IiKviO1SuNNnMH+ELaVURuzPtswSMqZtJ0NR QFP2LDfdFOB9CrEDmPIP76GRne5npG5cNpjFeBvvxnlSCbtFyxxj91tkcaKsCDqOdYba vDMA== X-Gm-Message-State: AOJu0Yw+5syKZGzp9cF04jd+ODSbW+c0BfsvLaU/dKsLxQcTc2UurwxJ 4rjTtjOrGnMoPFEL5T3lQ3lrlEmI0mmz5g== X-Google-Smtp-Source: AGHT+IGBo5TDe+9oNNSJJ/7D94Y6LpcpavrjXJu+KHrikjnvpOJEV08xR/3GbhvbP9lm9HCrbdPOJQ== X-Received: by 2002:a17:906:74c1:b0:9fa:fb8c:3904 with SMTP id z1-20020a17090674c100b009fafb8c3904mr2090466ejl.65.1700388894616; Sun, 19 Nov 2023 02:14:54 -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 p20-20020a17090628d400b009928b4e3b9fsm2743581ejd.114.2023.11.19.02.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 02:14:54 -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 11:14:31 +0100 Message-ID: <20231119101445.4737-7-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119101445.4737-1-hkallweit1@gmail.com> References: <20231119101445.4737-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 10:14: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: 13460346 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bcQ4r/p4" Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11F2E115; Sun, 19 Nov 2023 02:14:59 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53e08b60febso4889369a12.1; Sun, 19 Nov 2023 02:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700388897; x=1700993697; 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=bcQ4r/p4g5MsA2K0IEOyDXeULdNNaR0tSwjsMr9aJMeUlkLf8lGrPg/2q2GiUP2f3b 39ixI6Vlps2Tc049zI/7RTMiZiip4uI8Gj6xt6fwDgqqaB09mw9IhPfXcJ/tGR+vkQiw b8H9nL4zCBZVwTvn9BISahT0kj/woVw/U5koP8+EHAa3hnh+Z0f37nNxSzy2RTPZbyBf GuxaU2Xp8LajvnMzPSmTV2DCmzGkOWA3OIAtY+NywCEm9Em/Zrj6QOLRw5zncoeUF4q0 xDjwj+6o4SNiBcCSDB/2yECqOZ1WOvjPB5y0R/qB1l3QH5qOA8Uf8XtKCC6syt1vezjb pKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700388897; x=1700993697; 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=DROcdVrpHy5rAegiCd3MoiP/6GtD6q/HYtCubi3HA8pNtZXuFI6D3PaxKVcDPqwqXJ l9R3ZLzrVxNOghmiTuyWUdW4Z+rsEHmfeLXt3umSaByPWNYQQD9mjgjgX8Y94uV+0fCS 809p80N5fkiJxgmBRo7DTBsnQqgZyA8M3XWlHynvqsRQcPGtEdTWzpH59ZBU3veT227e Na3fkTSS4+MfAV2srueZRmBASfPq6dMApITB5rLfjAqT1bBhqKTBkQbdKWL+ZXSnQjHS tXJrs2khHwhx2qUq0dmKiDpqhjzkesCHeeQgEHQubCXTb7o/TXP7yPstC5Vk+MIwNNWk HAGw== X-Gm-Message-State: AOJu0YyKi4h07TJq+kqS6huOyxAfLreh7b8gxN0gN2fgGl70v4POlp0f W9Tn0nTaxlIQZPr8pb0aJ04= X-Google-Smtp-Source: AGHT+IFOvnTj9XaGTXmf0kg4u9vN5bhBNAlFozIlZLALi3K4N5pNEJsRCsiqKinvY6T58jw2eiJA3Q== X-Received: by 2002:a17:906:1051:b0:9ef:c408:a4fd with SMTP id j17-20020a170906105100b009efc408a4fdmr3609738ejj.14.1700388897489; Sun, 19 Nov 2023 02:14:57 -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 p20-20020a17090628d400b009928b4e3b9fsm2743581ejd.114.2023.11.19.02.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 02:14:56 -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 11:14:34 +0100 Message-ID: <20231119101445.4737-10-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119101445.4737-1-hkallweit1@gmail.com> References: <20231119101445.4737-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 10:14:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460347 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cE24lUkj" Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBDAD131; Sun, 19 Nov 2023 02:14:59 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9df8d0c2505so651396966b.0; Sun, 19 Nov 2023 02:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700388898; x=1700993698; 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=cE24lUkjrZrQug+CP3fzzrv1W1qbT4EDwGiPIdFZ/btF2SYJElBUcc9cRxJJL9Ywqy Sm00zWW1xo4vxW2zEUGtNo3M1jZsIYvtp9qaDz9JxLl0GtWwJ6/6TOVRx3FieAxTbakF 8YSpWcoGzxcVm2++rgsF0YIgHEn9HGuFMvbxpxL/8VZLOaW53om9+eKzN6TpAu/xdToD 08kAd55SfGoTZ1o1zRuSAIOfZWJsH2ckkI/zRdE7jen10mFLA57KVdywRaTUnZqCDFo1 fB8+FK5sz4rr5ehskSiHugd85ZPkgDghyHDx3+lB5JgGYmpOiUy8IcNVgrUECxNPif32 cHhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700388898; x=1700993698; 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=fv76gQchHJ7K+SNNCQ0uJOLD5nmB3amwDpbIPT9BhtLeQV9MGXHWF9HV8uqM4pzwkv 5rseLJxxUGGtlcZ6jxpmGILfsnMynAap1O2XA6wkJwPnMyjXV/VXIjzRINeTeEn0D0Xb Fr8PoHFXjSCFFiU8dnCX+lOY56k2c/EBpapa8F1N827aQ1JU3oPdOsnQwHwqLK+/l0rx 6Aw31OK2G+bAv/VDtbh+hKU2ZGFa6dM6ZE0lf4l8XNAYKA1hnHg/UnnJnC46Gl3f7yFA CVOv21o2qJflgguWMGF7lHt+PFXqu7kzD+k6gEXklZFde/JZfuayjb3OeEzUpZrK3pwJ TjVw== X-Gm-Message-State: AOJu0Ywc3iyrIl/b9yPRxAlxvN7CQUpnVIGqbLc+Xu5jNlnSgwITONgx wAoRt2hbX/7Kx/J7TMSTpUI= X-Google-Smtp-Source: AGHT+IHFle1RXfTk6vKi5iOy+vzFpLJkczRWQhYONzqvKagrUs3pBjmQadRi0jtysCiaCW9sqta1Qg== X-Received: by 2002:a17:906:c111:b0:9ee:9d98:7d8c with SMTP id do17-20020a170906c11100b009ee9d987d8cmr11093291ejc.6.1700388898244; Sun, 19 Nov 2023 02:14:58 -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 p20-20020a17090628d400b009928b4e3b9fsm2743581ejd.114.2023.11.19.02.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 02:14:57 -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 11:14:35 +0100 Message-ID: <20231119101445.4737-11-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119101445.4737-1-hkallweit1@gmail.com> References: <20231119101445.4737-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 10:14:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13460348 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l7yw72Wv" Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECCA8131; Sun, 19 Nov 2023 02:15:02 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-54864b675b2so1815574a12.2; Sun, 19 Nov 2023 02:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700388901; x=1700993701; 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=l7yw72WvxpTaJnhCRDzM7XM0Rd/DulBEJF1fJEeYjA+tKkOhEx1c2zIw+yjWFilxSQ QywwcdHxmlEM2MhUj8h3fB06374mmVYRg0tFeLrHiSmz7nA/o03YriB6S8qfHEtxoqjO 3dF+oxjGjGCE8+9i/2YLrsaoD6BbeEefKrcB9PE+I9lDwklQMA9dE8nqtqRCKnWK7o45 nZ14g+8hcwCg6dSiBRGV3yXfWyBHAYkUvd94JQ56dhA1Jx92nUg9onEkwW/VBy9RZ71X 0lUjSRmjiahvIdjdWcIn9Ep+k9XbAL4xJZYTzM9V1Nr+gDlHwjEPBEEKw/RnR5zcyati /AJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700388901; x=1700993701; 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=dAw2PF4o/1GXr9zl8evtsENtsfBmqZyjNCFV9dyns4K9v79MOmGnti5gnhM2fZQAaM 0KpagnuepyAYi6sxcuL5uAvcDklEBZv6dgKCZxzBJ0I67SiXJwuSSYxf+6lwPb34oRxR WGkGb0Ry71durN8Hgne6FleFMbmA8TJiuzQWSaSEWizvJrvG10GbXi9L9hc3aGK203+b 2uzI6MdqEtS7eZl8FqzqylF/k923jFz5+GObdX8vV426+Bmd+CpZJHisqIjS8auhuIaq Q7Cxtqkb6GKDuUYrQ0HaGZmxOX6YAVhSB8JOL5SQ+BbsTeaKKm8lis5chB2CeUpS7OqF 86rA== X-Gm-Message-State: AOJu0YxpHTn0d0zRJN06tq6EvOO0uJPe3s1cIBPcPcXPSOts4ApHwI59 /sAEyWfgWoxPWUCk25YraTA= X-Google-Smtp-Source: AGHT+IEUMMC5ITmLhQ++xTxsq0EC3YjolDxqXOJe5kffmWkOeFgA/YeGu7mWuST9nb8zkP/u6wQ1cA== X-Received: by 2002:a17:907:d510:b0:9e2:af56:c375 with SMTP id wb16-20020a170907d51000b009e2af56c375mr4580366ejc.52.1700388901208; Sun, 19 Nov 2023 02:15:01 -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 p20-20020a17090628d400b009928b4e3b9fsm2743581ejd.114.2023.11.19.02.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 02:15:00 -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 11:14:38 +0100 Message-ID: <20231119101445.4737-14-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231119101445.4737-1-hkallweit1@gmail.com> References: <20231119101445.4737-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++;