[PATCH 04/13] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig

Javier Carrasco posted 13 patches 1 month, 3 weeks ago
[PATCH 04/13] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Posted by Javier Carrasco 1 month, 3 weeks ago
This driver makes use of triggered buffers, but does not select the
required modules.

Fixes: 2a86487786b5 ("iio: adc: ti-ads8688: add trigger and buffer support")
Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 drivers/iio/adc/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 45872a4e2acf..e6be1f1ec79f 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -1483,6 +1483,8 @@ config TI_ADS8344
 config TI_ADS8688
 	tristate "Texas Instruments ADS8688"
 	depends on SPI
+	select IIO_BUFFER
+	select IIO_TRIGGERED_BUFFER
 	help
 	  If you say yes here you get support for Texas Instruments ADS8684 and
 	  and ADS8688 ADC chips

-- 
2.43.0
Re: [PATCH 04/13] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Posted by Jonathan Cameron 1 month, 3 weeks ago
On Thu, 03 Oct 2024 23:04:50 +0200
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:

> This driver makes use of triggered buffers, but does not select the
> required modules.
> 
> Fixes: 2a86487786b5 ("iio: adc: ti-ads8688: add trigger and buffer support")
> Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.
Fixes tag must be part of the tag block.

Also this one looks to be a false positive. The driver includes
buffer.h but doesn't actually have buffered support.

> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  drivers/iio/adc/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 45872a4e2acf..e6be1f1ec79f 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -1483,6 +1483,8 @@ config TI_ADS8344
>  config TI_ADS8688
>  	tristate "Texas Instruments ADS8688"
>  	depends on SPI
> +	select IIO_BUFFER
> +	select IIO_TRIGGERED_BUFFER
>  	help
>  	  If you say yes here you get support for Texas Instruments ADS8684 and
>  	  and ADS8688 ADC chips
>
Re: [PATCH 04/13] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Posted by Javier Carrasco 1 month, 3 weeks ago
On 05/10/2024 19:40, Jonathan Cameron wrote:
> On Thu, 03 Oct 2024 23:04:50 +0200
> Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> 
>> This driver makes use of triggered buffers, but does not select the
>> required modules.
>>
>> Fixes: 2a86487786b5 ("iio: adc: ti-ads8688: add trigger and buffer support")
>> Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.
> Fixes tag must be part of the tag block.
> 
> Also this one looks to be a false positive. The driver includes
> buffer.h but doesn't actually have buffered support.
> 

Are you sure? These are the errors I get when I compile the ti-ads8688.c:

ld: drivers/iio/adc/ti-ads8688.o: in function `ads8688_probe':
ti-ads8688.c:(.text+0x1cf): undefined reference to
`devm_iio_triggered_buffer_setup_ext'
ld: drivers/iio/adc/ti-ads8688.o: in function `ads8688_trigger_handler':
ti-ads8688.c:(.text+0x3be): undefined reference to `iio_push_to_buffers'
ld: ti-ads8688.c:(.text+0x3c9): undefined reference to
`iio_trigger_notify_done'
make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
make[1]: *** [/home/jc/pw/linux/linux-next/Makefile:1173: vmlinux] Error 2
make: *** [Makefile:224: __sub-make] Error 2

And I see the offending functions in its code. Am I missing something
here or are we talking about different drivers?

>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>> ---
>>  drivers/iio/adc/Kconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
>> index 45872a4e2acf..e6be1f1ec79f 100644
>> --- a/drivers/iio/adc/Kconfig
>> +++ b/drivers/iio/adc/Kconfig
>> @@ -1483,6 +1483,8 @@ config TI_ADS8344
>>  config TI_ADS8688
>>  	tristate "Texas Instruments ADS8688"
>>  	depends on SPI
>> +	select IIO_BUFFER
>> +	select IIO_TRIGGERED_BUFFER
>>  	help
>>  	  If you say yes here you get support for Texas Instruments ADS8684 and
>>  	  and ADS8688 ADC chips
>>
>
Re: [PATCH 04/13] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Posted by Jonathan Cameron 1 month, 2 weeks ago
On Sat, 5 Oct 2024 20:21:06 +0200
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:

> On 05/10/2024 19:40, Jonathan Cameron wrote:
> > On Thu, 03 Oct 2024 23:04:50 +0200
> > Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> >   
> >> This driver makes use of triggered buffers, but does not select the
> >> required modules.
> >>
> >> Fixes: 2a86487786b5 ("iio: adc: ti-ads8688: add trigger and buffer support")
> >> Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.  
> > Fixes tag must be part of the tag block.
> > 
> > Also this one looks to be a false positive. The driver includes
> > buffer.h but doesn't actually have buffered support.
> >   
> 
> Are you sure? These are the errors I get when I compile the ti-ads8688.c:
> 
> ld: drivers/iio/adc/ti-ads8688.o: in function `ads8688_probe':
> ti-ads8688.c:(.text+0x1cf): undefined reference to
> `devm_iio_triggered_buffer_setup_ext'
> ld: drivers/iio/adc/ti-ads8688.o: in function `ads8688_trigger_handler':
> ti-ads8688.c:(.text+0x3be): undefined reference to `iio_push_to_buffers'
> ld: ti-ads8688.c:(.text+0x3c9): undefined reference to
> `iio_trigger_notify_done'
> make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
> make[1]: *** [/home/jc/pw/linux/linux-next/Makefile:1173: vmlinux] Error 2
> make: *** [Makefile:224: __sub-make] Error 2
> 
> And I see the offending functions in its code. Am I missing something
> here or are we talking about different drivers?
Miss read by me.  I picked up on the 8344 in diff.
That does have a spurious include so I stopped looking closer!

Anyhow, now applied to the fixes-togreg branch of iio.git and
marked for stable.

Sorry about that!

Thanks,

Jonathan

> 
> >>
> >> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> >> ---
> >>  drivers/iio/adc/Kconfig | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> >> index 45872a4e2acf..e6be1f1ec79f 100644
> >> --- a/drivers/iio/adc/Kconfig
> >> +++ b/drivers/iio/adc/Kconfig
> >> @@ -1483,6 +1483,8 @@ config TI_ADS8344
> >>  config TI_ADS8688
> >>  	tristate "Texas Instruments ADS8688"
> >>  	depends on SPI
> >> +	select IIO_BUFFER
> >> +	select IIO_TRIGGERED_BUFFER
> >>  	help
> >>  	  If you say yes here you get support for Texas Instruments ADS8684 and
> >>  	  and ADS8688 ADC chips
> >>  
> >   
>
Re: [PATCH 04/13] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
Posted by Sean Nyekjaer 1 month, 3 weeks ago
On Thu, Oct 03, 2024 at 11:04:50PM UTC, Javier Carrasco wrote:
> This driver makes use of triggered buffers, but does not select the
> required modules.
> 
> Fixes: 2a86487786b5 ("iio: adc: ti-ads8688: add trigger and buffer support")
> Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: Sean Nyekjaer <sean@geanix.com>
> ---
>  drivers/iio/adc/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 45872a4e2acf..e6be1f1ec79f 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -1483,6 +1483,8 @@ config TI_ADS8344
>  config TI_ADS8688
>  	tristate "Texas Instruments ADS8688"
>  	depends on SPI
> +	select IIO_BUFFER
> +	select IIO_TRIGGERED_BUFFER
>  	help
>  	  If you say yes here you get support for Texas Instruments ADS8684 and
>  	  and ADS8688 ADC chips
> 
> -- 
> 2.43.0
>