Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: imu: bno055: serdev requires REGMAP
@ 2024-01-10 18:56 Randy Dunlap
  2024-01-13 16:26 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2024-01-10 18:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Andrea Merello, Jonathan Cameron,
	Lars-Peter Clausen, linux-iio

There are a ton of build errors when REGMAP is not set, so select
REGMAP to fix all of them.

Examples (not all of them):

../drivers/iio/imu/bno055/bno055_ser_core.c:495:15: error: variable 'bno055_ser_regmap_bus' has initializer but incomplete type
  495 | static struct regmap_bus bno055_ser_regmap_bus = {
../drivers/iio/imu/bno055/bno055_ser_core.c:496:10: error: 'struct regmap_bus' has no member named 'write'
  496 |         .write = bno055_ser_write_reg,
../drivers/iio/imu/bno055/bno055_ser_core.c:497:10: error: 'struct regmap_bus' has no member named 'read'
  497 |         .read = bno055_ser_read_reg,
../drivers/iio/imu/bno055/bno055_ser_core.c: In function 'bno055_ser_probe':
../drivers/iio/imu/bno055/bno055_ser_core.c:532:18: error: implicit declaration of function 'devm_regmap_init'; did you mean 'vmem_map_init'? [-Werror=implicit-function-declaration]
  532 |         regmap = devm_regmap_init(&serdev->dev, &bno055_ser_regmap_bus,
../drivers/iio/imu/bno055/bno055_ser_core.c:532:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  532 |         regmap = devm_regmap_init(&serdev->dev, &bno055_ser_regmap_bus,
../drivers/iio/imu/bno055/bno055_ser_core.c: At top level:
../drivers/iio/imu/bno055/bno055_ser_core.c:495:26: error: storage size of 'bno055_ser_regmap_bus' isn't known
  495 | static struct regmap_bus bno055_ser_regmap_bus = {

Fixes: 2eef5a9cc643 ("iio: imu: add BNO055 serdev driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrea Merello <andrea.merello@iit.it>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
---
 drivers/iio/imu/bno055/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -- a/drivers/iio/imu/bno055/Kconfig b/drivers/iio/imu/bno055/Kconfig
--- a/drivers/iio/imu/bno055/Kconfig
+++ b/drivers/iio/imu/bno055/Kconfig
@@ -8,6 +8,7 @@ config BOSCH_BNO055
 config BOSCH_BNO055_SERIAL
 	tristate "Bosch BNO055 attached via UART"
 	depends on SERIAL_DEV_BUS
+	select REGMAP
 	select BOSCH_BNO055
 	help
 	  Enable this to support Bosch BNO055 IMUs attached via UART.

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

* Re: [PATCH] iio: imu: bno055: serdev requires REGMAP
  2024-01-10 18:56 [PATCH] iio: imu: bno055: serdev requires REGMAP Randy Dunlap
@ 2024-01-13 16:26 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2024-01-13 16:26 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, Andrea Merello, Lars-Peter Clausen, linux-iio

On Wed, 10 Jan 2024 10:56:11 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:

> There are a ton of build errors when REGMAP is not set, so select
> REGMAP to fix all of them.
> 
> Examples (not all of them):
> 
> ../drivers/iio/imu/bno055/bno055_ser_core.c:495:15: error: variable 'bno055_ser_regmap_bus' has initializer but incomplete type
>   495 | static struct regmap_bus bno055_ser_regmap_bus = {
> ../drivers/iio/imu/bno055/bno055_ser_core.c:496:10: error: 'struct regmap_bus' has no member named 'write'
>   496 |         .write = bno055_ser_write_reg,
> ../drivers/iio/imu/bno055/bno055_ser_core.c:497:10: error: 'struct regmap_bus' has no member named 'read'
>   497 |         .read = bno055_ser_read_reg,
> ../drivers/iio/imu/bno055/bno055_ser_core.c: In function 'bno055_ser_probe':
> ../drivers/iio/imu/bno055/bno055_ser_core.c:532:18: error: implicit declaration of function 'devm_regmap_init'; did you mean 'vmem_map_init'? [-Werror=implicit-function-declaration]
>   532 |         regmap = devm_regmap_init(&serdev->dev, &bno055_ser_regmap_bus,
> ../drivers/iio/imu/bno055/bno055_ser_core.c:532:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>   532 |         regmap = devm_regmap_init(&serdev->dev, &bno055_ser_regmap_bus,
> ../drivers/iio/imu/bno055/bno055_ser_core.c: At top level:
> ../drivers/iio/imu/bno055/bno055_ser_core.c:495:26: error: storage size of 'bno055_ser_regmap_bus' isn't known
>   495 | static struct regmap_bus bno055_ser_regmap_bus = {
> 
> Fixes: 2eef5a9cc643 ("iio: imu: add BNO055 serdev driver")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Andrea Merello <andrea.merello@iit.it>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: linux-iio@vger.kernel.org
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,
Jonathan

> ---
>  drivers/iio/imu/bno055/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -- a/drivers/iio/imu/bno055/Kconfig b/drivers/iio/imu/bno055/Kconfig
> --- a/drivers/iio/imu/bno055/Kconfig
> +++ b/drivers/iio/imu/bno055/Kconfig
> @@ -8,6 +8,7 @@ config BOSCH_BNO055
>  config BOSCH_BNO055_SERIAL
>  	tristate "Bosch BNO055 attached via UART"
>  	depends on SERIAL_DEV_BUS
> +	select REGMAP
>  	select BOSCH_BNO055
>  	help
>  	  Enable this to support Bosch BNO055 IMUs attached via UART.


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

end of thread, other threads:[~2024-01-13 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 18:56 [PATCH] iio: imu: bno055: serdev requires REGMAP Randy Dunlap
2024-01-13 16:26 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox