Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2388279rdb; Mon, 12 Feb 2024 03:19:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5TVxhUeD1cEYT1oqgMgRVKFNFBqFnyp/NCKN9XkeBepw9bzbEDRHpVvZmwsclpQOCuusE X-Received: by 2002:a17:903:25d2:b0:1d9:a50f:9419 with SMTP id jc18-20020a17090325d200b001d9a50f9419mr6910162plb.40.1707736792205; Mon, 12 Feb 2024 03:19:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707736792; cv=pass; d=google.com; s=arc-20160816; b=UL4NeNiVNTp+FOeWwpWt1uTw9IQH+nPMWXZ7hc2/7kq3msXMUSwcy+jl487ovEiVwO zyhEuClXOlVhULctbFfPH7yh6bNUUoRspHmDoeDxlcMSEkJT00KW2yKirL4S0gRYR61C 0dPjNsCtBaEiq0snkbouk+3WepWMzvvshSR8ngv9d+fd/UaCCeHT6OWwK4SJCTIm85uD natvyloGXLkwLywK6FQOsnaCtNSXQChz8TIRqRp0O5SoLdOJFExwIv26fBfDMb1hWqWv Yzmz1K5Hy+jdoh4mzV7VTjudSIIOI4203+tmfZ6TkWlnpbilMv1ZZfAEo75/of7AjUe7 5kjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=uuDoudoProrECcrSc/qzc7Z7KGC++wbgL22g39nLLwg=; fh=w7+ZbFL06wewGB9qH7IMmUBsMdBGI53JopA8nCpEEJA=; b=p/qvQKzrYKwGL7M97V45WXjvJQhxFRsaHAUxIEmsReHKaA7sV5/p9vx1du2hhFOqmo K+BisieccNJst3yfhEzYuJ2PUgjswwyoAA4j+cr6SRrLzfegQxg1UjS0RCtEF2fI92I/ Hz+/EzZmgsNxTdhIU+zYBLh1/Os1j/QgKcEMvyDGE49dhS9QUebURY6UBxtLMQRHc+E9 DnBt5LxMJWETuDHdKLkzmyU3GpCD+IO1fPhQhhbpSeQ/szmIehhZostsKpS8aZzsH5rE k73tbIIHgwCjLDqo5HqqoWGKbucvnbITX8jjxEKPw+mhyYVGfx6Tsm6PwB3uiHu7clZB Msyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mRmTs1vE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61410-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCVtkMS4N1SgWAEO/oMihvP/BPyLG3Bw/6jpCgkUFnFzL67kiZP92Y9c64vv+gSO4YXFOIvH1WBAw8QiCdBiXT5DUzB90k4SjFVxRud51w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m17-20020a170902db1100b001d056bdad56si109161plx.166.2024.02.12.03.19.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:19:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61410-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mRmTs1vE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61410-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DBD69282E0A for ; Mon, 12 Feb 2024 11:19:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B53F338FA0; Mon, 12 Feb 2024 11:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mRmTs1vE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8AC32BAE7; Mon, 12 Feb 2024 11:19:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707736784; cv=none; b=U3hL1es0tlx+jz6IctTkiDsFCOkbJ5RJdDNZ3KRiUb2hGDoWO/qXogK3mTxkHjLB8+D58SGyUrwYMhh90GTKt0a5bJOsrIjtkuHu6e3DqTIJ60XQsYcRSK6JETLawoTfo4b9GH8l90CjRYfhxHwyr+/mPAMFwnopWVfmCDLnEP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707736784; c=relaxed/simple; bh=tWF0UWclQ/NoslADhYsN71fCn5aAl9tVNo99KfKidvQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Bf5KbAb2fdmjTjhZ3sO5X32P5YPNqIYEUDvj3wBqwzNj2LVaIWyhtYuSaSGG26AHTYLU+EvSp4xKUVV1CmbS9vD27zh1pQwOzKnLpO6tdZZniy8l3XJuJhN9NHpLaZRyuGP8vdkqymtGTmewcahhIY0FFxuePcKhgI0HECzb//g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mRmTs1vE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C47C0C433F1; Mon, 12 Feb 2024 11:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707736783; bh=tWF0UWclQ/NoslADhYsN71fCn5aAl9tVNo99KfKidvQ=; h=From:To:Cc:Subject:Date:From; b=mRmTs1vEJdlljNDjvZu6R0W1Wa3NOZ9ZwI+XspkWtO+1QTAq4wj8UV8GJc1smFBwC 6zFi06tclH1qtjP7G/h89Xp6dniA/CXx+GsnKK8j5FDWhE3V4RnWZZpgZxfd/GlRxO Xn54RVt6jB1K6X6QjY6FbdGwZttElmLriRplpPnGA3lSELh7hY20UixxevaX6a0ZYJ nRQ5phyfdHevnCJ5/Z4ZeOurZQvDyjmQx6a9+xLelK2evbl0q6yvhz/2RRg9xvGNdA rzPQkXOdw7OTOJqguy5CtpdyJ4T8fnKDpA1jOmMti3FbZ4uGlAOW0bslU+JYSe31UL BvwkwaAtXCRRA== From: Arnd Bergmann To: Andi Shyti Cc: Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , Hector Martin , Sven Peter , Alyssa Rosenzweig , Wolfram Sang , Olof Johansson , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH] i2c: pasemi: split driver into two separate modules Date: Mon, 12 Feb 2024 12:19:04 +0100 Message-Id: <20240212111933.963985-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann On powerpc, it is possible to compile test both the new apple (arm) and old pasemi (powerpc) drivers for the i2c hardware at the same time, which leads to a warning about linking the same object file twice: scripts/Makefile.build:244: drivers/i2c/busses/Makefile: i2c-pasemi-core.o is added to multiple modules: i2c-apple i2c-pasemi Rework the driver to have an explicit helper module, letting Kbuild take care of whether this should be built-in or a loadable driver. Fixes: 9bc5f4f660ff ("i2c: pasemi: Split pci driver to its own file") Signed-off-by: Arnd Bergmann --- drivers/i2c/busses/Makefile | 6 ++---- drivers/i2c/busses/i2c-pasemi-core.c | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index 3757b9391e60..aa0ee8ecd6f2 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -90,10 +90,8 @@ obj-$(CONFIG_I2C_NPCM) += i2c-npcm7xx.o obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o obj-$(CONFIG_I2C_OMAP) += i2c-omap.o obj-$(CONFIG_I2C_OWL) += i2c-owl.o -i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o -obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o -i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o -obj-$(CONFIG_I2C_APPLE) += i2c-apple.o +obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi-core.o i2c-pasemi-pci.o +obj-$(CONFIG_I2C_APPLE) += i2c-pasemi-core.o i2c-pasemi-platform.o obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o obj-$(CONFIG_I2C_PNX) += i2c-pnx.o obj-$(CONFIG_I2C_PXA) += i2c-pxa.o diff --git a/drivers/i2c/busses/i2c-pasemi-core.c b/drivers/i2c/busses/i2c-pasemi-core.c index 7d54a9f34c74..bd8becbdeeb2 100644 --- a/drivers/i2c/busses/i2c-pasemi-core.c +++ b/drivers/i2c/busses/i2c-pasemi-core.c @@ -369,6 +369,7 @@ int pasemi_i2c_common_probe(struct pasemi_smbus *smbus) return 0; } +EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe); irqreturn_t pasemi_irq_handler(int irq, void *dev_id) { @@ -378,3 +379,8 @@ irqreturn_t pasemi_irq_handler(int irq, void *dev_id) complete(&smbus->irq_completion); return IRQ_HANDLED; } +EXPORT_SYMBOL_GPL(pasemi_irq_handler); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Olof Johansson "); +MODULE_DESCRIPTION("PA Semi PWRficient SMBus driver"); -- 2.39.2