diff mbox series

[1/8] pinctrl: qcom: qdf2xxx: drop ACPI_PTR

Message ID 20230601152026.1182648-1-krzysztof.kozlowski@linaro.org
State Accepted
Commit 1c4aac1739bab13a0eacb7518bf1848bfb9c13bc
Headers show
Series [1/8] pinctrl: qcom: qdf2xxx: drop ACPI_PTR | expand

Commit Message

Krzysztof Kozlowski June 1, 2023, 3:20 p.m. UTC
Driver can bind only via ACPI matching and acpi_device_id is there
unconditionally, so drop useless ACPI_PTR() macro.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konrad Dybcio June 2, 2023, 9:03 a.m. UTC | #1
On 1.06.2023 17:20, Krzysztof Kozlowski wrote:
> PINCTRL_MSM depends on GPIOLIB, thus individual driver entries depending
> on the first do not have to depend on the latter.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/pinctrl/qcom/Kconfig | 22 ++++++++--------------
>  1 file changed, 8 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/Kconfig b/drivers/pinctrl/qcom/Kconfig
> index b03a62ecdc07..2236bdff7e60 100644
> --- a/drivers/pinctrl/qcom/Kconfig
> +++ b/drivers/pinctrl/qcom/Kconfig
> @@ -121,7 +121,7 @@ config PINCTRL_MSM8960
>  
>  config PINCTRL_MDM9607
>  	tristate "Qualcomm 9607 pin controller driver"
> -	depends on GPIOLIB && OF
> +	depends on OF
>  	depends on PINCTRL_MSM
>  	help
>  	  This is the pinctrl, pinmux, pinconf and gpiolib driver for the
> @@ -271,7 +271,7 @@ config PINCTRL_QCOM_SSBI_PMIC
>  
>  config PINCTRL_QDU1000
>  	tristate "Qualcomm Technologies Inc QDU1000/QRU1000 pin controller driver"
> -	depends on GPIOLIB && OF
> +	depends on OF
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_MSM
>  	help
> @@ -310,7 +310,6 @@ config PINCTRL_SC7280
>  
>  config PINCTRL_SC7280_LPASS_LPI
>  	tristate "Qualcomm Technologies Inc SC7280 LPASS LPI pin controller driver"
> -	depends on GPIOLIB
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_LPASS_LPI
>  	help
> @@ -380,7 +379,7 @@ config PINCTRL_SDX55
>  
>  config PINCTRL_SDX65
>          tristate "Qualcomm Technologies Inc SDX65 pin controller driver"
> -        depends on GPIOLIB && OF
> +        depends on OF
>          depends on ARM || COMPILE_TEST
>          depends on PINCTRL_MSM
>          help
> @@ -390,7 +389,7 @@ config PINCTRL_SDX65
>  
>  config PINCTRL_SDX75
>          tristate "Qualcomm Technologies Inc SDX75 pin controller driver"
> -        depends on GPIOLIB && OF
> +        depends on OF
>          depends on ARM64 || COMPILE_TEST
>          depends on PINCTRL_MSM
>          help
> @@ -400,7 +399,7 @@ config PINCTRL_SDX75
>  
>  config PINCTRL_SM6115
>  	tristate "Qualcomm Technologies Inc SM6115,SM4250 pin controller driver"
> -	depends on GPIOLIB && OF
> +	depends on OF
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_MSM
>  	help
> @@ -420,7 +419,7 @@ config PINCTRL_SM6125
>  
>  config PINCTRL_SM6350
>  	tristate "Qualcomm Technologies Inc SM6350 pin controller driver"
> -	depends on GPIOLIB && OF
> +	depends on OF
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_MSM
>  	help
> @@ -430,7 +429,7 @@ config PINCTRL_SM6350
>  
>  config PINCTRL_SM6375
>  	tristate "Qualcomm Technologies Inc SM6375 pin controller driver"
> -	depends on GPIOLIB && OF
> +	depends on OF
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_MSM
>  	help
> @@ -470,7 +469,6 @@ config PINCTRL_SM8250
>  
>  config PINCTRL_SM8250_LPASS_LPI
>  	tristate "Qualcomm Technologies Inc SM8250 LPASS LPI pin controller driver"
> -	depends on GPIOLIB
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_LPASS_LPI
>  	help
> @@ -489,7 +487,7 @@ config PINCTRL_SM8350
>  
>  config PINCTRL_SM8450
>  	tristate "Qualcomm Technologies Inc SM8450 pin controller driver"
> -	depends on GPIOLIB && OF
> +	depends on OF
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_MSM
>  	help
> @@ -499,7 +497,6 @@ config PINCTRL_SM8450
>  
>  config PINCTRL_SM8450_LPASS_LPI
>  	tristate "Qualcomm Technologies Inc SM8450 LPASS LPI pin controller driver"
> -	depends on GPIOLIB
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_LPASS_LPI
>  	help
> @@ -509,7 +506,6 @@ config PINCTRL_SM8450_LPASS_LPI
>  
>  config PINCTRL_SC8280XP_LPASS_LPI
>  	tristate "Qualcomm Technologies Inc SC8280XP LPASS LPI pin controller driver"
> -	depends on GPIOLIB
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_LPASS_LPI
>  	help
> @@ -519,7 +515,6 @@ config PINCTRL_SC8280XP_LPASS_LPI
>  
>  config PINCTRL_SM8550
>  	tristate "Qualcomm Technologies Inc SM8550 pin controller driver"
> -	depends on GPIOLIB
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_MSM
>  	help
> @@ -529,7 +524,6 @@ config PINCTRL_SM8550
>  
>  config PINCTRL_SM8550_LPASS_LPI
>  	tristate "Qualcomm Technologies Inc SM8550 LPASS LPI pin controller driver"
> -	depends on GPIOLIB
>  	depends on ARM64 || COMPILE_TEST
>  	depends on PINCTRL_LPASS_LPI
>  	help
Konrad Dybcio June 2, 2023, 9:08 a.m. UTC | #2
On 1.06.2023 17:20, Krzysztof Kozlowski wrote:
> Makefile selected Qualcomm pinctrl drivers only for ARCH_QCOM, making
> any COMPILE_TEST options inside Kconfig ((ARCH_QCOM || COMPILE_TEST) or
> (OF || COMPILE_TEST)) not effective.  Always descent to the qcom
> subdirectory to fix this.  All individual drivers are selected in
> Makefile via dedicated CONFIG entries, thus this should not have
> functional impact except when compile testing.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Should analogous changes be made for all remaining
obj-$(CONFIG_PINCTRL_VENDOR) entries?

Konrad
>  drivers/pinctrl/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index e196c6e324ad..482b391b5deb 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -66,7 +66,7 @@ obj-y				+= nomadik/
>  obj-y				+= nuvoton/
>  obj-y				+= nxp/
>  obj-$(CONFIG_PINCTRL_PXA)	+= pxa/
> -obj-$(CONFIG_ARCH_QCOM)		+= qcom/
> +obj-y				+= qcom/
>  obj-$(CONFIG_PINCTRL_RENESAS)	+= renesas/
>  obj-$(CONFIG_PINCTRL_SAMSUNG)	+= samsung/
>  obj-$(CONFIG_PINCTRL_SPEAR)	+= spear/
Linus Walleij June 9, 2023, 7:12 a.m. UTC | #3
On Thu, Jun 1, 2023 at 5:20 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> Driver can bind only via ACPI matching and acpi_device_id is there
> unconditionally, so drop useless ACPI_PTR() macro.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Patches applied!

I had to manually update patch 7/8 to account for the IPQ5018 driver that
I just applied, but I think I figured it out, check the result!

Yours,
Linus Walleij
Krzysztof Kozlowski June 9, 2023, 10:09 a.m. UTC | #4
On 09/06/2023 09:12, Linus Walleij wrote:
> On Thu, Jun 1, 2023 at 5:20 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> 
>> Driver can bind only via ACPI matching and acpi_device_id is there
>> unconditionally, so drop useless ACPI_PTR() macro.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Patches applied!
> 
> I had to manually update patch 7/8 to account for the IPQ5018 driver that
> I just applied, but I think I figured it out, check the result!

Thanks, looks good!

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
index b0f1b3dc6831..b5808fcfb13c 100644
--- a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
+++ b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
@@ -142,7 +142,7 @@  MODULE_DEVICE_TABLE(acpi, qdf2xxx_acpi_ids);
 static struct platform_driver qdf2xxx_pinctrl_driver = {
 	.driver = {
 		.name = "qdf2xxx-pinctrl",
-		.acpi_match_table = ACPI_PTR(qdf2xxx_acpi_ids),
+		.acpi_match_table = qdf2xxx_acpi_ids,
 	},
 	.probe = qdf2xxx_pinctrl_probe,
 	.remove = msm_pinctrl_remove,