From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <1537530911-443-1-git-send-email-fabrizio.castro@bp.renesas.com> <1537530911-443-3-git-send-email-fabrizio.castro@bp.renesas.com> <20180922184443.GD841@kunai> In-Reply-To: <20180922184443.GD841@kunai> From: Geert Uytterhoeven Date: Mon, 24 Sep 2018 11:51:28 +0200 Message-ID: Subject: Re: [PATCH 2/4] pinctrl: sh-pfc: r8a77470: Add SDHI2 voltage switch Content-Type: text/plain; charset="UTF-8" To: Wolfram Sang Cc: Fabrizio Castro , Ulf Hansson , Rob Herring , Mark Rutland , Laurent Pinchart , Geert Uytterhoeven , Linus Walleij , Wolfram Sang , Simon Horman , Magnus Damm , Linux MMC List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , "open list:GPIO SUBSYSTEM" , Chris Paterson , Biju Das List-ID: On Sat, Sep 22, 2018 at 8:44 PM Wolfram Sang wrote: > On Fri, Sep 21, 2018 at 12:55:09PM +0100, Fabrizio Castro wrote: > > Add SH_PFC_PIN_CFG_IO_VOLTAGE definition for the SDHI2 pins > > capable of switching voltage. Please note that with the > > RZ/G1C only 1 bit of the POC Control Register is used to > > control each interface. > > > > Signed-off-by: Fabrizio Castro > > Reviewed-by: Biju Das > > In general: > > Acked-by: Wolfram Sang > > > + if (_bank == 4 && _pin >= 14 && _pin <= 19) > > + return 1; > > + > > + return -EINVAL; > > I'd like a tad better to bail out on the error case and have the main > path returning on the good case, but no strong opinion... And we have these nice RCAR_GP_PIN() macros to check pin ranges. Please have a look at the flow in e.g. r8a7795_pin_to_pocctrl(). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds