All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-09 18:28 ` Sean Anderson
  0 siblings, 0 replies; 12+ messages in thread
From: Sean Anderson @ 2022-02-09 18:28 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio
  Cc: Damien Le Moal, linux-riscv, linux-kernel, Dan Carpenter, Sean Anderson

Using bias-pull-up would actually cause the pin to have its pull-down
enabled. Fix this.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/pinctrl/pinctrl-k210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
index 49e32684dbb2..1ad61b32ec88 100644
--- a/drivers/pinctrl/pinctrl-k210.c
+++ b/drivers/pinctrl/pinctrl-k210.c
@@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
 	case PIN_CONFIG_BIAS_PULL_UP:
 		if (!arg)
 			return -EINVAL;
-		val |= K210_PC_PD;
+		val |= K210_PC_PU;
 		break;
 	case PIN_CONFIG_DRIVE_STRENGTH:
 		arg *= 1000;
-- 
2.34.1


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

* [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-09 18:28 ` Sean Anderson
  0 siblings, 0 replies; 12+ messages in thread
From: Sean Anderson @ 2022-02-09 18:28 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio
  Cc: Damien Le Moal, linux-riscv, linux-kernel, Dan Carpenter, Sean Anderson

Using bias-pull-up would actually cause the pin to have its pull-down
enabled. Fix this.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/pinctrl/pinctrl-k210.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
index 49e32684dbb2..1ad61b32ec88 100644
--- a/drivers/pinctrl/pinctrl-k210.c
+++ b/drivers/pinctrl/pinctrl-k210.c
@@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
 	case PIN_CONFIG_BIAS_PULL_UP:
 		if (!arg)
 			return -EINVAL;
-		val |= K210_PC_PD;
+		val |= K210_PC_PU;
 		break;
 	case PIN_CONFIG_DRIVE_STRENGTH:
 		arg *= 1000;
-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
  2022-02-09 18:28 ` Sean Anderson
@ 2022-02-09 18:29   ` Sean Anderson
  -1 siblings, 0 replies; 12+ messages in thread
From: Sean Anderson @ 2022-02-09 18:29 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio
  Cc: Damien Le Moal, linux-riscv, linux-kernel, Dan Carpenter

On 2/9/22 1:28 PM, Sean Anderson wrote:
> Using bias-pull-up would actually cause the pin to have its pull-down
> enabled. Fix this.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> 
>   drivers/pinctrl/pinctrl-k210.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
> index 49e32684dbb2..1ad61b32ec88 100644
> --- a/drivers/pinctrl/pinctrl-k210.c
> +++ b/drivers/pinctrl/pinctrl-k210.c
> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>   	case PIN_CONFIG_BIAS_PULL_UP:
>   		if (!arg)
>   			return -EINVAL;
> -		val |= K210_PC_PD;
> +		val |= K210_PC_PU;
>   		break;
>   	case PIN_CONFIG_DRIVE_STRENGTH:
>   		arg *= 1000;
> 

This should have

Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver")

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-09 18:29   ` Sean Anderson
  0 siblings, 0 replies; 12+ messages in thread
From: Sean Anderson @ 2022-02-09 18:29 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio
  Cc: Damien Le Moal, linux-riscv, linux-kernel, Dan Carpenter

On 2/9/22 1:28 PM, Sean Anderson wrote:
> Using bias-pull-up would actually cause the pin to have its pull-down
> enabled. Fix this.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> 
>   drivers/pinctrl/pinctrl-k210.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
> index 49e32684dbb2..1ad61b32ec88 100644
> --- a/drivers/pinctrl/pinctrl-k210.c
> +++ b/drivers/pinctrl/pinctrl-k210.c
> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>   	case PIN_CONFIG_BIAS_PULL_UP:
>   		if (!arg)
>   			return -EINVAL;
> -		val |= K210_PC_PD;
> +		val |= K210_PC_PU;
>   		break;
>   	case PIN_CONFIG_DRIVE_STRENGTH:
>   		arg *= 1000;
> 

This should have

Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver")

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
  2022-02-09 18:28 ` Sean Anderson
@ 2022-02-09 23:34   ` Damien Le Moal
  -1 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2022-02-09 23:34 UTC (permalink / raw)
  To: Sean Anderson, Linus Walleij, linux-gpio
  Cc: linux-riscv, linux-kernel, Dan Carpenter

On 2/10/22 03:28, Sean Anderson wrote:
> Using bias-pull-up would actually cause the pin to have its pull-down
> enabled. Fix this.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> 
>  drivers/pinctrl/pinctrl-k210.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
> index 49e32684dbb2..1ad61b32ec88 100644
> --- a/drivers/pinctrl/pinctrl-k210.c
> +++ b/drivers/pinctrl/pinctrl-k210.c
> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>  	case PIN_CONFIG_BIAS_PULL_UP:
>  		if (!arg)
>  			return -EINVAL;
> -		val |= K210_PC_PD;
> +		val |= K210_PC_PU;
>  		break;
>  	case PIN_CONFIG_DRIVE_STRENGTH:
>  		arg *= 1000;

Ooops... My bad :)

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-09 23:34   ` Damien Le Moal
  0 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2022-02-09 23:34 UTC (permalink / raw)
  To: Sean Anderson, Linus Walleij, linux-gpio
  Cc: linux-riscv, linux-kernel, Dan Carpenter

On 2/10/22 03:28, Sean Anderson wrote:
> Using bias-pull-up would actually cause the pin to have its pull-down
> enabled. Fix this.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> 
>  drivers/pinctrl/pinctrl-k210.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
> index 49e32684dbb2..1ad61b32ec88 100644
> --- a/drivers/pinctrl/pinctrl-k210.c
> +++ b/drivers/pinctrl/pinctrl-k210.c
> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>  	case PIN_CONFIG_BIAS_PULL_UP:
>  		if (!arg)
>  			return -EINVAL;
> -		val |= K210_PC_PD;
> +		val |= K210_PC_PU;
>  		break;
>  	case PIN_CONFIG_DRIVE_STRENGTH:
>  		arg *= 1000;

Ooops... My bad :)

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
  2022-02-09 23:34   ` Damien Le Moal
@ 2022-02-09 23:52     ` Sean Anderson
  -1 siblings, 0 replies; 12+ messages in thread
From: Sean Anderson @ 2022-02-09 23:52 UTC (permalink / raw)
  To: Damien Le Moal, Linus Walleij, linux-gpio
  Cc: linux-riscv, linux-kernel, Dan Carpenter

On 2/9/22 6:34 PM, Damien Le Moal wrote:
> On 2/10/22 03:28, Sean Anderson wrote:
>> Using bias-pull-up would actually cause the pin to have its pull-down
>> enabled. Fix this.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>>
>>   drivers/pinctrl/pinctrl-k210.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
>> index 49e32684dbb2..1ad61b32ec88 100644
>> --- a/drivers/pinctrl/pinctrl-k210.c
>> +++ b/drivers/pinctrl/pinctrl-k210.c
>> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>>   	case PIN_CONFIG_BIAS_PULL_UP:
>>   		if (!arg)
>>   			return -EINVAL;
>> -		val |= K210_PC_PD;
>> +		val |= K210_PC_PU;
>>   		break;
>>   	case PIN_CONFIG_DRIVE_STRENGTH:
>>   		arg *= 1000;
> 
> Ooops... My bad :)

(This is in U-Boot as well, so it looks like it's my bad)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-09 23:52     ` Sean Anderson
  0 siblings, 0 replies; 12+ messages in thread
From: Sean Anderson @ 2022-02-09 23:52 UTC (permalink / raw)
  To: Damien Le Moal, Linus Walleij, linux-gpio
  Cc: linux-riscv, linux-kernel, Dan Carpenter

On 2/9/22 6:34 PM, Damien Le Moal wrote:
> On 2/10/22 03:28, Sean Anderson wrote:
>> Using bias-pull-up would actually cause the pin to have its pull-down
>> enabled. Fix this.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>>
>>   drivers/pinctrl/pinctrl-k210.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
>> index 49e32684dbb2..1ad61b32ec88 100644
>> --- a/drivers/pinctrl/pinctrl-k210.c
>> +++ b/drivers/pinctrl/pinctrl-k210.c
>> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>>   	case PIN_CONFIG_BIAS_PULL_UP:
>>   		if (!arg)
>>   			return -EINVAL;
>> -		val |= K210_PC_PD;
>> +		val |= K210_PC_PU;
>>   		break;
>>   	case PIN_CONFIG_DRIVE_STRENGTH:
>>   		arg *= 1000;
> 
> Ooops... My bad :)

(This is in U-Boot as well, so it looks like it's my bad)

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
  2022-02-09 23:52     ` Sean Anderson
@ 2022-02-09 23:59       ` Damien Le Moal
  -1 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2022-02-09 23:59 UTC (permalink / raw)
  To: Sean Anderson, Linus Walleij, linux-gpio
  Cc: linux-riscv, linux-kernel, Dan Carpenter

On 2022/02/10 8:52, Sean Anderson wrote:
> On 2/9/22 6:34 PM, Damien Le Moal wrote:
>> On 2/10/22 03:28, Sean Anderson wrote:
>>> Using bias-pull-up would actually cause the pin to have its pull-down
>>> enabled. Fix this.
>>>
>>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>>> ---
>>>
>>>   drivers/pinctrl/pinctrl-k210.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
>>> index 49e32684dbb2..1ad61b32ec88 100644
>>> --- a/drivers/pinctrl/pinctrl-k210.c
>>> +++ b/drivers/pinctrl/pinctrl-k210.c
>>> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>>>   	case PIN_CONFIG_BIAS_PULL_UP:
>>>   		if (!arg)
>>>   			return -EINVAL;
>>> -		val |= K210_PC_PD;
>>> +		val |= K210_PC_PU;
>>>   		break;
>>>   	case PIN_CONFIG_DRIVE_STRENGTH:
>>>   		arg *= 1000;
>>
>> Ooops... My bad :)
> 
> (This is in U-Boot as well, so it looks like it's my bad)

I copy-pasted a bug, still my bad :)

-- 
Damien Le Moal
Western Digital Research

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-09 23:59       ` Damien Le Moal
  0 siblings, 0 replies; 12+ messages in thread
From: Damien Le Moal @ 2022-02-09 23:59 UTC (permalink / raw)
  To: Sean Anderson, Linus Walleij, linux-gpio
  Cc: linux-riscv, linux-kernel, Dan Carpenter

On 2022/02/10 8:52, Sean Anderson wrote:
> On 2/9/22 6:34 PM, Damien Le Moal wrote:
>> On 2/10/22 03:28, Sean Anderson wrote:
>>> Using bias-pull-up would actually cause the pin to have its pull-down
>>> enabled. Fix this.
>>>
>>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>>> ---
>>>
>>>   drivers/pinctrl/pinctrl-k210.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
>>> index 49e32684dbb2..1ad61b32ec88 100644
>>> --- a/drivers/pinctrl/pinctrl-k210.c
>>> +++ b/drivers/pinctrl/pinctrl-k210.c
>>> @@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
>>>   	case PIN_CONFIG_BIAS_PULL_UP:
>>>   		if (!arg)
>>>   			return -EINVAL;
>>> -		val |= K210_PC_PD;
>>> +		val |= K210_PC_PU;
>>>   		break;
>>>   	case PIN_CONFIG_DRIVE_STRENGTH:
>>>   		arg *= 1000;
>>
>> Ooops... My bad :)
> 
> (This is in U-Boot as well, so it looks like it's my bad)

I copy-pasted a bug, still my bad :)

-- 
Damien Le Moal
Western Digital Research

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
  2022-02-09 18:28 ` Sean Anderson
@ 2022-02-11  1:20   ` Linus Walleij
  -1 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2022-02-11  1:20 UTC (permalink / raw)
  To: Sean Anderson
  Cc: linux-gpio, Damien Le Moal, linux-riscv, linux-kernel, Dan Carpenter

On Wed, Feb 9, 2022 at 7:28 PM Sean Anderson <seanga2@gmail.com> wrote:

> Using bias-pull-up would actually cause the pin to have its pull-down
> enabled. Fix this.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>

Patch applied for fixes.

Yours,
Linus Walleij

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] pinctrl: k210: Fix bias-pull-up
@ 2022-02-11  1:20   ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2022-02-11  1:20 UTC (permalink / raw)
  To: Sean Anderson
  Cc: linux-gpio, Damien Le Moal, linux-riscv, linux-kernel, Dan Carpenter

On Wed, Feb 9, 2022 at 7:28 PM Sean Anderson <seanga2@gmail.com> wrote:

> Using bias-pull-up would actually cause the pin to have its pull-down
> enabled. Fix this.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>

Patch applied for fixes.

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-02-11  1:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 18:28 [PATCH] pinctrl: k210: Fix bias-pull-up Sean Anderson
2022-02-09 18:28 ` Sean Anderson
2022-02-09 18:29 ` Sean Anderson
2022-02-09 18:29   ` Sean Anderson
2022-02-09 23:34 ` Damien Le Moal
2022-02-09 23:34   ` Damien Le Moal
2022-02-09 23:52   ` Sean Anderson
2022-02-09 23:52     ` Sean Anderson
2022-02-09 23:59     ` Damien Le Moal
2022-02-09 23:59       ` Damien Le Moal
2022-02-11  1:20 ` Linus Walleij
2022-02-11  1:20   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.