Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653180 > unrolled thread
| Started by | Richard Genoud <richard.genoud@gmail.com> |
|---|---|
| First post | 2017-05-30 14:30 +0200 |
| Last post | 2017-05-30 17:20 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] gpio: mvebu: fix blink counter register selection Richard Genoud <richard.genoud@gmail.com> - 2017-05-30 14:30 +0200
Re: [PATCH 1/2] gpio: mvebu: fix blink counter register selection Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-05-30 15:10 +0200
Re: [PATCH 1/2] gpio: mvebu: fix blink counter register selection Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-05-30 15:10 +0200
Re: [PATCH 1/2] gpio: mvebu: fix blink counter register selection Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-05-30 17:20 +0200
| From | Richard Genoud <richard.genoud@gmail.com> |
|---|---|
| Date | 2017-05-30 14:30 +0200 |
| Subject | [PATCH 1/2] gpio: mvebu: fix blink counter register selection |
| Message-ID | <tMOrD-7i1-3@gated-at.bofh.it> |
The blink counter A was always selected because 0 was forced in the blink select counter register. The variable 'set' was obviously there to be used as the register value, selecting the B counter when id==1 and A counter when id==0. Tested on clearfog-pro (Marvell 88F6828) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> --- drivers/gpio/gpio-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 19a92efabbef..cdef2c78cb3b 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -747,7 +747,7 @@ static int mvebu_pwm_probe(struct platform_device *pdev, set = U32_MAX; else return -EINVAL; - writel_relaxed(0, mvebu_gpioreg_blink_counter_select(mvchip)); + writel_relaxed(set, mvebu_gpioreg_blink_counter_select(mvchip)); mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), GFP_KERNEL); if (!mvpwm)
[toc] | [next] | [standalone]
| From | Gregory CLEMENT <gregory.clement@free-electrons.com> |
|---|---|
| Date | 2017-05-30 15:10 +0200 |
| Message-ID | <tMP4m-7N5-17@gated-at.bofh.it> |
| In reply to | #1653180 |
Hi again,
On mar., mai 30 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:
> Hi Richard,
>
> On mar., mai 30 2017, Richard Genoud <richard.genoud@gmail.com> wrote:
>
>> The blink counter A was always selected because 0 was forced in the
>> blink select counter register.
>> The variable 'set' was obviously there to be used as the register value,
>> selecting the B counter when id==1 and A counter when id==0.
>>
>> Tested on clearfog-pro (Marvell 88F6828)
>>
>> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
>
> Looks good for me:
>
> Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>
> I thinks this one should go to v4.12-rc as it is a fix.
>
> As I modified the same part of the code in my series, I think I will
> have to rebase my series on top of this patch as soon as Linus Walleij
> will have accepted it.
I think we could also add:
Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support")
Gregory
>
> Thanks,
>
> Gregory
>
>
>> ---
>> drivers/gpio/gpio-mvebu.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
>> index 19a92efabbef..cdef2c78cb3b 100644
>> --- a/drivers/gpio/gpio-mvebu.c
>> +++ b/drivers/gpio/gpio-mvebu.c
>> @@ -747,7 +747,7 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
>> set = U32_MAX;
>> else
>> return -EINVAL;
>> - writel_relaxed(0, mvebu_gpioreg_blink_counter_select(mvchip));
>> + writel_relaxed(set, mvebu_gpioreg_blink_counter_select(mvchip));
>>
>> mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), GFP_KERNEL);
>> if (!mvpwm)
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Gregory CLEMENT <gregory.clement@free-electrons.com> |
|---|---|
| Date | 2017-05-30 15:10 +0200 |
| Message-ID | <tMP4m-7N5-19@gated-at.bofh.it> |
| In reply to | #1653180 |
Hi Richard, On mar., mai 30 2017, Richard Genoud <richard.genoud@gmail.com> wrote: > The blink counter A was always selected because 0 was forced in the > blink select counter register. > The variable 'set' was obviously there to be used as the register value, > selecting the B counter when id==1 and A counter when id==0. > > Tested on clearfog-pro (Marvell 88F6828) > > Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Looks good for me: Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com> I thinks this one should go to v4.12-rc as it is a fix. As I modified the same part of the code in my series, I think I will have to rebase my series on top of this patch as soon as Linus Walleij will have accepted it. Thanks, Gregory > --- > drivers/gpio/gpio-mvebu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c > index 19a92efabbef..cdef2c78cb3b 100644 > --- a/drivers/gpio/gpio-mvebu.c > +++ b/drivers/gpio/gpio-mvebu.c > @@ -747,7 +747,7 @@ static int mvebu_pwm_probe(struct platform_device *pdev, > set = U32_MAX; > else > return -EINVAL; > - writel_relaxed(0, mvebu_gpioreg_blink_counter_select(mvchip)); > + writel_relaxed(set, mvebu_gpioreg_blink_counter_select(mvchip)); > > mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), GFP_KERNEL); > if (!mvpwm) -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Ralph Sennhauser <ralph.sennhauser@gmail.com> |
|---|---|
| Date | 2017-05-30 17:20 +0200 |
| Message-ID | <tMR69-A4-15@gated-at.bofh.it> |
| In reply to | #1653180 |
Hi Richard On Tue, 30 May 2017 14:28:47 +0200 Richard Genoud <richard.genoud@gmail.com> wrote: > The blink counter A was always selected because 0 was forced in the > blink select counter register. > The variable 'set' was obviously there to be used as the register > value, selecting the B counter when id==1 and A counter when id==0. > > Tested on clearfog-pro (Marvell 88F6828) As stated in the other thread, testing on clearfog-pro is likely bogus, still the fix is correct. Reviewed-by: Ralph Sennhauser <ralph.sennhauser@gmail.com> Thanks Ralph > > Signed-off-by: Richard Genoud <richard.genoud@gmail.com> > --- > drivers/gpio/gpio-mvebu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c > index 19a92efabbef..cdef2c78cb3b 100644 > --- a/drivers/gpio/gpio-mvebu.c > +++ b/drivers/gpio/gpio-mvebu.c > @@ -747,7 +747,7 @@ static int mvebu_pwm_probe(struct platform_device > *pdev, set = U32_MAX; > else > return -EINVAL; > - writel_relaxed(0, > mvebu_gpioreg_blink_counter_select(mvchip)); > + writel_relaxed(set, > mvebu_gpioreg_blink_counter_select(mvchip)); > mvpwm = devm_kzalloc(dev, sizeof(struct mvebu_pwm), > GFP_KERNEL); if (!mvpwm)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web