From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/03] pinctrl: sh-pfc: r8a7790: Break out USB0 OVC/VBUS
Date: Thu, 06 Feb 2014 12:01:44 +0100 [thread overview]
Message-ID: <4378236.uXc5XaI3pM@avalon> (raw)
In-Reply-To: <CANqRtoSubhvfgzn590k9oePLv04V00Z7aEuKw2Ofxi8FeCObbA@mail.gmail.com>
Hi Magnus,
On Friday 31 January 2014 12:10:05 Magnus Damm wrote:
> On Fri, Jan 31, 2014 at 10:17 AM, Laurent Pinchart wrote:
> > On Thursday 30 January 2014 08:10:19 Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >>
> >> Create a new group for the USB0 OVC/VBUS pin by itself. This
> >> allows us to monitor PWEN as GPIO on the Lager board.
> >>
> >> Signed-off-by: Magnus Damm <damm@opensource.se>
> >> ---
> >>
> >> drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 9 +++++++++
> >> 1 file changed, 9 insertions(+)
> >>
> >> --- 0001/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
> >> +++ work/drivers/pinctrl/sh-pfc/pfc-r8a7790.c 2014-01-24
> > 10:23:32.000000000
> >> +0900 @@ -3231,6 +3231,13 @@ static const unsigned int usb0_pins[] =
> >> static const unsigned int usb0_mux[] = {
> >> USB0_PWEN_MARK, USB0_OVC_VBUS_MARK,
> >> };
> >> +static const unsigned int usb0_ovc_vbus_pins[] = {
> >> + /* OVC/VBUS */
> >> + RCAR_GP_PIN(5, 19),
> >> +};
> >> +static const unsigned int usb0_ovc_vbus_mux[] = {
> >> + USB0_OVC_VBUS_MARK,
> >> +};
> >
> > Another option would have been to split the existing usb0 group in
> > usb0_pwen and usb0_ovc. I'm not sure which is better though, I'd just
> > like to know if you had given it a thought.
>
> I actually did just that in my first local attempt, but I decided not
> to since it will only cause potential breakage.
OK. I assume that using PWEN without OVC/VBUS doesn't make sense, right ?
> > Regardless, what about naming the new group usb0_ovc instead of
> > usb0_ovc_bus to keep names short ?
>
> Is there any particular reason why you want shorter names?
When it doesn't reduce clarity I prefer to keep names short, as that makes the
code easier to read and write, and (slightly) lowers the memory footprint.
> From my side, I prefer to keep the names in sync with the data sheet. In
> this particular case it is a shared pin so OVC is used for Host while VBUS
> is used for gadget, so if you're proposing to ditch VBUS then this feels
> somewhat inconsistent with the current gadget use case. =)
I thought the pin was used for over current detection only, but that doesn't
make sense for function mode, you're right. Let's keep the name as-is then.
Provided PWEN without OVC/VBUS doesn't make sense and won't be needed,
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-02-06 11:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 23:09 [PATCH 00/03] ARM: shmobile: Lager USBHS update Magnus Damm
2014-01-29 23:10 ` [PATCH 01/03] ARM: shmobile: Remove Lager USBHS UDC ifdefs Magnus Damm
2014-01-29 23:10 ` [PATCH 02/03] pinctrl: sh-pfc: r8a7790: Break out USB0 OVC/VBUS Magnus Damm
2014-01-31 1:17 ` Laurent Pinchart
2014-01-31 3:10 ` Magnus Damm
2014-02-06 6:24 ` Simon Horman
2014-02-06 11:01 ` Laurent Pinchart [this message]
2014-02-06 13:34 ` Magnus Damm
2014-02-07 0:15 ` Simon Horman
2014-02-07 0:36 ` Laurent Pinchart
2014-02-07 1:39 ` Simon Horman
2014-02-10 9:17 ` Linus Walleij
2014-02-10 12:08 ` Laurent Pinchart
2014-02-10 9:19 ` Linus Walleij
2014-01-29 23:10 ` [PATCH 03/03] ARM: shmobile: Lager USB0 cable detection workaround Magnus Damm
2014-01-31 1:14 ` Laurent Pinchart
2014-01-31 3:35 ` Magnus Damm
2014-02-06 7:00 ` Simon Horman
2014-01-31 0:44 ` [PATCH 00/03] ARM: shmobile: Lager USBHS update Simon Horman
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=4378236.uXc5XaI3pM@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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