2022-03-18 08:26:42

by Wangshaobo (bobo)

[permalink] [raw]
Subject: [PATCH 0/2] admv8818 driver fixes

admv8818 driver fixes

Wang ShaoBo (2):
iio:filter:admv8818: Add depends on REGMAP
iio:filter:admv8818: Fix missing clk_disable_unprepare() in
admv8818_clk_setup

drivers/iio/filter/Kconfig | 2 +-
drivers/iio/filter/admv8818.c | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)

--
2.25.1


2022-03-18 12:48:29

by Wangshaobo (bobo)

[permalink] [raw]
Subject: [PATCH 1/2] iio:filter:admv8818: Add depends on REGMAP

Add "depends on REGMAP" to CONFIG_ADMV8818, because admv8818 driver
uses structure/symbols such as 'struct regmap_config' which are defined
only when CONFIG_REGMAP is set.

Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818")
Signed-off-by: Wang ShaoBo <[email protected]>
---
drivers/iio/filter/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/filter/Kconfig b/drivers/iio/filter/Kconfig
index 3ae35817ad82..4bbf10f8692c 100644
--- a/drivers/iio/filter/Kconfig
+++ b/drivers/iio/filter/Kconfig
@@ -7,7 +7,7 @@ menu "Filters"

config ADMV8818
tristate "Analog Devices ADMV8818 High-Pass and Low-Pass Filter"
- depends on SPI && COMMON_CLK && 64BIT
+ depends on REGMAP && SPI && COMMON_CLK && 64BIT
help
Say yes here to build support for Analog Devices ADMV8818
2 GHz to 18 GHz, Digitally Tunable, High-Pass and Low-Pass Filter.
--
2.25.1

2022-03-18 13:47:24

by Nuno Sa

[permalink] [raw]
Subject: RE: [PATCH 1/2] iio:filter:admv8818: Add depends on REGMAP

Hi Wang,

Thanks for the patch

> -----Original Message-----
> From: Wang ShaoBo <[email protected]>
> Sent: Friday, March 18, 2022 3:59 AM
> Cc: [email protected]; [email protected];
> [email protected]; Miclaus, Antoniu
> <[email protected]>; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]
> Subject: [PATCH 1/2] iio:filter:admv8818: Add depends on REGMAP
>
> [External]
>
> Add "depends on REGMAP" to CONFIG_ADMV8818, because
> admv8818 driver
> uses structure/symbols such as 'struct regmap_config' which are
> defined
> only when CONFIG_REGMAP is set.
>
> Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818")
> Signed-off-by: Wang ShaoBo <[email protected]>
> ---
> drivers/iio/filter/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/filter/Kconfig b/drivers/iio/filter/Kconfig
> index 3ae35817ad82..4bbf10f8692c 100644
> --- a/drivers/iio/filter/Kconfig
> +++ b/drivers/iio/filter/Kconfig
> @@ -7,7 +7,7 @@ menu "Filters"
>
> config ADMV8818
> tristate "Analog Devices ADMV8818 High-Pass and Low-Pass
> Filter"
> - depends on SPI && COMMON_CLK && 64BIT
> + depends on REGMAP && SPI && COMMON_CLK && 64BIT

I think the best way is to have select REGMAP_SPI. Hence:

depends on SPI && COMMON_CLK && 64BIT
select REGMAP_SPI

This will automatically default CONFIG_REGMAP to y. with your
patch, I guess we can still have issues with ' __devm_regmap_init_spi()'

- Nuno S?

2022-03-21 07:51:42

by Wangshaobo (bobo)

[permalink] [raw]
Subject: Re: [PATCH 1/2] iio:filter:admv8818: Add depends on REGMAP


?? 2022/3/18 16:45, Sa, Nuno ะด??:
> Hi Wang,
>
> Thanks for the patch
>
>> -----Original Message-----
>> From: Wang ShaoBo <[email protected]>
>> Sent: Friday, March 18, 2022 3:59 AM
>> Cc: [email protected]; [email protected];
>> [email protected]; Miclaus, Antoniu
>> <[email protected]>; [email protected]; linux-
>> [email protected]; [email protected];
>> [email protected]
>> Subject: [PATCH 1/2] iio:filter:admv8818: Add depends on REGMAP
>>
>> [External]
>>
>> Add "depends on REGMAP" to CONFIG_ADMV8818, because
>> admv8818 driver
>> uses structure/symbols such as 'struct regmap_config' which are
>> defined
>> only when CONFIG_REGMAP is set.
>>
>> Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818")
>> Signed-off-by: Wang ShaoBo <[email protected]>
>> ---
>> drivers/iio/filter/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/filter/Kconfig b/drivers/iio/filter/Kconfig
>> index 3ae35817ad82..4bbf10f8692c 100644
>> --- a/drivers/iio/filter/Kconfig
>> +++ b/drivers/iio/filter/Kconfig
>> @@ -7,7 +7,7 @@ menu "Filters"
>>
>> config ADMV8818
>> tristate "Analog Devices ADMV8818 High-Pass and Low-Pass
>> Filter"
>> - depends on SPI && COMMON_CLK && 64BIT
>> + depends on REGMAP && SPI && COMMON_CLK && 64BIT
> I think the best way is to have select REGMAP_SPI. Hence:
>
> depends on SPI && COMMON_CLK && 64BIT
> select REGMAP_SPI
>
> This will automatically default CONFIG_REGMAP to y. with your
> patch, I guess we can still have issues with ' __devm_regmap_init_spi()'
>
> - Nuno S??
> .

Yes, only set REGMAP but REGMAP_SPI may causing __devm_regmap_init_spi
undeined.

-- wangshaobo