From patchwork Fri Nov 24 10:16:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 746971 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bOQMh0vB" Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3B271700; Fri, 24 Nov 2023 02:16:25 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a00ac0101d9so236176266b.0; Fri, 24 Nov 2023 02:16:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820984; x=1701425784; 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=m823d+6CNTStctZTlRF6jC0ql5SePV7hnpsYwUIZVes=; b=bOQMh0vBV7Cy72C1+SvjVKLwAG4NgtV5+bnJeaNTUR00+RR0KFMlBq29s2a60AuAEs evNldDpndVV57Hq1ZkSgtD87eLfB/GKyLslUHjfVbXVqPeGBasC8nl2lUo3VyP9si9Nt Pdk743xcEJ/Qw1WufW9fovnIxHFacXK9vDxbbvlajN09tWpNHhgpotab3XjZykT+aTeS S6aa3sxBq/Vqj4MhErcF3JqShfaknxOOtO4DoMPj3fUnmU7Kv89C9dKz7EZvcaiIAFSN ZvqObLH7dYZZkrcKs9UUV5Rx+mZAysGwKIFZyE9VTs/P0SeGLYTdCCWixw5EP2Ifj6e9 Cbyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820984; x=1701425784; 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=m823d+6CNTStctZTlRF6jC0ql5SePV7hnpsYwUIZVes=; b=S1Z16puPvAhheazWDJGNcxrEM2DsPtNUVppxx6o1XpDHPx4LOKfaBiGSyGvldR5agh i9MFO5k+dksd3QvBygiVKtN6gG0+vAUJ21fB1oesqh8KN7Og5PnHOnYsMMTcoZOqhcuR +CcwAAq1Tlcmd7zEaQ58RDTN9e9vBLndtFtSa6yIUmW/F17tUwp6UdqaPK+fk7nGOywK AipY3Zgq/xhpCo/7RH6QCE4hC27iluHUp3oMnnYhhBlkxR5JCh+LCF4ybqGqYHKIIOAi +oxaEfkxWMx8Piikec7OwJUpQbNCcoR31ofnLAL57/j7RVObapu0wYpiSvlVbvHZGyaP ssPA== X-Gm-Message-State: AOJu0YwYa1hBdQCeleJCMtRs3rLqyOXANgVhbPn99RVnv+EGD3eYj4J/ uY/pGTMt0C69Og9dTTMfMg4vhU2JjgOAdw== X-Google-Smtp-Source: AGHT+IGg5MZOrWXoGyUwmugSU+IBs8d4v1nBWDffXy/biHSm8ycABmUsP64wovVQwV0+iyFMmimOdw== X-Received: by 2002:a17:906:8916:b0:9e6:1dc9:9807 with SMTP id fr22-20020a170906891600b009e61dc99807mr1112285ejc.77.1700820984278; Fri, 24 Nov 2023 02:16:24 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:23 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Jean Delvare Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Andi Shyti , linux-kernel@vger.kernel.org Subject: [PATCH v2 01/10] i2c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:10 +0100 Message-ID: <20231124101619.6470-2-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit Acked-by: Andi Shyti --- drivers/i2c/busses/i2c-ali1535.c | 2 +- drivers/i2c/busses/i2c-ali15x3.c | 2 +- drivers/i2c/busses/i2c-amd756.c | 2 +- drivers/i2c/busses/i2c-amd8111.c | 2 +- drivers/i2c/busses/i2c-isch.c | 2 +- drivers/i2c/busses/i2c-nforce2.c | 2 +- drivers/i2c/busses/i2c-piix4.c | 2 +- drivers/i2c/busses/i2c-sis5595.c | 2 +- drivers/i2c/busses/i2c-sis630.c | 2 +- drivers/i2c/busses/i2c-sis96x.c | 2 +- drivers/i2c/busses/i2c-via.c | 2 +- drivers/i2c/busses/i2c-viapro.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index ee83c4581..461eb23f9 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c @@ -477,7 +477,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter ali1535_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 0231c5be6..d2fa30deb 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c @@ -461,7 +461,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter ali15x3_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index ef1307a25..208310db9 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c @@ -285,7 +285,7 @@ static const struct i2c_algorithm smbus_algorithm = { struct i2c_adapter amd756_smbus = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c index 1ed7e945b..42a9b1221 100644 --- a/drivers/i2c/busses/i2c-amd8111.c +++ b/drivers/i2c/busses/i2c-amd8111.c @@ -449,7 +449,7 @@ static int amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id) smbus->adapter.owner = THIS_MODULE; snprintf(smbus->adapter.name, sizeof(smbus->adapter.name), "SMBus2 AMD8111 adapter at %04x", smbus->base); - smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + smbus->adapter.class = I2C_CLASS_HWMON; smbus->adapter.algo = &smbus_algorithm; smbus->adapter.algo_data = smbus; diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index 1dc1ceaa4..416a9968e 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c @@ -249,7 +249,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter sch_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 38d203d93..fab662e6b 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -349,7 +349,7 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg, return -EBUSY; } smbus->adapter.owner = THIS_MODULE; - smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + smbus->adapter.class = I2C_CLASS_HWMON; smbus->adapter.algo = &smbus_algorithm; smbus->adapter.algo_data = smbus; smbus->adapter.dev.parent = &dev->dev; diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 809fbd014..6a0392172 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -943,7 +943,7 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba, } adap->owner = THIS_MODULE; - adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + adap->class = I2C_CLASS_HWMON; adap->algo = sb800_main ? &piix4_smbus_algorithm_sb800 : &smbus_algorithm; diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index 486f1e9df..32476dc10 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c @@ -353,7 +353,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter sis5595_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c index 87d56250d..3505cf29c 100644 --- a/drivers/i2c/busses/i2c-sis630.c +++ b/drivers/i2c/busses/i2c-sis630.c @@ -493,7 +493,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter sis630_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, .retries = 3 }; diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c index cde800398..77529dda6 100644 --- a/drivers/i2c/busses/i2c-sis96x.c +++ b/drivers/i2c/busses/i2c-sis96x.c @@ -228,7 +228,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter sis96x_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c index ad4f09c7f..7ed29992a 100644 --- a/drivers/i2c/busses/i2c-via.c +++ b/drivers/i2c/busses/i2c-via.c @@ -70,7 +70,7 @@ static struct i2c_algo_bit_data bit_data = { static struct i2c_adapter vt586b_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .name = "VIA i2c", .algo_data = &bit_data, }; diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 970ccdcbb..2cc7bba3b 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c @@ -304,7 +304,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter vt596_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, }; From patchwork Fri Nov 24 10:16:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 746970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K3NOkIAc" Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB1F9170C; Fri, 24 Nov 2023 02:16:27 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a002562bd8bso336032966b.0; Fri, 24 Nov 2023 02:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820986; x=1701425786; 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=hQhIen8bUSqCDzW7zy5bjryP0TL4VgTr4AnDnzWte8c=; b=K3NOkIAcM6cvI+byTsQb+wnl+lA60J0Mx5TyV51B3hwahDIrANoISkUn4esd3sA2Vu mLtnVGazWfPsmp/T+uq4c1AwlB1Iwj/1enhd9tAOeZ+4IAztmkIjp064RtkdNCzDHxBd iaMimqRkJf6ngwqocqqLmZxPaV7DYRbAtX9PkeeNPTwWqbH0SBCE57nj1M/JcrxJloDl xHK567ucl7bJSNdYQbsXczRiGkD2Doz3uxBetXUVmbvwBSpYx7/U5Gf2QSh1ZUWvWajy /wT5JhEhxo2pwVTC8awD/sCnIGF1Ai8mZL5aT1kuEhNoZjLf9YzY266VeSFQc+K+tvvD vX6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820986; x=1701425786; 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=hQhIen8bUSqCDzW7zy5bjryP0TL4VgTr4AnDnzWte8c=; b=bEBA0A7la7czxERNTgNYDKqtV43tPT0YpJykWyO6+oyOOkgsTDec6FS+hwxBf4dqYs PdSLYI+vusO0d4AZPXFt9vMs2HvCx8GcUTPYUw+4KZ+A0LVzOtThaS3OKpzUiHqL0bmG IBLrbjmvG/FxcBQNYAtFAM4ALjACxqj1fM5JA0Yr4lsNqUmuZL7ECqJWLq5hIFvGq7nj 9cWz8xZyBh1n/mrALKxVKfgqHTgryTAAi0sZR9cq+fvJhesZZf6j6NeubpixUaqnff2r K+HLZyyr4dWWakPDj+ubmoj0RZA8LLteW3Q7wGCrOOsULaJ0uHoCtc9uKbLeW2+08+3E xbbw== X-Gm-Message-State: AOJu0YwECQObZCgd3FC8Na794Q0fYsQCWLo3nNr6OObhpSLkAg70JBMN YccUFTaLckHsuFuj5ltOwW8= X-Google-Smtp-Source: AGHT+IHz9/ZoaYSQJbFyOHsePDZMaOznbJoXwDJXSZ85fMNDrqkQyfPkDwrbhFLw3bibv4ewkyWC7g== X-Received: by 2002:a17:906:78c:b0:a04:e1e7:d14c with SMTP id l12-20020a170906078c00b00a04e1e7d14cmr4941004ejc.32.1700820985634; Fri, 24 Nov 2023 02:16:25 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:25 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Viresh Kumar Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/10] staging: greybus: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:11 +0100 Message-ID: <20231124101619.6470-3-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Acked-by: Greg Kroah-Hartman Signed-off-by: Heiner Kallweit --- drivers/staging/greybus/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c index de2f6516d..22325ab9d 100644 --- a/drivers/staging/greybus/i2c.c +++ b/drivers/staging/greybus/i2c.c @@ -264,7 +264,7 @@ static int gb_i2c_probe(struct gbphy_device *gbphy_dev, /* Looks good; up our i2c adapter */ adapter = &gb_i2c_dev->adapter; adapter->owner = THIS_MODULE; - adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + adapter->class = I2C_CLASS_HWMON; adapter->algo = &gb_i2c_algorithm; adapter->dev.parent = &gbphy_dev->dev; From patchwork Fri Nov 24 10:16: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: 747344 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MLnCxw1M" Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 685A41710; Fri, 24 Nov 2023 02:16:28 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5431614d90eso2488541a12.1; Fri, 24 Nov 2023 02:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820987; x=1701425787; 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=TvMhLdgxzmvHjkFyHLWsZZ7IOFCpPNkXdifeaawKQLI=; b=MLnCxw1MPygAe/hGaScggqLiNNuKTur/N7Qi9wSRttpyX/TL6MKnuTrQ85iiOzZdeZ NTu/1m72rZLYDjU/wz5UjajVrQSE98oDBDRBeY7PC5gxDDu0FqMXypTk3PJz37djgXZh Aefj43qi6LFve9mbsjKdHkzMD48eNWGj1KQ6gpolX0GLxmUgxpARtT27YSoP6bT2v5qm BnycdDAxICUR2bcEpuaJnMY05xpswbLncccHUteLFG/KcUlK/MgeulRg2I7uzf7o13wM IZf4/EGXBL4ZWwZo/W3K+A6OEjqescKsc7L45/MeXm/6DBvfKksTNNfaHQL1eenX/ku2 O3hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820987; x=1701425787; 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=TvMhLdgxzmvHjkFyHLWsZZ7IOFCpPNkXdifeaawKQLI=; b=bCK9h0IV0kzIGVaDogiO2ubgoVfo0XNhU2ZW/g+KvsH3+1W1VljXKG9Klkii8GS1mJ 2joX//oqnpWtILS9twLlrVJslpzCNL1ryeIp9ArXqg7eH7H5AzZhFbsuCeGIZaDkTT+E wFDhgEDe6mDS6soqqns77ztSTgkzLY6guz2gj3cQKZHetBSsFhaAaXHnsByZM9FUiOvM Ou1ECQkfPMx93y6vc8KgeIGInPfqcoOyxpiC3s4eBJ9xL+fHKZO1m3ipGUs8YGdWfjqW oobdZMVscCGVqFmfuikr6XFY0ixQzhYNffX6cqFaTI25JsvaZ18T3jXid6tYvwSbr563 FjeA== X-Gm-Message-State: AOJu0Yyp2XMdrYyCv245YjtKtz+r2WPvWfz3l9NT+q5FaeC4pEfHY4Tq PFX5qA+FogldHYyCo/RoGp75Ceutk917tQ== X-Google-Smtp-Source: AGHT+IGkA02PbfBKunnd6jhHwP56ec1eLpYUxLVppuL6zxrnc1kQN/EcXDZ5EhmwsfyJqj84pfYEuA== X-Received: by 2002:a17:906:158e:b0:9fd:8d07:a3ad with SMTP id k14-20020a170906158e00b009fd8d07a3admr1465316ejd.17.1700820986648; Fri, 24 Nov 2023 02:16:26 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:26 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Michael Ellerman Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Nicholas Piggin , Christophe Leroy , Andi Shyti , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/10] i2c: pasemi: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:12 +0100 Message-ID: <20231124101619.6470-4-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit --- drivers/i2c/busses/i2c-pasemi-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pasemi-pci.c b/drivers/i2c/busses/i2c-pasemi-pci.c index cfc89e04e..77f90c743 100644 --- a/drivers/i2c/busses/i2c-pasemi-pci.c +++ b/drivers/i2c/busses/i2c-pasemi-pci.c @@ -56,7 +56,7 @@ static int pasemi_smb_pci_probe(struct pci_dev *dev, if (!smbus->ioaddr) return -EBUSY; - smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + smbus->adapter.class = I2C_CLASS_HWMON; error = pasemi_i2c_common_probe(smbus); if (error) return error; From patchwork Fri Nov 24 10:16: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: 746969 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O72hV4Pd" Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98E03171A; Fri, 24 Nov 2023 02:16:29 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a049d19b63bso241275866b.2; Fri, 24 Nov 2023 02:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820988; x=1701425788; 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=RDYlMPRSk7TY9iyl3ZjO9NBO1F64RbMOjWU8YityecA=; b=O72hV4PdXyYpM6QyVOrvRtXirpczUOJ3VolPct2ekkNjYhACzQnmJ9t1BEO9gUTKm4 1D5jMaaTL/wfAa2oOgMOcON756/IdvjVfp2/f/g4Myei7ooVKH5yQTUli4RFwokoIBJF 7oB/TxKqh6+UJ7PdD6DDm+BGE9MNVp46ZCoZjdJmPiaNiiNYuLB3XPXdd0jLs3yz5ZSe rnSIJK+mWn4g5THlJeGTRM+GSzVC2+zkYFuiokvStmAU9WKMBEcjSms11TBgwf/E0qlR ZHAy28GcD5vtjqBFFyR1pqAKI+NjX6XZyMucGKUxpJpJBz3VzNpmvVMl41LIj5hMXPix gAxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820988; x=1701425788; 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=RDYlMPRSk7TY9iyl3ZjO9NBO1F64RbMOjWU8YityecA=; b=Cy5toECMguAKNuhyY5cjpOYq2C/cbXhiVXuaUG5zFmcAzpsUiMaPE8EZ2/oSfcAOx8 X0eywF2oXjyXy8kMkeCCP7HbEOfI0mP2fB704ePlGtKszEJ4A1Yx3DPUJIsiSb/PVvO5 3AH/HR41ZKoVrHeRLyuiGALuVoLZLd3LNWQfmg28kjf06a3Dsq/EpYcBx2r5cjiDzhlR 610P9AN0Kmo3yZYPtV6phong3+3LWVllkOVddbS3D3m8X4QjUAzl7uussX7s0b38wkM5 kqI8G+e2EQjZQncELcxnUgCxc0dAgnt9aLbscwMcTUsQb6IMZAvto0rRwEdn5Oa1bbIN 0kQw== X-Gm-Message-State: AOJu0YzLHA5OMk05x6vb6SR0ogHcX61b3ii6raG0amLG1RPNx0VxKGSg Zy3PLPT0UYnZJDPpXzsP55KrZOyaHVATAg== X-Google-Smtp-Source: AGHT+IHOUEf5tXdquHAKGk0N5FQ5hk39DWYdbiI5Z+4To5F6Q0O0PTL6wCNI/AVvKa0MD8LI2UxacQ== X-Received: by 2002:a17:906:684a:b0:9a5:9f3c:9615 with SMTP id a10-20020a170906684a00b009a59f3c9615mr1492325ejs.63.1700820987729; Fri, 24 Nov 2023 02:16:27 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:27 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Andi Shyti Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , linux-kernel@vger.kernel.org Subject: [PATCH v2 04/10] i2c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:13 +0100 Message-ID: <20231124101619.6470-5-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit Acked-by: Andi Shyti --- v2: - fix style issue in i2c-kempld.c --- drivers/i2c/busses/i2c-elektor.c | 2 +- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- drivers/i2c/busses/i2c-iop3xx.c | 2 +- drivers/i2c/busses/i2c-kempld.c | 3 +-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/i2c/busses/i2c-sh7760.c | 2 +- drivers/i2c/busses/i2c-sibyte.c | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c index b0f50dce9..cfe8665ca 100644 --- a/drivers/i2c/busses/i2c-elektor.c +++ b/drivers/i2c/busses/i2c-elektor.c @@ -188,7 +188,7 @@ static struct i2c_algo_pcf_data pcf_isa_data = { static struct i2c_adapter pcf_isa_ops = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo_data = &pcf_isa_data, .name = "i2c-elektor", }; diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 408820319..7fb87b789 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -739,7 +739,7 @@ static int iic_probe(struct platform_device *ofdev) adap->dev.of_node = of_node_get(np); strscpy(adap->name, "IBM IIC", sizeof(adap->name)); i2c_set_adapdata(adap, dev); - adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + adap->class = I2C_CLASS_HWMON; adap->algo = &iic_algo; adap->timeout = HZ; diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index f2f7ebeea..2e5f0165c 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -478,7 +478,7 @@ iop3xx_i2c_probe(struct platform_device *pdev) memcpy(new_adapter->name, pdev->name, strlen(pdev->name)); new_adapter->owner = THIS_MODULE; - new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + new_adapter->class = I2C_CLASS_HWMON; new_adapter->dev.parent = &pdev->dev; new_adapter->dev.of_node = pdev->dev.of_node; new_adapter->nr = pdev->id; diff --git a/drivers/i2c/busses/i2c-kempld.c b/drivers/i2c/busses/i2c-kempld.c index e01d75308..c3a529a73 100644 --- a/drivers/i2c/busses/i2c-kempld.c +++ b/drivers/i2c/busses/i2c-kempld.c @@ -283,8 +283,7 @@ static const struct i2c_algorithm kempld_i2c_algorithm = { static const struct i2c_adapter kempld_i2c_adapter = { .owner = THIS_MODULE, .name = "i2c-kempld", - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD | - I2C_CLASS_DEPRECATED, + .class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED, .algo = &kempld_i2c_algorithm, }; diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c index 421735acf..d7af8e0d7 100644 --- a/drivers/i2c/busses/i2c-scmi.c +++ b/drivers/i2c/busses/i2c-scmi.c @@ -385,7 +385,7 @@ static int smbus_cmi_probe(struct platform_device *device) smbus_cmi->adapter.owner = THIS_MODULE; smbus_cmi->adapter.algo = &acpi_smbus_cmi_algorithm; smbus_cmi->adapter.algo_data = smbus_cmi; - smbus_cmi->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + smbus_cmi->adapter.class = I2C_CLASS_HWMON; smbus_cmi->adapter.dev.parent = &device->dev; ret = i2c_add_adapter(&smbus_cmi->adapter); diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c index 1ad2a2615..8a043f5fc 100644 --- a/drivers/i2c/busses/i2c-sh7760.c +++ b/drivers/i2c/busses/i2c-sh7760.c @@ -477,7 +477,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev) id->adap.nr = pdev->id; id->adap.algo = &sh7760_i2c_algo; - id->adap.class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + id->adap.class = I2C_CLASS_HWMON; id->adap.retries = 3; id->adap.algo_data = id; id->adap.dev.parent = &pdev->dev; diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c index 8f71f01cb..49f8f4f1b 100644 --- a/drivers/i2c/busses/i2c-sibyte.c +++ b/drivers/i2c/busses/i2c-sibyte.c @@ -142,7 +142,7 @@ static struct i2c_algo_sibyte_data sibyte_board_data[2] = { static struct i2c_adapter sibyte_board_adapter[2] = { { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = NULL, .algo_data = &sibyte_board_data[0], .nr = 0, @@ -150,7 +150,7 @@ static struct i2c_adapter sibyte_board_adapter[2] = { }, { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = NULL, .algo_data = &sibyte_board_data[1], .nr = 1, From patchwork Fri Nov 24 10:16:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 747343 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aj/dy6bR" Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42CB010F6; Fri, 24 Nov 2023 02:16:30 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a0029289b1bso242900866b.1; Fri, 24 Nov 2023 02:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820989; x=1701425789; 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=n+AlUo2GslrTb8lu/H9lXRQ7xNPByNIgHu5m89J0d9M=; b=aj/dy6bRKtbXQ0WZd56u9wpDyAwl1F3/rQnqbMB+dQ3V16lgrS503H5tGYlMr3ZWzM yTAG+8CLdXlDIzJEbVWrepXnx6U5fYKLgf5HBq79QsQBho2prbosKTuGkapZ6Kk0WvLp Wp8lyDjxSkWKm2SyxCQS4K6SXYRYlb/LoG2KqhDfu70Fy9ob4ET2UsckFGq8cgMfuPpR jh8c+1WAxGuXRcGQCYHUPd0gJ5HIgnFl3j6bTCk5aNGTkXdnh02pEfhObXuRD/izN664 3vjOUoI/CSxRKKzwlvd66l33v3eHSo4dJngIX4OMzqqj81waD09eW8OeY+9UVO8OV4h6 bcGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820989; x=1701425789; 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=n+AlUo2GslrTb8lu/H9lXRQ7xNPByNIgHu5m89J0d9M=; b=m9mKtT9AVd09gSXnZeuk5UNo79VYk03gtJBNuwL4rVsgsrdnZY7CszInIjNHst0Oop ZU25KxTvqf3Sk7ePuXor6ax25Dhn/RLfT237SbkHYHXNZNER/YwrVL81CeR1DChm25A2 ueZk1roS0v2r55RF9JPXrX8ZQ2+XJZIeZHfTFiBxQKxzrBiWI3s805e3/iqy8Xj28qMM hUGrWiem0nHMnhF2a7G7GEhikQ6Xk1Y1HtBzs6m21DCubYN1ymsEdbxW03sNiy5RhZKM wEW2DiSe2ES9d+0DwkbOuceR9zG12gXoE9BUc4XTHMoIaGcYZCXLgHejE9nvq6G/vSaF VukA== X-Gm-Message-State: AOJu0Yz3EV2QGL/bLLdLVq+bK1Sx+m9HJ06GYtAx451iVBmkQ6Lo4eAM tcgM/pP7MaWf6s3aMXjPF4E= X-Google-Smtp-Source: AGHT+IGpq1UXF35W8G0+/SS3Ins7rMAYc4wOOqsIKJk9KItjUYj+F5QGLGP6DW54lAVCF0TI+BRvFw== X-Received: by 2002:a17:906:b796:b0:9fe:57b3:bc08 with SMTP id dt22-20020a170906b79600b009fe57b3bc08mr1480276ejb.41.1700820988942; Fri, 24 Nov 2023 02:16:28 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:28 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Jean Delvare , linux-kernel@vger.kernel.org Subject: [PATCH v2 05/10] i2c: stub: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:14 +0100 Message-ID: <20231124101619.6470-6-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit --- drivers/i2c/i2c-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-stub.c b/drivers/i2c/i2c-stub.c index d642cad21..09e7b7bf4 100644 --- a/drivers/i2c/i2c-stub.c +++ b/drivers/i2c/i2c-stub.c @@ -308,7 +308,7 @@ static const struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter stub_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, .name = "SMBus stub driver", }; From patchwork Fri Nov 24 10:16:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 747342 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D5oWfcvk" 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 33959172E; Fri, 24 Nov 2023 02:16:31 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a011e9bf336so241906066b.3; Fri, 24 Nov 2023 02:16:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820990; x=1701425790; 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=StehfMdN64OqQSfteMU1WHeQbOvnHJtoyvxwinO8ko0=; b=D5oWfcvk3P8eyMO9IRsW2DAAnK9/tQJZn9FNResLz1EgakHQG6tmH5UeZoTidpxKWK uWTeXROcjYaZiHk8OiakLYXntaWJody1N9hP1DeTEOp3pODmWiz6tb+zsCY/8sgsSouW uz9fmd1upcFd1j34qYeTWVl4oKOivGizitaPihOLqkUjVqhNq35473e1FxL/oCDmrBbX /k47iuVxNT3Htu7r93ZwB9Joc0lEKHEgO8EsbX6210G0S80b3Fewi907E8fsUANAeLBY lxNWGqhAgo5ulBKhZ2QoPRsf6DsrjD5RLINr/VmDLtI15aTH1RELf+TYRGUlSdKC21WD Rzjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820990; x=1701425790; 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=StehfMdN64OqQSfteMU1WHeQbOvnHJtoyvxwinO8ko0=; b=ImF4xCqP66VoTTcCt9Pb4ec1R1QZqKPivAV4KFGvx0Mglz690YYY/jT9YzhFTVtSr4 ygug8TRXkAXSmWXT6H+BB9lDaKTmwJU9ZFeGmDZxCX3Uy1cgzXeuvcA7/BZyBt2Jn9mW jD1M6oOoRfSM0nYcuAUe8lXbvlLJv2TAnxq7OoSD1M/mxdlcKeMs5RiNIPLB7OM48uv6 EVNjkoi6vuruf4RitMXSVheGgYq0tFEIqm7+hAaz+o+IVM2/1xjUurS3D4x1CGtHsShR hNVBj6NrA4QozZeH1r0lLJaCioSWXrd3npBu2e8uEZKgm2rFDO8XoodzcAUAKJAYXhFs gefA== X-Gm-Message-State: AOJu0YzFWs/7q/PWKpJxMW7Az/yk+wwNk+yKReL24kh64gMqQcpxPIZI MLbATP8Vop1/d/IG45VmsN8= X-Google-Smtp-Source: AGHT+IFo4kpjhjqKsHKXQhHzYemOVp77eLIV5HBj9tx8zE3iH8QI6Kl9uEBbiFo7bp4YMFPcti2JdQ== X-Received: by 2002:a17:906:f357:b0:a0a:2704:e4f6 with SMTP id hg23-20020a170906f35700b00a0a2704e4f6mr159366ejb.21.1700820989928; Fri, 24 Nov 2023 02:16:29 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:29 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Wolfram Sang Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Andi Shyti , linux-kernel@vger.kernel.org Subject: [PATCH v2 06/10] i2c: gpio: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:15 +0100 Message-ID: <20231124101619.6470-7-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit --- drivers/i2c/busses/i2c-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index fb35a75fe..df2b183ca 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -444,7 +444,7 @@ static int i2c_gpio_probe(struct platform_device *pdev) snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id); adap->algo_data = bit_data; - adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + adap->class = I2C_CLASS_HWMON; adap->dev.parent = dev; device_set_node(&adap->dev, fwnode); From patchwork Fri Nov 24 10:16: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: 746968 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ewBPZ+Sb" Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D7211738; Fri, 24 Nov 2023 02:16:33 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9e1021dbd28so230870166b.3; Fri, 24 Nov 2023 02:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820991; x=1701425791; 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=roBdCcPzLstLM8/JSIpHl0j2D5fXKoNfX0rW8q8tWfA=; b=ewBPZ+SbgeALGi8KZJKOcnVm7qA9nK396I8YH86I6IUBRQtWdteCaWQ9J1H6QQViR/ YSfiXmKP3JL22CXE2eA2pkF2Ce6j4CHz1piydGL0IjYdRvvxgwERkgVgXYKGTtOVOQmx 8HkBMjNPB5+F5VmmLssxfEnZO+K01/4bRfgtfhHdnwMpnj1YCCGqjz9Z5j7T4ZAv9280 EXKiNClkUcH8vx84PtmWaoTd76/Sz89mg25Gg0iMzzem6sDPMwDPzHI9wkw1VpYVHbqP hmQHs8bTggQIfzh2291hzqdBcH7AWLedn25lHT26ZPmFeOZjsgASuQcxtGc0JqcpnNmY 9d3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820991; x=1701425791; 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=roBdCcPzLstLM8/JSIpHl0j2D5fXKoNfX0rW8q8tWfA=; b=jL1tray28HJGLgf4gxp9NLnMGzvrHP4xj97exLABDPxr0vhY/Idk9xBWE1lr7yKnWT X+1lJaFFUIuMdYY9/J7huhXVsjbQ+IRyX33rkndFIpz2QyfmGkpbe3XtnZoYFbKYte0B Zhk+BsqrRh0ClhkTDCuV87z1xepG79CjMf8KI8PMQb0fm+rWa4zsWIYMlVB0HX+Rh2Jh rEGhYUd+ugM4NBwmISgqYqgi3CHnWffM8F1vEhiSB/nJuQmb+hqeqHaKawPCAZT2QA8i D6MtaGlJ/0U+NKNLRLFMESujrciVs81+l+GLHw0aZb0RO68fa0OH4DonK9CrZM556Uk3 45Xg== X-Gm-Message-State: AOJu0YzQOaqJ1Qv/Imoq8wPhw8sictRGQ73Fl2ARxAeuue7Ol4pm630R svThiZCiaTL2TQGaFKi1bEcf50M8zMfDzw== X-Google-Smtp-Source: AGHT+IGQvQB8JVIO8p2f/RQEQ1IEuGFwq7QTzYVaZTGIFi+zECRu/DnCeCLti0SHBU4MgRhu0UousQ== X-Received: by 2002:a17:906:7f96:b0:9c2:a072:78c4 with SMTP id f22-20020a1709067f9600b009c2a07278c4mr1681371ejr.25.1700820991231; Fri, 24 Nov 2023 02:16:31 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:30 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Vadim Pasternak Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Michael Shych , Andi Shyti , linux-kernel@vger.kernel.org Subject: [PATCH v2 07/10] i2c: mlxcpld: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:16 +0100 Message-ID: <20231124101619.6470-8-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit Acked-by: Andi Shyti --- drivers/i2c/busses/i2c-mlxcpld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-mlxcpld.c b/drivers/i2c/busses/i2c-mlxcpld.c index 6fec64ea6..099291a04 100644 --- a/drivers/i2c/busses/i2c-mlxcpld.c +++ b/drivers/i2c/busses/i2c-mlxcpld.c @@ -477,7 +477,7 @@ static const struct i2c_adapter_quirks mlxcpld_i2c_quirks_ext2 = { static struct i2c_adapter mlxcpld_i2c_adapter = { .owner = THIS_MODULE, .name = "i2c-mlxcpld", - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &mlxcpld_i2c_algo, .quirks = &mlxcpld_i2c_quirks, .retries = MLXCPLD_I2C_RETR_NUM, From patchwork Fri Nov 24 10:16:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 747341 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X9oKWUBI" Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F11E21981; Fri, 24 Nov 2023 02:16:33 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-54a95657df3so2603916a12.0; Fri, 24 Nov 2023 02:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820992; x=1701425792; 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=VbsbH1CThP42UiUJns2VDtTJbIoXHmLVJdFuam5YX4A=; b=X9oKWUBID6OlknMR76MJ8/PNkQP+IG+lRE5M9SgcBKo/JZ4naaHuCI3TtoEhE3RvL1 CEvlGrDhruiRHkgZ9bUue+5m5VtBqjtV4nrTuKtcEtTLE5KmvqUnPzYZbFI2tLEPBSl4 9P8s/CDNOwkDDhoR6qyd/wOiBNhWMZ3Ah9c17hdtPV4daxBY+D4AbiUtxLrKgmUpCjMG isiEemXpWfZGCXci0Im2UIHrn3gJMgF/y/pS1uCWaYuV5DsN7uSwNFXMqNUvS7uzWKv4 /PX0ChxgiWUPgHUQRTsywQH83bn8yCMOArya6EwQACA2XGO+GhURd6Cv8Zw9QAhwIecy EYuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820992; x=1701425792; 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=VbsbH1CThP42UiUJns2VDtTJbIoXHmLVJdFuam5YX4A=; b=QVcmSUqoKb0amngK6ZFz4hle4Y/iKjktHheJfO0pYGUVUj695yQymfyZ+989RsKF/E Yq3b+/xdoH1gAuQpCWAWK9lTUaUoYgT+yxxeDNOyF3KeLppY4wdlxPX4Wl6IpUmiH90y xLPHCP8SXuSXN4dyXR8oq6OUojLddXfhh/dfjpdu+S2u1DHGw7sZXdcyC/KqbztyEwhF SGQTarE8gqXS8dYtV2mWE8yOk8dgIIU3FFl5ikZF9IpUgYRVe5PX0sK8fUypUoxwJ06U svQ5d3LJLt0ObME1xnDgayGSXbCCfsxpeHdMywHHgo3G3/0qejt7srlYBq0YRvAJpht4 oJig== X-Gm-Message-State: AOJu0YxfPKR1ThakTVqAw2579TGvs8PBF4RKxmqo2lvL0qjwudTTcQkX JJxPQGo7ioST8lpW8lAXju8= X-Google-Smtp-Source: AGHT+IEl7DVOh1yNeZ0+PXY4g23+UeNxF96Aj9qPHe8kNZb0s0xY2k4/cW8g1WnJAVASNqPSlqExJQ== X-Received: by 2002:a17:906:590e:b0:a04:837e:a955 with SMTP id h14-20020a170906590e00b00a04837ea955mr1609642ejq.32.1700820992151; Fri, 24 Nov 2023 02:16:32 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:31 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Sergey Kozlov , Mauro Carvalho Chehab Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Abylay Ospan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 08/10] media: netup_unidvb: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:17 +0100 Message-ID: <20231124101619.6470-9-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit Acked-by: Hans Verkuil --- drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c index bd38ce444..46676f2c8 100644 --- a/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c +++ b/drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c @@ -289,7 +289,7 @@ static const struct i2c_algorithm netup_i2c_algorithm = { static const struct i2c_adapter netup_i2c_adapter = { .owner = THIS_MODULE, .name = NETUP_UNIDVB_NAME, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &netup_i2c_algorithm, }; From patchwork Fri Nov 24 10:16:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 746967 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VPE49zci" 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 5B10C198B; Fri, 24 Nov 2023 02:16:34 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a02d12a2444so251192466b.3; Fri, 24 Nov 2023 02:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820993; x=1701425793; 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=fBFVvNKhAX+OR3ALwztSAgxwFpQwZtLHeEc/T4Eghog=; b=VPE49zcijTl3r1uq8JC2J7ZTPBU+nTGgImSZ216lLyfwXt+SMt0GGo3SqL1n4tLg+U y1YuffBXxih4pkXqjpu3KktdTjiGFdv3egfmYMsTX04QJrTJSPg4RNlAL5PNLEHnyAwY pff1tI3vEDmt4uq1DicmZlZdz7ASngEknQQ1ulmbhgce+CabbEYEjf1fnBSM3FUZv3Fk +OM1nzFJoRXs3Y1Nmd9LjauV1B9uUMQmuIDidu/cLv7PDEFNcSfule0YDw9mI+V8swNX cs+17KtPw3XeInnhxuaAqatRrIxoR+r5uHLMy2xtbR4C6SBpqZPP1tFpbjseEf2TTg18 9N7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820993; x=1701425793; 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=fBFVvNKhAX+OR3ALwztSAgxwFpQwZtLHeEc/T4Eghog=; b=TSNenK1xHwwl9kU5ZHW/W7PgrvFovsAhGjZRLC4V1H1I1y4VEE5UTGYwNw1Lb2n3xa 2q8BFxa0BKUAG8uf0Lv0V3VFkdvberymcHIM3N9ExEtoI8ZIe8vK4orwzsodD1gR+HG8 3YxcWvvDnhooygVVZpp9gmj9C5m7a7MIKDoUkjXyBGppVRpehDM/92weOp7kEKXArySy +s79IXEkv2Hsvtqs32itkwdxsK3qfYAdBOU6qKQcigrsFWyCnGGK1RDgwmwbviEyK2rQ q7NHsIofaqRG7RbieAM0rsy/EQlX9PNy88Ktq5J5o0P1Q2zqqE3/wDXBGPcpzESWiAii et5g== X-Gm-Message-State: AOJu0YymuLzpXlLFtPodpfHNVNcYUFrliXLM9S0322JTkuQXLI5IAFBH 0vcgCHn8U/e95+9B1MmSS9U= X-Google-Smtp-Source: AGHT+IGN7nZjWxlJe5L69GaAaOT9ZlgxzJNpnwIeau0kbIYcFkVvFfiCCMZIPevdOms/UBtxi3Dx1g== X-Received: by 2002:a17:906:7c41:b0:9e6:cd68:5e57 with SMTP id g1-20020a1709067c4100b009e6cd685e57mr1674371ejp.2.1700820993427; Fri, 24 Nov 2023 02:16:33 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:32 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Jean Delvare Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Rudolf Marek , Andi Shyti , linux-kernel@vger.kernel.org Subject: [PATCH v2 09/10] i2c: ali1563: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:18 +0100 Message-ID: <20231124101619.6470-10-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit --- drivers/i2c/busses/i2c-ali1563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c index 55a9e93fb..307fb0666 100644 --- a/drivers/i2c/busses/i2c-ali1563.c +++ b/drivers/i2c/busses/i2c-ali1563.c @@ -390,7 +390,7 @@ static const struct i2c_algorithm ali1563_algorithm = { static struct i2c_adapter ali1563_adapter = { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = &ali1563_algorithm, }; From patchwork Fri Nov 24 10:16:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 747340 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="go7Qrl4K" 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 A91E110FA; Fri, 24 Nov 2023 02:16:36 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a02ba1f500fso251684166b.0; Fri, 24 Nov 2023 02:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700820995; x=1701425795; 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=CmI/uIQ6Rz6MtRkEfeCIhTUeSTfDQWhDOaE2Jo1gHkw=; b=go7Qrl4KK6CKbXtxM7P2PCPTIn4BZSMVf/n58O7uymbxwsyFVBJ28r4CJ+2r5USRAx PMPa+e3ZFzr2E7M+xVQfnpBxMoqLtxU5YfJR8d7XdHTyJfxnkvdcPm2g6uwMBAqwSlK8 p84TZvpQQD7ZJ4mUXSMfSdl52+0cUNpWLBnZLKAIMhP7enjX91hbs2D6zhfngQkgW5zI thrXPJpKWMm1R3073XiRwGJ3YE6Kg3o1u/cEIOLRG9bTSZpvQuHYfxHOL9cIh2GdNmG0 yr1yHhm9x2iPLw09Czm85+pJwCDK+pQ13TcAjpAK3UfzqCejVOyrnKf44TnBM1Fu9AsR DLYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700820995; x=1701425795; 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=CmI/uIQ6Rz6MtRkEfeCIhTUeSTfDQWhDOaE2Jo1gHkw=; b=csxjSGznNHKR0Is7IYeQuh6B6zPPS6Snw++DjHVqBDcp/VPn8Y9ImjKwCpvU2dtOwa qrpqN59bGwne+szP+ElWIEQZ8q1ecynEfY0f0V7zDwZA8JxHhJk2m4WK9iJQO5Nc1iQd 27v4kgBJtiNSUl0AdmQH/O08oQdwJ7dxr7FkfwNLLECJUx4+R/wa+GjsKXnLJnm3I5kD TRystu91WqdvsP1iaYoZoIqxD5kczO8fbendkRwtO5C3FFdnA+I6IqgvrLcRDaRHnQDg BGY4PmtXkt1YMZgW+htzWgPSPrDjj7IyZG+0BtySUeJ5UtgI5gtCv7k1YYE3QRN6pZFb 16mA== X-Gm-Message-State: AOJu0Yw/oXxqvhIdzvoVtw5XCokN5V7L8Ge5n/5YRhIjAn2fQL4ZicNQ yfAe3nV0kNVir1mY/zEiK9lTih5r5WV1xQ== X-Google-Smtp-Source: AGHT+IGleUJohNDiMb4cl8svyIOn0mt82nef225zJR4dEew+lBsivv8WdxG9Igavwtpw4/QWyiGOXw== X-Received: by 2002:a17:906:29e:b0:a01:dc84:1658 with SMTP id 30-20020a170906029e00b00a01dc841658mr1687689ejf.4.1700820994715; Fri, 24 Nov 2023 02:16:34 -0800 (PST) Received: from zotac.lan. (dynamic-2a01-0c22-72cf-8300-2223-08ff-fe18-0310.c22.pool.telefonica.de. [2a01:c22:72cf:8300:2223:8ff:fe18:310]) by smtp.gmail.com with ESMTPSA id oq12-20020a170906cc8c00b009fbf15cee7fsm1887801ejb.69.2023.11.24.02.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:16:33 -0800 (PST) From: Heiner Kallweit To: Wolfram Sang , Jim Cromie Cc: linux-i2c@vger.kernel.org, Heiner Kallweit , Andi Shyti , linux-kernel@vger.kernel.org Subject: [PATCH v2 10/10] i2c: scx200_acb: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON Date: Fri, 24 Nov 2023 11:16:19 +0100 Message-ID: <20231124101619.6470-11-hkallweit1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124101619.6470-1-hkallweit1@gmail.com> References: <20231124101619.6470-1-hkallweit1@gmail.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Series was created supported by Coccinelle and its splitpatch. Signed-off-by: Heiner Kallweit Acked-by: Andi Shyti Acked-by: Jim Cromie --- drivers/i2c/busses/scx200_acb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 83c1db610..3648382b8 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -427,7 +427,7 @@ static struct scx200_acb_iface *scx200_create_iface(const char *text, snprintf(adapter->name, sizeof(adapter->name), "%s ACB%d", text, index); adapter->owner = THIS_MODULE; adapter->algo = &scx200_acb_algorithm; - adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + adapter->class = I2C_CLASS_HWMON; adapter->dev.parent = dev; mutex_init(&iface->mutex);