From patchwork Mon Nov 20 21:46:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 745467 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mB9Ncvxs" Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 138F4A4; Mon, 20 Nov 2023 13:46:34 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32f7c44f6a7so3253122f8f.1; Mon, 20 Nov 2023 13:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700516792; x=1701121592; 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=3q7Wv0ykBXfyqStd9azoeaEamTJsEK38bA0+KKsVDzQ=; b=mB9NcvxsWOaeym9+DWswPk3IGfoUbFwWqMRvehhpsff/V3z6mpzRqax7QCZcc0edxS KB3YVd0yje01GLNSZ55W1Jbj18JsWggVRa0T0qPih433mTRqd1kx6DT1ZonZ5l0ISf7S W+j4Nig2ipqDHg52X9nU7BvnyL7x9wqZCGi1ETEFVOh2ht/6RtW71zLqLhu92/4+2wGK Qn7N88ieUry1BJdvhf9Wk937pdj2RUIamLqGAREssVakJcM8Lb8cMhB0JYHmbtbbVmI7 EWsYnY4eM4J2o2v+PetKxOf4k23gSKxvXz9+RkuZicMTwKwzJN77KlmR25FGPR39an1E eSkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700516792; x=1701121592; 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=3q7Wv0ykBXfyqStd9azoeaEamTJsEK38bA0+KKsVDzQ=; b=XcVSU1gnF955KJ3s3L6glurvcp2I3Yh3RdWGTXNbio4ID+L+GF3eQA/bDQeTKyWR1o QOQ1Z6f4/X2TxRJOEyaF/hYpAE4VHw+x7mhA07NYc7vsi+Wh1xpPa0/WVXlhHN8OTdAW hwkSy/Zl4KZSpnvp37F4zB3c6OPPUuTVn/c1UBqA/1U51HD0SxijLH4OBphm19SohM2g OXLE2vgFwJLk+R8uD9N3pZzz0/vm0kcGE87YPRBZ6nO5m7YScB0upnWFm7g0tRw1tyYJ 2RtM/s6NYZ0TJpTpMhbJPAnDU4kow2j9c9IP8L06hjdB4RG12qYysNcbm4SS0ek4Rb6y 0U/Q== X-Gm-Message-State: AOJu0Yw68w7QM9zr7SQbXq/1HpKeafVm/5hd+cw+aQkhhhdIK/AqYp4G vd9GHfU0By037a+CMbDExdU= X-Google-Smtp-Source: AGHT+IE22PcDp7LHr0bveTlzIwiDDweuP3YXTMT1Ylh4ts3pme+8jKLYvs372KUXsQfXq+9sxxC5eQ== X-Received: by 2002:a05:6000:1543:b0:32f:869e:b24b with SMTP id 3-20020a056000154300b0032f869eb24bmr6908763wry.14.1700516792331; Mon, 20 Nov 2023 13:46:32 -0800 (PST) Received: from zotac.lan. (dynamic-2a02-3100-9030-5a00-2223-08ff-fe18-0310.310.pool.telefonica.de. [2a02:3100:9030:5a00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id i13-20020a5d584d000000b00332cb0937f4sm2667052wrf.33.2023.11.20.13.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:46:31 -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 v4 05/20] drivers/video/fbdev: remove I2C_CLASS_DDC support Date: Mon, 20 Nov 2023 22:46:08 +0100 Message-ID: <20231120214624.9378-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231120214624.9378-1-hkallweit1@gmail.com> References: <20231120214624.9378-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. Acked-by: Helge Deller 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 Mon Nov 20 21:46:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 745889 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Wr76iPPJ" 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 60CFBD2; Mon, 20 Nov 2023 13:46:35 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40853c639abso20505525e9.0; Mon, 20 Nov 2023 13:46:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700516794; x=1701121594; 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=3Upu++zhA/RZdGnIiB8rFAnP6PssgAuOHlFea851Ots=; b=Wr76iPPJvPkqYjXWWz+EdxnnYzrl+7P+deOzHmv84Bm6378KjxTzxfEQA58+Uin/CF wbXR/mz0ypgb228ITgiFW8GNhXEh0JkTbGiah4knv3xoJM2qN4ElnvZ7tiFMobtOHHbT b6CblcTnNIQxgc87cnmIjHPmjGUpmCuWVh385rPC4bI2Ub4zJ1BCBuVVM6eTXJlkpEFr KblsTg54TgbkEupDqivRZdxLVYngs3QNvWk6OtZknh9blXNAQhReEsct38GwPqhgedwK sd/T6T2o4u2p+bM0QShmUedoAbe1SEHlwsNQ9seyR6S5vxB7u8Ad9QKPzKkO4SdNfR5L waBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700516794; x=1701121594; 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=3Upu++zhA/RZdGnIiB8rFAnP6PssgAuOHlFea851Ots=; b=pMvafx18lrRcb7fK01TVzhW2d3hdhkTaQEkvSu/eOXYHVdwFbSHoFmCmB3tPDSEhO4 KUaP1f39j6HjaT6Uz+KyQVeSIgKWJsl0kOq50QWBqk7IIXITh+stACkivBIIV3+kjLB7 NVZdmYkJgV5/L4XajZaU0T4cWCudH4PTSXLHQLdbgNR++pgEteNu4fLV6XQLbYy/CKN0 YfT8RP/ZuOxi5Uou9/RM5iwewFFFNvhCyGwH5MFGzuC9XrdW7ggt3zlEFbom2qYxHFwG U6DFnqcEMTljA33DBK+LrJu6GKN3v7CYCQcuaDwLBjnN/3d5WMkjdraGkc1yIiqg9nKq BFGg== X-Gm-Message-State: AOJu0Ywz896XReg+7AQiLc0UuCSahqT2QnOMWkEDWrG78Ciqo/njRLUy 1s01locehrqilv2EEtOd7bU= X-Google-Smtp-Source: AGHT+IGShYbCS8GN/5rAfdvOMeC0Rmm3E5GPr3cI5QbDT98zWYVN+PfkHaKPIKb7avI0dpivwWZpug== X-Received: by 2002:a05:600c:4f81:b0:405:39c1:a98b with SMTP id n1-20020a05600c4f8100b0040539c1a98bmr7120058wmq.20.1700516793380; Mon, 20 Nov 2023 13:46:33 -0800 (PST) Received: from zotac.lan. (dynamic-2a02-3100-9030-5a00-2223-08ff-fe18-0310.310.pool.telefonica.de. [2a02:3100:9030:5a00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id i13-20020a5d584d000000b00332cb0937f4sm2667052wrf.33.2023.11.20.13.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:46:32 -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 v4 06/20] drivers/video/fbdev/core/fb_ddc.c: remove I2C_CLASS_DDC support Date: Mon, 20 Nov 2023 22:46:09 +0100 Message-ID: <20231120214624.9378-7-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231120214624.9378-1-hkallweit1@gmail.com> References: <20231120214624.9378-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. Acked-by: Helge Deller 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 20 21:46:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 745466 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HNkrgF2I" Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3188A4; Mon, 20 Nov 2023 13:46:37 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40839652b97so18363605e9.3; Mon, 20 Nov 2023 13:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700516796; x=1701121596; 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=Bq7nwej1uXJ8BJR7pdDi87hSI0E9HenTuebLuXr0HrY=; b=HNkrgF2IFppu1basFaX0egxxy4+lcRL2RLcuxEGSyeHMQq+F5s0Oo5vesx5ItPg0iI G5OjAFtGIgm+2Gauqt5l2AAHIJhxoNUFxRDZZcpLOieN1kQzj2194yJihDs0VZaalGXe iTshEtZTm3N0/cUpGhiNcF4gpg2yW5aOYJHlFHcyF6KFwO3u81aceXn7IVqTEmYsuJPV B+oqlni8bnQL8dabOKFPvXdYcH77l8n2P6KNm1rFK++tWNDxfO+be8XXnHeF3qyamDTo PqRz9+WUoGN4lYi/ZDT1e0o6JSwv6GMkQxd1fvIlKYYBIv+wUzYItSPGiP7Eoe/typlU 6hNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700516796; x=1701121596; 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=Bq7nwej1uXJ8BJR7pdDi87hSI0E9HenTuebLuXr0HrY=; b=hcwrUFYyFz+J+MmdkzWqDt8J58U29G3qkMN0w5oTSCJXT47p1dfcNwIBwln7YBdNMe jhLvs5L5ceaDCeJ50Ms8ZmxlHDxpTI6zFovnM02kqs5t7XHOyaF7LX3zscmg44HLgAyn JdKMBbKZfkGk/tfToRcGx8fVxE6N9lKbODtq8aD5N3fCo6L6RaEdIoL6p3bL1/AUvi1T F0AcEbtg42szYM/g62uQGQ9DPjWio6GPzRr/H6PN3geoY7we74p4az1JaWvluUhkB+oE jYjt/YDWcvO8iRag1ZcucqS8pQrrVIh3g+WsM3d7imUsMA7IlTC3XtwSAQa+Waw5eR7Z rANw== X-Gm-Message-State: AOJu0Yy57nd5JnYEPf5lk2HuhrIQ08/HwII7rcFsNeDtHYC37b7unY9I jXmrYsgK3pAxoFieKHX3/Bk= X-Google-Smtp-Source: AGHT+IH1S4/fJsobtHJJPWdqFrJEAF5OXQoLCltzpm8iDTMOYpJCpPVCKnhW9kW09x82/VjIEFaoPg== X-Received: by 2002:a05:6000:381:b0:332:c65a:8f1f with SMTP id u1-20020a056000038100b00332c65a8f1fmr4065388wrf.47.1700516796157; Mon, 20 Nov 2023 13:46:36 -0800 (PST) Received: from zotac.lan. (dynamic-2a02-3100-9030-5a00-2223-08ff-fe18-0310.310.pool.telefonica.de. [2a02:3100:9030:5a00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id i13-20020a5d584d000000b00332cb0937f4sm2667052wrf.33.2023.11.20.13.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:46:35 -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 v4 09/20] drivers/video/fbdev/via/via_i2c.c: remove I2C_CLASS_DDC support Date: Mon, 20 Nov 2023 22:46:12 +0100 Message-ID: <20231120214624.9378-10-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231120214624.9378-1-hkallweit1@gmail.com> References: <20231120214624.9378-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. Acked-by: Helge Deller 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 20 21:46:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 745888 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ghcuOtel" Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B232C10F; Mon, 20 Nov 2023 13:46:38 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40853c639abso20505765e9.0; Mon, 20 Nov 2023 13:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700516797; x=1701121597; 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=05TjyImSoTBVtC1xNXeArH35uiTcm8HxTuw7Nbu59W0=; b=ghcuOtelCeMbfmhYleMtFvj1LRTpEZxka7hb5P5nXUai9x9VEpvnmM/hNdFJ0PxnVr fU3G71a3xk+xOXsrXwn0++OMSXws370XH6LcbhMJ5JnQB2/qEX7kuHE4mYXu0Uk8MnLq jRHaLnniyqREwaDfbqKMkZF58hFKmUiDQB5Ed8m4EIuIZP4n5N0WBrZ+dNg/pw6tuRBa CG/Z/UN+d+KcRU8IA5SLOkNRIHtyLi9mp5vGq5Kp9IvF25bJIXUxY1MswBa/qPMGnHq7 WyG9mQVloWHyOcjb65v0Yc+w84z2VAcSbiFZuAc2Cf73AhZ+Mjvn9Y4Uj+PGtyNRV+W2 WVnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700516797; x=1701121597; 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=05TjyImSoTBVtC1xNXeArH35uiTcm8HxTuw7Nbu59W0=; b=IdbA/3bVIZ1jTxWKGDlapmdqNgWKnYsOlR3X4teUMJINDm5vhTzLQFQ/FAQkIGeEFg a/VEm+4uTdtW+wMcxyj7GA+hRC9BTO7GtXi7ARcyP+rUJHCjtm4/7fCYxD9ACvfyhDJT NzqEaZoAH/I0DG1jcyRQUotfvNpLygcxqQWKFJENsdVHQvzLU5Lt4E6C8gNldnVR6I6z s+at6CJu4ACpQbSYfHyakSdHIvIT4Wn0ml73v+ekVcs/cUd1VkIAKABNwtUPsz93cW00 Uw+sDv2ViVcIj7kvLToRFFE+D2NOwBQSEyPswMLrjAtpWndSLvxJDBpeLVlXsQfe53+0 mcLw== X-Gm-Message-State: AOJu0Yw03W/lH0AJM4ECAuRp2oVH+9LEH7mvh+rqEM6QCHvFv3ZhLRAW dksoAfMC93OK6RH8wp8Mcac= X-Google-Smtp-Source: AGHT+IHJoVgqVgRHUKYiAlqB4jK5099Vv0cVK0mL31SC+jI+u/8+HbpYjQSSsu7PjIpJalcA1ZWpRA== X-Received: by 2002:a5d:64e8:0:b0:332:ca10:388 with SMTP id g8-20020a5d64e8000000b00332ca100388mr2882898wri.45.1700516796963; Mon, 20 Nov 2023 13:46:36 -0800 (PST) Received: from zotac.lan. (dynamic-2a02-3100-9030-5a00-2223-08ff-fe18-0310.310.pool.telefonica.de. [2a02:3100:9030:5a00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id i13-20020a5d584d000000b00332cb0937f4sm2667052wrf.33.2023.11.20.13.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:46:36 -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 v4 10/20] drivers/video/fbdev/cyber2000fb.c: remove I2C_CLASS_DDC support Date: Mon, 20 Nov 2023 22:46:13 +0100 Message-ID: <20231120214624.9378-11-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231120214624.9378-1-hkallweit1@gmail.com> References: <20231120214624.9378-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. Acked-by: Helge Deller 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 20 21:46:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 745465 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GhOJjKTZ" Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B1B2132; Mon, 20 Nov 2023 13:46:41 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4083cd3917eso20397365e9.3; Mon, 20 Nov 2023 13:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700516800; x=1701121600; 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=YucjSL5i0nwNQb8TgcsZe7VSoyFWTM6YGwWJl941dgc=; b=GhOJjKTZjWp6kZHcAfHGLnFIgl4Oc2D5GpdoUmGu+1XfRVq7x1QPVGSiq7wj7jFXiD JH9pcWKizQV5X4qAt9FVnKw+vuQVMqUg71VvFw+2zD2d6chKCkYybEyDAfrX/y+qNIy0 BhXqAWgVJj4KxhN+WSTZiprYJFm4wEArX3mn5dY6R//1Z72gPq0sQ5IXd0IRdLyB0qGI JrVWyfDGrd/ZeMDC48vVDOdHbk681duD40EpUEE2Mpmy3zRXDWV/CKb2BcbKJWqWnKg2 rdI+S5UcGjTBrgJ7V+MT5+Vh+A9BrevO9pllULL6LNvNgDGQ6tr1waRniQt0ElK+5RAP zR8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700516800; x=1701121600; 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=YucjSL5i0nwNQb8TgcsZe7VSoyFWTM6YGwWJl941dgc=; b=wGsnP1W2S9bBKtDpytQC9CNVQBGvg4fbHJDSRsVI8a1PxFWyuA9k1FplQJAxxURJ1S TutsIfOTaYYWn4vXywIhLZIvaGg1RWTPHTpCT+1hFfWvAA4yhfHfLBzFnIFV2muXMety gi34sYRX+BEne32JQAZh7uz8u+z/Ksqjj21Kqv6F4Umm5WUdXKaO/L3y+NJOdSZq38+0 tNcjz5/6fVVzKQqXtzi1jJ/QzkWNX2kW6P666zITJAEew4M57CYf4f3qdpFtiCysvkMB yJ6gGfkGisQvFDGScMegqp7ZnTWYpwE2PN3zaxSY9wZL0xjjzWN8DEiMxMoLHH/IsVhG DL9A== X-Gm-Message-State: AOJu0Yykxhjy0p7YGlMUk55neIyc34MRNKADG/Rq8Ejv0QZTFQ527euS wWq2wirQ83NNNFXNvp7oAD8= X-Google-Smtp-Source: AGHT+IHI1MXMavn+Gq00D5IWRHVWhxn647ptsSuePBK36r3qhuByg6Z/4wSKnRhzWG0O01cnuBnrlQ== X-Received: by 2002:a05:6000:18cc:b0:331:6b5d:84d2 with SMTP id w12-20020a05600018cc00b003316b5d84d2mr5455372wrq.19.1700516799569; Mon, 20 Nov 2023 13:46:39 -0800 (PST) Received: from zotac.lan. (dynamic-2a02-3100-9030-5a00-2223-08ff-fe18-0310.310.pool.telefonica.de. [2a02:3100:9030:5a00:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id i13-20020a5d584d000000b00332cb0937f4sm2667052wrf.33.2023.11.20.13.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:46:39 -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 v4 13/20] drivers/video/fbdev/intelfb/intelfb_i2c.c: remove I2C_CLASS_DDC support Date: Mon, 20 Nov 2023 22:46:16 +0100 Message-ID: <20231120214624.9378-14-hkallweit1@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231120214624.9378-1-hkallweit1@gmail.com> References: <20231120214624.9378-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. Acked-by: Helge Deller 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++;