All of lore.kernel.org
 help / color / mirror / Atom feed
From: jacopo mondi <jacopo@jmondi.org>
To: Ulrich Hecht <uli@fpond.eu>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	geert+renesas@glider.be, laurent.pinchart@ideasonboard.com,
	horms@verge.net.au, linus.walleij@linaro.org,
	linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: Introduce VIN_DATA_PIN_GROUP_VER
Date: Tue, 30 Oct 2018 08:34:44 +0100	[thread overview]
Message-ID: <20181030073444.GE15991@w540> (raw)
In-Reply-To: <1822236810.335136.1540871186977@webmail.strato.com>

[-- Attachment #1: Type: text/plain, Size: 2301 bytes --]

Hi Uli,

On Tue, Oct 30, 2018 at 04:46:26AM +0100, Ulrich Hecht wrote:
>
> > On October 29, 2018 at 7:13 PM Jacopo Mondi <jacopo+renesas@jmondi.org> wrote:
> >
> >
> > VIN data groups may appear on different sets of pins, usually named
> > "vinX_data_[a|b]". The existing VIN_DATA_PIN_GROUP() does not support appending
> > the 'a' or 'b' suffix, leading to the definition of groups names not consistent
> > with the ones defined using SH_PFC_PIN_GROUP() macro.
> >
> > Fix this by adding a macro that supports appending suffixes when required.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> >  drivers/pinctrl/sh-pfc/sh_pfc.h | 20 +++++++++++++++-----
> >  1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
> > index 458ae0a..2930e9a 100644
> > --- a/drivers/pinctrl/sh-pfc/sh_pfc.h
> > +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
> > @@ -54,17 +54,27 @@ struct sh_pfc_pin_group {
> >
> >  /*
> >   * Using union vin_data saves memory occupied by the VIN data pins.
> > - * VIN_DATA_PIN_GROUP() is  a macro  used  to describe the VIN pin groups
> > - * in this case.
> > + *
> > + * VIN_DATA_PIN_GROUP() is  a macro  used  to describe the VIN pin groups,
>
> Maybe fix the odd spacing, while you're at it?

Ups, I have missed it.

Thanks, I'll wait for more feedbacks and add your tag to the next
version.

Thanks
  j

>
> > + * while VIN_DATA_PIN_GROUP_VER() is used when the same pin group can appear
> > + * on different sets of pins.
> >   */
> > -#define VIN_DATA_PIN_GROUP(n, s)				\
> > -	{							\
> > -		.name = #n#s,					\
> > +#define __VIN_DATA_PIN_GROUP(n, s)				\
> >  		.pins = n##_pins.data##s,			\
> >  		.mux = n##_mux.data##s,				\
> >  		.nr_pins = ARRAY_SIZE(n##_pins.data##s),	\
> >  	}
> >
> > +#define VIN_DATA_PIN_GROUP(n, s)				\
> > +	{							\
> > +		.name = #n#s,					\
> > +		__VIN_DATA_PIN_GROUP(n, s)
> > +
> > +#define VIN_DATA_PIN_GROUP_VER(n, v, s)				\
> > +	{							\
> > +		.name = #n#s"_"#v,				\
> > +		__VIN_DATA_PIN_GROUP(n##_##v, s)
> > +
> >  union vin_data {
> >  	unsigned int data24[24];
> >  	unsigned int data20[20];
> > --
> > 2.7.4
> >
>
> With or without the whitespace fix:
>
> Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
>
> CU
> Uli

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2018-10-30  7:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 18:13 [PATCH 0/2] pinctrl: sh-pfc: r8a77965: Add VIN4 and VIN5 Jacopo Mondi
2018-10-29 18:13 ` [PATCH 1/2] pinctrl: sh-pfc: Introduce VIN_DATA_PIN_GROUP_VER Jacopo Mondi
2018-10-30  3:46   ` Ulrich Hecht
2018-10-30  7:34     ` jacopo mondi [this message]
2018-10-29 18:13 ` [PATCH 2/2] pinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions Jacopo Mondi
2018-10-30  3:46   ` Ulrich Hecht
2018-11-05 17:19 ` [PATCH 0/2] pinctrl: sh-pfc: r8a77965: Add VIN4 and VIN5 Geert Uytterhoeven
2018-11-06  9:07   ` jacopo mondi
2018-11-06  9:24     ` Geert Uytterhoeven
2018-11-06  9:31       ` jacopo mondi
2018-11-07  8:39         ` Geert Uytterhoeven
2018-11-07  9:35           ` jacopo mondi

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=20181030073444.GE15991@w540 \
    --to=jacopo@jmondi.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=uli@fpond.eu \
    /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.