[PATCH 16/21] ath10k: remove gpio number assignment

Arnd Bergmann posted 21 patches 1 month, 3 weeks ago
[PATCH 16/21] ath10k: remove gpio number assignment
Posted by Arnd Bergmann 1 month, 3 weeks ago
From: Arnd Bergmann <arnd@arndb.de>

The leds-gpio traditionally takes a global gpio number in its platform
data, but the number assigned here is not actually such a number but
only meant to be used internally to this driver.

As part of the kernel-wide cleanup of the old gpiolib interfaces, the
'gpio' number field is going away, so to keep ath10k building, move
the assignment into a private structure instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/ath/ath10k/leds.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/leds.c b/drivers/net/wireless/ath/ath10k/leds.c
index 9b1d04eb4265..3a6c8111e7c6 100644
--- a/drivers/net/wireless/ath/ath10k/leds.c
+++ b/drivers/net/wireless/ath/ath10k/leds.c
@@ -27,7 +27,7 @@ static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev,
 		goto out;
 
 	ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low;
-	ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin);
+	ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, ar->leds.gpio_state_pin);
 
 out:
 	mutex_unlock(&ar->conf_mutex);
@@ -64,7 +64,6 @@ int ath10k_leds_register(struct ath10k *ar)
 	snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s",
 		 wiphy_name(ar->hw->wiphy));
 	ar->leds.wifi_led.active_low = 1;
-	ar->leds.wifi_led.gpio = ar->hw_params.led_pin;
 	ar->leds.wifi_led.name = ar->leds.label;
 	ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
 
-- 
2.39.5
Re: [PATCH 16/21] ath10k: remove gpio number assignment
Posted by Jeff Johnson 2 weeks, 2 days ago
On Fri, 08 Aug 2025 17:18:00 +0200, Arnd Bergmann wrote:
> The leds-gpio traditionally takes a global gpio number in its platform
> data, but the number assigned here is not actually such a number but
> only meant to be used internally to this driver.
> 
> As part of the kernel-wide cleanup of the old gpiolib interfaces, the
> 'gpio' number field is going away, so to keep ath10k building, move
> the assignment into a private structure instead.
> 
> [...]

Applied, thanks!

[16/21] ath10k: remove gpio number assignment
        commit: 5b345471752701ccfcfa6e86e15d2cebc6e17343

Best regards,
-- 
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Re: [PATCH 16/21] ath10k: remove gpio number assignment
Posted by Baochen Qiang 2 weeks, 2 days ago

On 8/8/2025 11:18 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The leds-gpio traditionally takes a global gpio number in its platform
> data, but the number assigned here is not actually such a number but
> only meant to be used internally to this driver.
> 
> As part of the kernel-wide cleanup of the old gpiolib interfaces, the
> 'gpio' number field is going away, so to keep ath10k building, move
> the assignment into a private structure instead.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/wireless/ath/ath10k/leds.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/leds.c b/drivers/net/wireless/ath/ath10k/leds.c
> index 9b1d04eb4265..3a6c8111e7c6 100644
> --- a/drivers/net/wireless/ath/ath10k/leds.c
> +++ b/drivers/net/wireless/ath/ath10k/leds.c
> @@ -27,7 +27,7 @@ static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev,
>  		goto out;
>  
>  	ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low;
> -	ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin);
> +	ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, ar->leds.gpio_state_pin);
>  
>  out:
>  	mutex_unlock(&ar->conf_mutex);
> @@ -64,7 +64,6 @@ int ath10k_leds_register(struct ath10k *ar)
>  	snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s",
>  		 wiphy_name(ar->hw->wiphy));
>  	ar->leds.wifi_led.active_low = 1;
> -	ar->leds.wifi_led.gpio = ar->hw_params.led_pin;
>  	ar->leds.wifi_led.name = ar->leds.label;
>  	ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
>  

With 'wifi:' tag added ...

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Re: [PATCH 16/21] ath10k: remove gpio number assignment
Posted by Vasanthakumar Thiagarajan 2 weeks, 3 days ago

On 8/8/2025 8:48 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The leds-gpio traditionally takes a global gpio number in its platform
> data, but the number assigned here is not actually such a number but
> only meant to be used internally to this driver.
> 
> As part of the kernel-wide cleanup of the old gpiolib interfaces, the
> 'gpio' number field is going away, so to keep ath10k building, move
> the assignment into a private structure instead.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/net/wireless/ath/ath10k/leds.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

wifi tag is missing in the patch title.
Re: [PATCH 16/21] ath10k: remove gpio number assignment
Posted by Jeff Johnson 2 weeks, 2 days ago
On 9/17/2025 10:22 PM, Vasanthakumar Thiagarajan wrote:
> 
> 
> On 8/8/2025 8:48 PM, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The leds-gpio traditionally takes a global gpio number in its platform
>> data, but the number assigned here is not actually such a number but
>> only meant to be used internally to this driver.
>>
>> As part of the kernel-wide cleanup of the old gpiolib interfaces, the
>> 'gpio' number field is going away, so to keep ath10k building, move
>> the assignment into a private structure instead.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>   drivers/net/wireless/ath/ath10k/leds.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> wifi tag is missing in the patch title.
> 

I'll fix this when I apply the patch