Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp969652rdh; Fri, 24 Nov 2023 02:17:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGW18zqENzlg2/kr0r2kZ2y4jO5w0hBilKHp4nwSAukHOt4Iw+8qRLNcLFpWkq7eXT+e/qS X-Received: by 2002:a05:6e02:152a:b0:359:4b3b:530d with SMTP id i10-20020a056e02152a00b003594b3b530dmr3548353ilu.7.1700821021653; Fri, 24 Nov 2023 02:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700821021; cv=none; d=google.com; s=arc-20160816; b=EK3mstpcWKki7i1zYvB6VqSLw2EMr6m4QYdsDytROP8EylpYoKXP14+ZOXbw/xqvlw ZIUopsR/ILCXBc2nqYx0VmG2dCu7j365VT6w+OnfJYhVhPERJ7hehS87jln1ssvmnMMv C6pMatDuoInCEA/pSSk7/0XdmW3WcOpNCtg7cJVAlk7Zp7mWLwK0zyIhPo49Vz/PKLz7 +Anw/OP7cMXcy3rJhst97HmLOj9a9ah/duZElthaj1jjyKfcKTenkzFJtOAx5cCIlCot NW4DAmFoOUnhdNJcOYHcoZz+vRMV5H2wRwTXUWAIyzYWbWZvSGYJCwr9fXaWdGBP2O7u 8tgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m823d+6CNTStctZTlRF6jC0ql5SePV7hnpsYwUIZVes=; fh=owj64/wGUVsD/KMWf+aJniVhLbkT3Lm+lGaTChE4w9c=; b=bX9bSauqq0JgPH2Xwgzswh9Q1FHBmWFUd3TpBR7SaF4DaDWrtpwIHtK3gqyaDWtVqi /P1Q8LKa4nk2xZVcK4Du1U1nAOw7loZoYGg/HONKZ3zHP+goYy/G/jLqpZzpa6dkwllJ JdTiMKtH02FwC0KLkomNiyT9e9v17+7O8LQBiwRNYJd90gw55qznHUY5Bl573xyN7Igr gopCzXznPjHQehdxS6OWY/mrJga5gU3BDVQUJdQSW6u4qxNd1SVZOyEOaXNwlBCW+/a6 CVNjRaWY1NpnGzFAmUhwKYqPpYe+ChRuqSZdWIOzkdLluCDOdPyFCuSGSt/iqmUJT8Qd d8yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bOQMh0vB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id v64-20020a632f43000000b00557531eafb0si3235067pgv.559.2023.11.24.02.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 02:17:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bOQMh0vB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9AD4580A5B45; Fri, 24 Nov 2023 02:16:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345597AbjKXKQe (ORCPT + 99 others); Fri, 24 Nov 2023 05:16:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345498AbjKXKQ1 (ORCPT ); Fri, 24 Nov 2023 05:16:27 -0500 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-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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 24 Nov 2023 02:16:55 -0800 (PST) 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-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, };