From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jorge Marques <jorge.marques@analog.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
gastmaier@gmail.com
Subject: Re: [PATCH] iio: accel: Change adxl345 depend to negate adxl35x
Date: Fri, 31 Oct 2025 12:13:39 +0200 [thread overview]
Message-ID: <aQSL0wCr56zr5Y35@smile.fi.intel.com> (raw)
In-Reply-To: <20251031-adxl345-allow-adxl34x-mod-v1-1-cd65749ba89c@analog.com>
On Fri, Oct 31, 2025 at 11:05:08AM +0100, Jorge Marques wrote:
> Change 'depends on INPUT_ADXL34X=n' to '!(INPUT_ADXL34X)' to allow both
> drivers to be compiled as modules. The user then can use the blacklist
> to block loading one.
> ---
> There are two drivers for the compatible:
>
> - adi,adxl345
>
> * IIO:
> drivers/iio/accel/adxl345_core.c
> drivers/iio/accel/adxl345_spi.c
> drivers/iio/accel/adxl345_i2c.c
> * Inputs:
> drivers/input/misc/adxl34x-spi.c
> drivers/input/misc/adxl34x-i2c.c
>
> To disallows both being complied, the depends INPUT_ADXL34X=n
> was added to ADXL345 symbols. However, it should be possible to compile
> both as modules, then blacklist one of them in the /etc/modprobe.d/blacklist.conf
> file. This patch changes the rule to !(INPUT_ADXL34X) to allow both as
> modules, but still disallow INPUT_ADXL34X to be built-in and ADXL345 as
> module.
>
> The following compatibles are not shared between both drivers:
>
> * IIO:
> adi,adxl375 spi/i2c
> * Inputs:
> adi,adxl34x i2c
I like the idea, but I think this needs to be clearly stated in the Kconfig
help for both symbols. So user will _know_ that in such a case it's their
responsibility of properly made choice. On top of that you might want to
investigate existing DTS in the kernel and see if some of the choices may be
made at the platform / CPU level.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-10-31 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 10:05 Jorge Marques
2025-10-31 10:13 ` Andy Shevchenko [this message]
2025-11-12 21:37 ` Jorge Marques
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=aQSL0wCr56zr5Y35@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gastmaier@gmail.com \
--cc=jic23@kernel.org \
--cc=jorge.marques@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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
all inboxes | Powered by JetHome®