* [PATCH] iio: accel: fix Kconfig warning
@ 2017-01-20 9:46 Linus Walleij
2017-01-20 9:59 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2017-01-20 9:46 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio, Greg KH; +Cc: Linus Walleij
commit 762227721fe6225be5b6d233ef681aea5871f5f3
"iio: accel: st_accel: handle deprecated bindings"
attempted to be smart and let users use the old I2C
driver and the new SPI driver, or the old SPI driver and
the new I2C driver in combination for the LIS3LV02,
and put the restrictions on the I2C and SPI subdrivers
not not be combined with the old subdrivers.
This doesn't work since the IIO ST accel top-level
component selects the I2C and SPI subdrivers, resulting
in the following Kconfig noise:
warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_I2C_3AXIS
which has unmet direct dependencies (IIO && !SENSORS_LIS3_I2C
&& IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_I2C)
warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_SPI_3AXIS
which has unmet direct dependencies (IIO && !SENSORS_LIS3_SPI
&& IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_SPI)
(...)
This fixes the issue by putting the dependencies directly
in the top-level component instead, so that it never gets
to select its unselectable subcomponent.
Cc: Greg KH <greg@kroah.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Fixes: 762227721fe6 ("iio: accel: st_accel: handle deprecated bindings")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
I guess Greg can apply the patch directly to quickly get
rid of the Kconfig noise, else Jonathan can funnel it as
a fix.
---
drivers/iio/accel/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
index ea295fe0f561..ef8401ac1141 100644
--- a/drivers/iio/accel/Kconfig
+++ b/drivers/iio/accel/Kconfig
@@ -120,6 +120,8 @@ config HID_SENSOR_ACCEL_3D
config IIO_ST_ACCEL_3AXIS
tristate "STMicroelectronics accelerometers 3-Axis Driver"
depends on (I2C || SPI_MASTER) && SYSFS
+ depends on !SENSORS_LIS3_I2C
+ depends on !SENSORS_LIS3_SPI
select IIO_ST_SENSORS_CORE
select IIO_ST_ACCEL_I2C_3AXIS if (I2C)
select IIO_ST_ACCEL_SPI_3AXIS if (SPI_MASTER)
@@ -140,13 +142,11 @@ config IIO_ST_ACCEL_3AXIS
config IIO_ST_ACCEL_I2C_3AXIS
tristate
- depends on !SENSORS_LIS3_I2C
depends on IIO_ST_ACCEL_3AXIS
depends on IIO_ST_SENSORS_I2C
config IIO_ST_ACCEL_SPI_3AXIS
tristate
- depends on !SENSORS_LIS3_SPI
depends on IIO_ST_ACCEL_3AXIS
depends on IIO_ST_SENSORS_SPI
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: accel: fix Kconfig warning
2017-01-20 9:46 [PATCH] iio: accel: fix Kconfig warning Linus Walleij
@ 2017-01-20 9:59 ` Greg KH
2017-01-20 17:23 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2017-01-20 9:59 UTC (permalink / raw)
To: Linus Walleij; +Cc: Jonathan Cameron, linux-iio
On Fri, Jan 20, 2017 at 10:46:05AM +0100, Linus Walleij wrote:
> commit 762227721fe6225be5b6d233ef681aea5871f5f3
> "iio: accel: st_accel: handle deprecated bindings"
> attempted to be smart and let users use the old I2C
> driver and the new SPI driver, or the old SPI driver and
> the new I2C driver in combination for the LIS3LV02,
> and put the restrictions on the I2C and SPI subdrivers
> not not be combined with the old subdrivers.
>
> This doesn't work since the IIO ST accel top-level
> component selects the I2C and SPI subdrivers, resulting
> in the following Kconfig noise:
>
> warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_I2C_3AXIS
> which has unmet direct dependencies (IIO && !SENSORS_LIS3_I2C
> && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_I2C)
> warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_SPI_3AXIS
> which has unmet direct dependencies (IIO && !SENSORS_LIS3_SPI
> && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_SPI)
> (...)
>
> This fixes the issue by putting the dependencies directly
> in the top-level component instead, so that it never gets
> to select its unselectable subcomponent.
>
> Cc: Greg KH <greg@kroah.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Fixes: 762227721fe6 ("iio: accel: st_accel: handle deprecated bindings")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> I guess Greg can apply the patch directly to quickly get
> rid of the Kconfig noise, else Jonathan can funnel it as
> a fix.
I'll be glad to take it if I can get an ack from Jonathan.
thanks for the quick response,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: accel: fix Kconfig warning
2017-01-20 9:59 ` Greg KH
@ 2017-01-20 17:23 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2017-01-20 17:23 UTC (permalink / raw)
To: Greg KH, Linus Walleij; +Cc: Jonathan Cameron, linux-iio
On 20 January 2017 09:59:52 GMT+00:00, Greg KH <greg@kroah.com> wrote:
>On Fri, Jan 20, 2017 at 10:46:05AM +0100, Linus Walleij wrote:
>> commit 762227721fe6225be5b6d233ef681aea5871f5f3
>> "iio: accel: st_accel: handle deprecated bindings"
>> attempted to be smart and let users use the old I2C
>> driver and the new SPI driver, or the old SPI driver and
>> the new I2C driver in combination for the LIS3LV02,
>> and put the restrictions on the I2C and SPI subdrivers
>> not not be combined with the old subdrivers.
>>
>> This doesn't work since the IIO ST accel top-level
>> component selects the I2C and SPI subdrivers, resulting
>> in the following Kconfig noise:
>>
>> warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_I2C_3AXIS
>> which has unmet direct dependencies (IIO && !SENSORS_LIS3_I2C
>> && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_I2C)
>> warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_SPI_3AXIS
>> which has unmet direct dependencies (IIO && !SENSORS_LIS3_SPI
>> && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_SPI)
>> (...)
>>
>> This fixes the issue by putting the dependencies directly
>> in the top-level component instead, so that it never gets
>> to select its unselectable subcomponent.
>>
>> Cc: Greg KH <greg@kroah.com>
>> Cc: Jonathan Cameron <jic23@kernel.org>
>> Fixes: 762227721fe6 ("iio: accel: st_accel: handle deprecated
>bindings")
>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> I guess Greg can apply the patch directly to quickly get
>> rid of the Kconfig noise, else Jonathan can funnel it as
>> a fix.
>
>I'll be glad to take it if I can get an ack from Jonathan.
Acked-by: Jonathan Cameron <jic23@kernel.org>. Thanks
>
>thanks for the quick response,
>
>greg k-h
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-20 17:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20 9:46 [PATCH] iio: accel: fix Kconfig warning Linus Walleij
2017-01-20 9:59 ` Greg KH
2017-01-20 17:23 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).