From: Wolfram Sang <wsa@the-dreams.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>,
Ian Molton <ian@mnementh.co.uk>,
linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-kernel@lists.codethink.co.uk,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Simon Horman <horms@verge.net.au>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: Re: [PATCH v4 2/8] pinctrl: sh-pfc: r8a7790: Implement voltage switching for SDHI
Date: Thu, 11 Feb 2016 14:53:55 +0100 [thread overview]
Message-ID: <20160211135355.GA1520@katana> (raw)
In-Reply-To: <3375560.xz1gJhmReB@avalon>
[-- Attachment #1: Type: text/plain, Size: 2616 bytes --]
> > b/drivers/pinctrl/sh-pfc/sh_pfc.h index 734f7a92229c..3eca740bba02 100644
> > --- a/drivers/pinctrl/sh-pfc/sh_pfc.h
> > +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
> > @@ -272,14 +272,18 @@ struct sh_pfc_soc_info {
> > .enum_id = _pin##_DATA, \
> > }
> >
> > -/* SH_PFC_PIN_CFG - Expand to a sh_pfc_pin entry (named PORT#) with config
> > */
> > -#define SH_PFC_PIN_CFG(_pin, cfgs) \
> > +/* SH_PFC_{PORT,GPIO}_CFG - Expand to a sh_pfc_pin entry with config */
> > +#define _SH_PFC_PIN_CFG(_pin, _name, cfgs) \
> > { \
> > .pin = _pin, \
> > - .name = __stringify(PORT##_pin), \
> > - .enum_id = PORT##_pin##_DATA, \
> > + .name = __stringify(_name), \
> > + .enum_id = _name##_DATA, \
> > .configs = cfgs, \
> > }
> > +#define SH_PFC_PORT_CFG(_pin, cfgs) \
> > + _SH_PFC_PIN_CFG(PORT##_pin, PORT##_pin, cfgs)
> > +#define SH_PFC_GPIO_CFG(bank, _pin, _name, cfgs) \
> > + _SH_PFC_PIN_CFG((bank * 32) + _pin, _name, cfgs)
> >
> > /* SH_PFC_PIN_NAMED - Expand to a sh_pfc_pin entry with the given name */
> > #define SH_PFC_PIN_NAMED(row, col, _name) \
> > --- END ---
> >
> > If you're happy with that, I'll re-send the series (hopefully for the
> > last time!) with the r8a7790 changes squashed into "pinctrl: sh-pfc:
> > r8a7790: Implement voltage switching for SDHI" and the SH_PFC_PIN_CFG
> > macro change as a new patch before it.
>
> That looks good to me. I'd split it in two patches though, one that reworks
> the existing macros (the drivers/pinctrl/sh-pfc/sh_pfc.h changes) and one that
> implements voltage switching for SDHI on r8a7790.
>
> I would also avoid renaming SH_PFC_PIN_CFG to SH_PFC_PORT_CFG to avoid
> modifying unrelated files, you can name the low-level macro __SH_PFC_PIN_CFG
> and add
>
> #define SH_PFC_PIN_CFG(_pin, cfgs) \
> __SH_PFC_PIN_CFG(PORT##_pin, PORT##_pin, cfgs)
>
> Additionally, your new SH_PFC_GPIO_CFG macro seems identical to _GP_GPIO now.
> It would make sense to merge the two.
It is identical. And since we meanwhile also have PORT_GP_CFG_32, I
wonder if we can't simply do this in CPU_ALL_PORT?
@@ -30,7 +31,7 @@
PORT_GP_32(0, fn, sfx), \
PORT_GP_30(1, fn, sfx), \
PORT_GP_30(2, fn, sfx), \
- PORT_GP_32(3, fn, sfx), \
+ PORT_GP_CFG_32(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
PORT_GP_32(4, fn, sfx), \
PORT_GP_32(5, fn, sfx)
And skip all the macro refactoring?
I'll test this once I have access to my Lager again, but though I'll let
you know already...
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-02-11 13:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 16:52 [PATCH v4 0/8] UHS-I support for sh_mobile_sdhi Ben Hutchings
2015-06-30 16:53 ` [PATCH v4 1/8] pinctrl: sh-pfc: Implement pinconf power-source param for voltage switching Ben Hutchings
2015-07-01 7:24 ` Laurent Pinchart
2015-08-24 8:45 ` Linus Walleij
2015-06-30 16:54 ` [PATCH v4 2/8] pinctrl: sh-pfc: r8a7790: Implement voltage switching for SDHI Ben Hutchings
2015-07-01 7:37 ` Laurent Pinchart
2015-07-02 23:21 ` Ben Hutchings
2015-07-09 12:34 ` Ben Hutchings
2015-11-13 8:38 ` Kuninori Morimoto
2016-02-03 9:59 ` Laurent Pinchart
2016-02-11 13:53 ` Wolfram Sang [this message]
2015-06-30 16:54 ` [PATCH v4 3/8] mmc: tmio, sh_mobile_sdhi: Pass tmio_mmc_host ptr to clk_{enable,disable} ops Ben Hutchings
2015-06-30 16:56 ` [PATCH v4 4/8] mmc: tmio, sh_mobile_sdhi: Add support for variable input clock frequency Ben Hutchings
2015-06-30 16:56 ` [PATCH v4 5/8] mmc: tmio: Add UHS-I mode support Ben Hutchings
2015-06-30 16:57 ` [PATCH v4 6/8] mmc: sh_mobile_sdhi: " Ben Hutchings
2015-06-30 16:57 ` [PATCH v4 7/8] ARM: shmobile: r8a7790: Set maximum frequencies for SDHI clocks Ben Hutchings
2015-07-07 0:39 ` Simon Horman
2015-07-07 1:19 ` Kuninori Morimoto
2015-07-08 1:25 ` Simon Horman
2015-07-07 1:19 ` Kuninori Morimoto
2015-06-30 16:57 ` [PATCH v4 8/8] ARM: shmobile: lager: Enable UHS-I SDR-50 Ben Hutchings
2015-07-01 0:28 ` [PATCH v4 0/8] UHS-I support for sh_mobile_sdhi Kuninori Morimoto
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=20160211135355.GA1520@katana \
--to=wsa@the-dreams.de \
--cc=ben.hutchings@codethink.co.uk \
--cc=horms@verge.net.au \
--cc=ian@mnementh.co.uk \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/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 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 read-only IMAP folder(s) and NNTP newsgroup(s).