linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Peter Griffin <peter.griffin@linaro.org>,
	linux-kernel@vger.kernel.org, kishon@ti.com,
	srinivas.kandagatla@gmail.com, maxime.coquelin@st.com,
	patrice.chotard@st.com, peppe.cavallaro@st.com,
	lee.jones@linaro.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/4] phy: phy-stih407-usb: Add usb picoPHY driver found on stih407 SoC family
Date: Tue, 09 Sep 2014 11:08:11 +0200	[thread overview]
Message-ID: <2894228.eRmxgHsWbh@wuerfel> (raw)
In-Reply-To: <1410253218-18318-2-git-send-email-peter.griffin@linaro.org>

On Tuesday 09 September 2014 10:00:15 Peter Griffin wrote:
> This is the generic phy driver for the picoPHY ports used by the
> USB2 and USB3 Host controllers when controlling usb2/1.1 devices. It
> is found on STiH407 SoC family from STMicroelectronics.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>

Looks good overall, just one question:

> +
> +	match = of_match_device(stih407_usb2_picophy_of_match, dev);
> +	if (!match)
> +		return -ENODEV;
....
> +
> +	phy = devm_phy_create(dev, NULL, match->data, NULL);
> +	if (IS_ERR(phy)) {
> +		dev_err(dev, "failed to create Display Port PHY\n");
> +		return PTR_ERR(phy);
> +	}
> +

There is only one entry in the match table, so it always points to
stih407_usb2_picophy_data. Do you have plans to add another set of
operations soon?
If not, just remove the .data pointer and hardcode the operations
in the devm_phy_create call.

	Arnd

  reply	other threads:[~2014-09-09  9:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09  9:00 [PATCH v2 0/4] Add picoPHY usb phy driver found on stih407 family SoC's Peter Griffin
2014-09-09  9:00 ` [PATCH v2 1/4] phy: phy-stih407-usb: Add usb picoPHY driver found on stih407 SoC family Peter Griffin
2014-09-09  9:08   ` Arnd Bergmann [this message]
2014-09-09 10:26     ` Peter Griffin
2014-09-09 11:52   ` Bartlomiej Zolnierkiewicz
2014-09-09 12:05     ` Arnd Bergmann
2014-09-09  9:00 ` [PATCH v2 2/4] phy: phy-stih407-usb: Add dt documentation for USB picophy " Peter Griffin
2014-09-09  9:00 ` [PATCH v2 3/4] MAINTAINERS: Add phy-stih407-usb.c file to ARCH/STI architecture Peter Griffin
2014-09-09  9:00 ` [PATCH v2 4/4] ARM: multi_v7_defconfig: Enable stih407 usb picophy Peter Griffin

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=2894228.eRmxgHsWbh@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@st.com \
    --cc=patrice.chotard@st.com \
    --cc=peppe.cavallaro@st.com \
    --cc=peter.griffin@linaro.org \
    --cc=srinivas.kandagatla@gmail.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 NNTP newsgroup(s).