From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <hdegoede@redhat.com>
Cc: <platform-driver-x86@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH] platform/x86: serial-multi-instantiate: Don't require both I2C and SPI
Date: Wed, 14 Aug 2024 14:13:05 +0100 [thread overview]
Message-ID: <155bcc8e-3c53-4554-b359-be7628e4b302@opensource.cirrus.com> (raw)
In-Reply-To: <20240813112105.21218-1-rf@opensource.cirrus.com>
On 13/08/2024 12:21, Richard Fitzgerald wrote:
> Change the Kconfig dependency to (I2C || SPI) so that it doesn't
> require both bus subsystems to be enabled. Make a few small changes to
> the code so that the code for a bus is only called if the bus is being
> built.
>
> When SPI support was added to serial-multi-instantiate it created a
> dependency that both CONFIG_I2C and CONFIG_SPI must be enabled.
> Typically they are, but there's no reason why this should be a
> requirement. A specific kernel build could have only I2C devices or
> only SPI devices. It should be possible to use serial-multi-instantiate
> if only I2C or only SPI is enabled.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
> drivers/platform/x86/Kconfig | 2 +-
> .../platform/x86/serial-multi-instantiate.c | 32 ++++++++++++++-----
> 2 files changed, 25 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 665fa9524986..c286742b34ba 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -999,7 +999,7 @@ config TOPSTAR_LAPTOP
>
> config SERIAL_MULTI_INSTANTIATE
> tristate "Serial bus multi instantiate pseudo device driver"
> - depends on I2C && SPI && ACPI
> + depends on (I2C || SPI) && ACPI
Please don't take this version.
It works better as:
depends on ACPI
depends on (I2C && !SPI) || (!I2C && SPI) || (I2C && SPI)
so if I2C or SPI =m then SERIAL_MULTI_INSTANTIATE must be
built as a module.
I will send a V2 with that change.
prev parent reply other threads:[~2024-08-14 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 11:21 [PATCH] platform/x86: serial-multi-instantiate: Don't require both I2C and SPI Richard Fitzgerald
2024-08-14 13:13 ` Richard Fitzgerald [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=155bcc8e-3c53-4554-b359-be7628e4b302@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox