linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup
@ 2013-11-28 15:20 Laurent Pinchart
  2013-12-05  3:43 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Laurent Pinchart @ 2013-11-28 15:20 UTC (permalink / raw)
  To: linux-sh

When computing the pin configuration register offset the bias setup code
erroneously compares the pin number range with the loop index instead of
the pin number. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index 009174d..bc5eb45 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
 		const struct r8a7740_portcr_group *group  			&r8a7740_portcr_offsets[i];
 
-		if (i <= group->end_pin)
+		if (pin <= group->end_pin)
 			return pfc->window->virt + group->offset + pin;
 	}
 
-- 
1.8.3.2


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

* Re: [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup
  2013-11-28 15:20 [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup Laurent Pinchart
@ 2013-12-05  3:43 ` Simon Horman
  2013-12-05  5:55 ` Laurent Pinchart
  2013-12-05  6:55 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-12-05  3:43 UTC (permalink / raw)
  To: linux-sh

Hi Laurent,

On Thu, Nov 28, 2013 at 04:20:03PM +0100, Laurent Pinchart wrote:
> When computing the pin configuration register offset the bias setup code
> erroneously compares the pin number range with the loop index instead of
> the pin number. Fix it.

this appears to be a bug-fix. If you haven't queued this up already
could you consider adding something like this to the changelog?
Likewise for "[2/2] sh-pfc: sh7372: Fix pin bias setup".

This resolves a problem that was added when bias pinconf support was added
by 80da8e02d22caaef ("sh-pfc: r8a7740: Add bias (pull-up/down) pinconf
support") in v3.10-rc3.

> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
> index 009174d..bc5eb45 100644
> --- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
> @@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
>  		const struct r8a7740_portcr_group *group >  			&r8a7740_portcr_offsets[i];
>  
> -		if (i <= group->end_pin)
> +		if (pin <= group->end_pin)
>  			return pfc->window->virt + group->offset + pin;
>  	}
>  
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup
  2013-11-28 15:20 [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup Laurent Pinchart
  2013-12-05  3:43 ` Simon Horman
@ 2013-12-05  5:55 ` Laurent Pinchart
  2013-12-05  6:55 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2013-12-05  5:55 UTC (permalink / raw)
  To: linux-sh

Hi Simon,

On Thursday 05 December 2013 12:43:11 Simon Horman wrote:
> Hi Laurent,
> 
> On Thu, Nov 28, 2013 at 04:20:03PM +0100, Laurent Pinchart wrote:
> > When computing the pin configuration register offset the bias setup code
> > erroneously compares the pin number range with the loop index instead of
> > the pin number. Fix it.
> 
> this appears to be a bug-fix. If you haven't queued this up already
> could you consider adding something like this to the changelog?
> Likewise for "[2/2] sh-pfc: sh7372: Fix pin bias setup".
> 
> This resolves a problem that was added when bias pinconf support was added
> by 80da8e02d22caaef ("sh-pfc: r8a7740: Add bias (pull-up/down) pinconf
> support") in v3.10-rc3.

Linus has queued both patches up already, sorry.

> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
> > b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c index 009174d..bc5eb45 100644
> > --- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
> > +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
> > @@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct
> > sh_pfc *pfc, unsigned int pin)> 
> >  		const struct r8a7740_portcr_group *group > >  			&r8a7740_portcr_offsets[i];
> > 
> > -		if (i <= group->end_pin)
> > +		if (pin <= group->end_pin)
> >  			return pfc->window->virt + group->offset + pin;
> >  	}
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup
  2013-11-28 15:20 [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup Laurent Pinchart
  2013-12-05  3:43 ` Simon Horman
  2013-12-05  5:55 ` Laurent Pinchart
@ 2013-12-05  6:55 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-12-05  6:55 UTC (permalink / raw)
  To: linux-sh

On Thu, Dec 05, 2013 at 06:55:07AM +0100, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Thursday 05 December 2013 12:43:11 Simon Horman wrote:
> > Hi Laurent,
> > 
> > On Thu, Nov 28, 2013 at 04:20:03PM +0100, Laurent Pinchart wrote:
> > > When computing the pin configuration register offset the bias setup code
> > > erroneously compares the pin number range with the loop index instead of
> > > the pin number. Fix it.
> > 
> > this appears to be a bug-fix. If you haven't queued this up already
> > could you consider adding something like this to the changelog?
> > Likewise for "[2/2] sh-pfc: sh7372: Fix pin bias setup".
> > 
> > This resolves a problem that was added when bias pinconf support was added
> > by 80da8e02d22caaef ("sh-pfc: r8a7740: Add bias (pull-up/down) pinconf
> > support") in v3.10-rc3.
> 
> Linus has queued both patches up already, sorry.

No problem.

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

end of thread, other threads:[~2013-12-05  6:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28 15:20 [PATCH 1/2] sh-pfc: r8a7740: Fix pin bias setup Laurent Pinchart
2013-12-05  3:43 ` Simon Horman
2013-12-05  5:55 ` Laurent Pinchart
2013-12-05  6:55 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).