linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: ak8975: fix AK09911 dependencies
@ 2015-01-28 13:58 Arnd Bergmann
  2015-02-04 17:32 ` Jonathan Cameron
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-01-28 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

ak8975 depends on I2C and GPIOLIB, so any symbols that selects
ak8975 must have the same dependency, or we get build errors:

drivers/iio/magnetometer/ak8975.c: In function 'ak8975_who_i_am':
drivers/iio/magnetometer/ak8975.c:393:2: error: implicit declaration of function 'i2c_smbus_read_i2c_block_data' [-Werror=implicit-function-declaration]
  ret = i2c_smbus_read_i2c_block_data(client, AK09912_REG_WIA1,
  ^
drivers/iio/magnetometer/ak8975.c: In function 'ak8975_set_mode':
drivers/iio/magnetometer/ak8975.c:431:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration]
  ret = i2c_smbus_write_byte_data(data->client,

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 57e73a423b1e85 ("iio: ak8975: add ak09911 and ak09912 support")
---
I found this recent regression doing ARM randconfig builds, please apply

diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
index 4c7a4c52dd06..a5d6de72c523 100644
--- a/drivers/iio/magnetometer/Kconfig
+++ b/drivers/iio/magnetometer/Kconfig
@@ -18,6 +18,8 @@ config AK8975
 
 config AK09911
 	tristate "Asahi Kasei AK09911 3-axis Compass"
+	depends on I2C
+	depends on GPIOLIB
 	select AK8975
 	help
 	  Deprecated: AK09911 is now supported by AK8975 driver.

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] iio: ak8975: fix AK09911 dependencies
  2015-01-28 13:58 [PATCH] iio: ak8975: fix AK09911 dependencies Arnd Bergmann
@ 2015-02-04 17:32 ` Jonathan Cameron
  2015-02-28 11:34 ` Jonathan Cameron
  2015-03-09 10:27 ` Geert Uytterhoeven
  2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2015-02-04 17:32 UTC (permalink / raw)
  To: linux-arm-kernel

On 28/01/15 13:58, Arnd Bergmann wrote:
> ak8975 depends on I2C and GPIOLIB, so any symbols that selects
> ak8975 must have the same dependency, or we get build errors:
> 
> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_who_i_am':
> drivers/iio/magnetometer/ak8975.c:393:2: error: implicit declaration of function 'i2c_smbus_read_i2c_block_data' [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_i2c_block_data(client, AK09912_REG_WIA1,
>   ^
> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_set_mode':
> drivers/iio/magnetometer/ak8975.c:431:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_write_byte_data(data->client,
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 57e73a423b1e85 ("iio: ak8975: add ak09911 and ak09912 support")
Sorry, I failed to register this was present in the linux-next tree rather than mainline
where at least the i2c dependency is present).  Given timing, will have to wait until
after the merge windows to send this now (last pull request for the merge has gone
to Greg)

Will fixup in a couple of weeks,

Jonathan
> ---
> I found this recent regression doing ARM randconfig builds, please apply
> 
> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
> index 4c7a4c52dd06..a5d6de72c523 100644
> --- a/drivers/iio/magnetometer/Kconfig
> +++ b/drivers/iio/magnetometer/Kconfig
> @@ -18,6 +18,8 @@ config AK8975
>  
>  config AK09911
>  	tristate "Asahi Kasei AK09911 3-axis Compass"
> +	depends on I2C
> +	depends on GPIOLIB
>  	select AK8975
>  	help
>  	  Deprecated: AK09911 is now supported by AK8975 driver.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] iio: ak8975: fix AK09911 dependencies
  2015-01-28 13:58 [PATCH] iio: ak8975: fix AK09911 dependencies Arnd Bergmann
  2015-02-04 17:32 ` Jonathan Cameron
@ 2015-02-28 11:34 ` Jonathan Cameron
  2015-03-09 10:27 ` Geert Uytterhoeven
  2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2015-02-28 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 28/01/15 13:58, Arnd Bergmann wrote:
> ak8975 depends on I2C and GPIOLIB, so any symbols that selects
> ak8975 must have the same dependency, or we get build errors:
> 
> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_who_i_am':
> drivers/iio/magnetometer/ak8975.c:393:2: error: implicit declaration of function 'i2c_smbus_read_i2c_block_data' [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_i2c_block_data(client, AK09912_REG_WIA1,
>   ^
> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_set_mode':
> drivers/iio/magnetometer/ak8975.c:431:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_write_byte_data(data->client,
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 57e73a423b1e85 ("iio: ak8975: add ak09911 and ak09912 support")
Now applied and pull request sent.
> ---
> I found this recent regression doing ARM randconfig builds, please apply
> 
> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
> index 4c7a4c52dd06..a5d6de72c523 100644
> --- a/drivers/iio/magnetometer/Kconfig
> +++ b/drivers/iio/magnetometer/Kconfig
> @@ -18,6 +18,8 @@ config AK8975
>  
>  config AK09911
>  	tristate "Asahi Kasei AK09911 3-axis Compass"
> +	depends on I2C
> +	depends on GPIOLIB
>  	select AK8975
>  	help
>  	  Deprecated: AK09911 is now supported by AK8975 driver.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] iio: ak8975: fix AK09911 dependencies
  2015-01-28 13:58 [PATCH] iio: ak8975: fix AK09911 dependencies Arnd Bergmann
  2015-02-04 17:32 ` Jonathan Cameron
  2015-02-28 11:34 ` Jonathan Cameron
@ 2015-03-09 10:27 ` Geert Uytterhoeven
  2015-03-09 10:50   ` Jonathan Cameron
  2 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2015-03-09 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

On Wed, Jan 28, 2015 at 2:58 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> ak8975 depends on I2C and GPIOLIB, so any symbols that selects
> ak8975 must have the same dependency, or we get build errors:
>
> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_who_i_am':
> drivers/iio/magnetometer/ak8975.c:393:2: error: implicit declaration of function 'i2c_smbus_read_i2c_block_data' [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_i2c_block_data(client, AK09912_REG_WIA1,
>   ^
> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_set_mode':
> drivers/iio/magnetometer/ak8975.c:431:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_write_byte_data(data->client,
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 57e73a423b1e85 ("iio: ak8975: add ak09911 and ak09912 support")
> ---
> I found this recent regression doing ARM randconfig builds, please apply
>
> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
> index 4c7a4c52dd06..a5d6de72c523 100644
> --- a/drivers/iio/magnetometer/Kconfig
> +++ b/drivers/iio/magnetometer/Kconfig
> @@ -18,6 +18,8 @@ config AK8975
>
>  config AK09911
>         tristate "Asahi Kasei AK09911 3-axis Compass"
> +       depends on I2C
> +       depends on GPIOLIB
>         select AK8975
>         help
>           Deprecated: AK09911 is now supported by AK8975 driver.

I just saw the AK8975/AK09911 config options disappear for a v4.0-rc3 m68k
allmodconfig kernel. Apparently it built fine with !GPIOLIB before, as many
gpiolib (consumer) functions have dummies for the !GPIOLIB case.

So I think the GPIOLIB dependency can be relaxed to "GPIOLIB || COMPILE_TEST".
The same may be true for many other GPIOLIB consumer drivers.
Will look into it and send patches...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] iio: ak8975: fix AK09911 dependencies
  2015-03-09 10:27 ` Geert Uytterhoeven
@ 2015-03-09 10:50   ` Jonathan Cameron
  2015-03-09 20:05     ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2015-03-09 10:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/03/15 10:27, Geert Uytterhoeven wrote:
> Hi Arnd,
> 
> On Wed, Jan 28, 2015 at 2:58 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> ak8975 depends on I2C and GPIOLIB, so any symbols that selects
>> ak8975 must have the same dependency, or we get build errors:
>>
>> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_who_i_am':
>> drivers/iio/magnetometer/ak8975.c:393:2: error: implicit declaration of function 'i2c_smbus_read_i2c_block_data' [-Werror=implicit-function-declaration]
>>   ret = i2c_smbus_read_i2c_block_data(client, AK09912_REG_WIA1,
>>   ^
>> drivers/iio/magnetometer/ak8975.c: In function 'ak8975_set_mode':
>> drivers/iio/magnetometer/ak8975.c:431:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration]
>>   ret = i2c_smbus_write_byte_data(data->client,
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: 57e73a423b1e85 ("iio: ak8975: add ak09911 and ak09912 support")
>> ---
>> I found this recent regression doing ARM randconfig builds, please apply
>>
>> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
>> index 4c7a4c52dd06..a5d6de72c523 100644
>> --- a/drivers/iio/magnetometer/Kconfig
>> +++ b/drivers/iio/magnetometer/Kconfig
>> @@ -18,6 +18,8 @@ config AK8975
>>
>>  config AK09911
>>         tristate "Asahi Kasei AK09911 3-axis Compass"
>> +       depends on I2C
>> +       depends on GPIOLIB
>>         select AK8975
>>         help
>>           Deprecated: AK09911 is now supported by AK8975 driver.
> 
> I just saw the AK8975/AK09911 config options disappear for a v4.0-rc3 m68k
> allmodconfig kernel. Apparently it built fine with !GPIOLIB before, as many
> gpiolib (consumer) functions have dummies for the !GPIOLIB case.
> 
> So I think the GPIOLIB dependency can be relaxed to "GPIOLIB || COMPILE_TEST".
> The same may be true for many other GPIOLIB consumer drivers.
> Will look into it and send patches...
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
Sounds likely and would be great to increase build coverage on these if we can.

Jonathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] iio: ak8975: fix AK09911 dependencies
  2015-03-09 10:50   ` Jonathan Cameron
@ 2015-03-09 20:05     ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-03-09 20:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 09 March 2015 10:50:26 Jonathan Cameron wrote:
> >> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
> >> index 4c7a4c52dd06..a5d6de72c523 100644
> >> --- a/drivers/iio/magnetometer/Kconfig
> >> +++ b/drivers/iio/magnetometer/Kconfig
> >> @@ -18,6 +18,8 @@ config AK8975
> >>
> >>  config AK09911
> >>         tristate "Asahi Kasei AK09911 3-axis Compass"
> >> +       depends on I2C
> >> +       depends on GPIOLIB
> >>         select AK8975
> >>         help
> >>           Deprecated: AK09911 is now supported by AK8975 driver.
> > 
> > I just saw the AK8975/AK09911 config options disappear for a v4.0-rc3 m68k
> > allmodconfig kernel. Apparently it built fine with !GPIOLIB before, as many
> > gpiolib (consumer) functions have dummies for the !GPIOLIB case.
> > 
> > So I think the GPIOLIB dependency can be relaxed to "GPIOLIB || COMPILE_TEST".
> > The same may be true for many other GPIOLIB consumer drivers.
> > Will look into it and send patches...

The reason for this dependency is the 'select AK8975', which causes a Kconfig
warning if GPIOLIB is disabled. I do not see an actual dependency on gpiolib
in the ak8975 driver, but relaxing this means we have to remove the dependency
for both of them together, not just for AK09911.

	Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-09 20:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 13:58 [PATCH] iio: ak8975: fix AK09911 dependencies Arnd Bergmann
2015-02-04 17:32 ` Jonathan Cameron
2015-02-28 11:34 ` Jonathan Cameron
2015-03-09 10:27 ` Geert Uytterhoeven
2015-03-09 10:50   ` Jonathan Cameron
2015-03-09 20:05     ` Arnd Bergmann

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).