All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: "Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: Re: [PATCHv2 3/6] pinctrl: sh-pfc: r8a7795: Simplify get bias logic
Date: Sat, 12 Nov 2016 00:42:19 +0200	[thread overview]
Message-ID: <1742469.h1uB4hWBoE@avalon> (raw)
In-Reply-To: <20161111203021.3384-4-niklas.soderlund@ragnatech.se>

Hi Niklas,

Thank you for the patch.

On Friday 11 Nov 2016 21:30:18 Niklas Söderlund wrote:
> From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> 
> The last else statement is missing braces and there indentation level
> can be reduced.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
> b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c index 2e8cc2a..6c58563 100644
> --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
> @@ -5367,13 +5367,12 @@ static unsigned int r8a7795_pinmux_get_bias(struct
> sh_pfc *pfc, reg = pullups[pin].reg;
>  	bit = BIT(pullups[pin].bit);
> 
> -	if (sh_pfc_read_reg(pfc, PUEN + reg, 32) & bit) {
> -		if (sh_pfc_read_reg(pfc, PUD + reg, 32) & bit)
> -			return PIN_CONFIG_BIAS_PULL_UP;
> -		else
> -			return PIN_CONFIG_BIAS_PULL_DOWN;
> -	} else
> +	if (!(sh_pfc_read_reg(pfc, PUEN + reg, 32) & bit))
>  		return PIN_CONFIG_BIAS_DISABLE;
> +	else if (sh_pfc_read_reg(pfc, PUD + reg, 32) & bit)
> +		return PIN_CONFIG_BIAS_PULL_UP;
> +	else
> +		return PIN_CONFIG_BIAS_PULL_DOWN;
>  }
> 
>  static void r8a7795_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2016-11-11 22:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 20:30 [PATCHv2 0/6] pinctrl: sh-pfc: Fixups for bias handling and preparation for none GPIO pins Niklas Söderlund
2016-11-11 20:30 ` [PATCHv2 1/6] pinctrl: sh-pfc: Do not unconditionally support PIN_CONFIG_BIAS_DISABLE Niklas Söderlund
2016-11-11 20:30 ` [PATCHv2 2/6] pinctrl: sh-pfc: Add helper to handle bias lookup table Niklas Söderlund
2016-11-12  1:46   ` Laurent Pinchart
2016-11-12 13:41     ` Niklas Söderlund
2016-11-12 13:41       ` Niklas Söderlund
2016-11-11 20:30 ` [PATCHv2 3/6] pinctrl: sh-pfc: r8a7795: Simplify get bias logic Niklas Söderlund
2016-11-11 22:42   ` Laurent Pinchart [this message]
2016-11-11 20:30 ` [PATCHv2 4/6] pinctrl: sh-pfc: r8a7795: Use lookup function for bias data Niklas Söderlund
2016-11-12  1:47   ` Laurent Pinchart
2016-11-12 13:44     ` Niklas Söderlund
2016-11-12 13:44       ` Niklas Söderlund
2016-11-11 20:30 ` [PATCHv2 5/6] pinctrl: sh-pfc: r8a7778: " Niklas Söderlund
2016-11-11 20:30 ` [PATCHv2 6/6] pinctrl: sh-pfc: Support named pins with custom configuration Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1742469.h1uB4hWBoE@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=geert+renesas@glider.be \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=niklas.soderlund@ragnatech.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.