From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
Date: Wed, 30 Sep 2015 11:18:03 -0500 [thread overview]
Message-ID: <20150930161803.GI32625@saruman.tx.rr.com> (raw)
In-Reply-To: <CAL_JsqK-aAY+DAwt0YH-mbBo+a9c7WPrBwJJoy3=FkT6ZX2A5w@mail.gmail.com>
On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote:
> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
> <subbaraya.sundeep.bhatta@xilinx.com> wrote:
> > Hi Peter,
> >
> >> -----Original Message-----
> >> From: Peter Chen [mailto:peter.chen at freescale.com]
> >> Sent: Thursday, September 24, 2015 2:41 PM
> >> To: Subbaraya Sundeep Bhatta
> >> Cc: balbi at ti.com; devicetree at vger.kernel.org; kishon at ti.com;
> >> gregkh at linuxfoundation.org; linux-usb at vger.kernel.org; linux-
> >> kernel at vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
> >> linux-arm-kernel at lists.infradead.org
> >> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
> >>
> >> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
> >> wrote:
> >> > This patch adds binding doc info for generic ULPI PHYs platform
> >> > driver.
> >> >
> >> > Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
> >> > ---
> >> > .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
> >> ++++++++++++++++++++
> >> > 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644
> >> > Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> >
> >> > diff --git
> >> > a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> > b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> > new file mode 100644
> >> > index 0000000..7b8cbb4
> >> > --- /dev/null
> >> > +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> > @@ -0,0 +1,34 @@
> >> > +Platform driver for generic ULPI PHYs
> >> > +
> >> > +Required properties:
> >> > +- compatible : Should be "ulpi-phy"
> >> > +- reg : Physical base address and size of the USB
> >> > + controller registers map to which this PHY
> >> > + is connected.
> >> > +- view-port : Should contain viewport register offset of the
> >> > + USB controller to which this PHY is connected Optional
> >> > +properties:
> >> > +- drv-vbus : required if turning VBUS on/off has to be driven
> >> > + by writing to PHY. This feature depends on board
> >> > + design.
> >> > +
> >> > +Example:
> >> > +Below example shows the PHY binding for Chipidea USB controller which
> >> > +has ulpi viewport register at 0x0170
> >> > +
> >> > + usb_phy0: phy0 {
> >> > + compatible = "ulpi-phy";
> >> > + reg = <0xe0002000 0x1000>;
> >> > + view-port = <0x0170>;
> >> > + drv-vbus;
> >> > + };
> >> > +
> >> > + usb0: usb at e0002000 {
> >> > + compatible = "chipidea,usb2";
> >> > + interrupt-parent = <&intc>;
> >> > + interrupts = <0 21 4>;
> >> > + reg = <0xe0002000 0x1000>;
> >>
> >> Although just call devm_ioremap twice for the same register region does not
> >> cause any errors, I am not sure if it will has other potential problems. Cc: arm
> >> list.
> >
> > Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
> > devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
> > adding arm-list.
>
> Don't put overlapping resources in the DT. Having 2 drivers accessing
> the same registers is not a clean or safe design.
thanks, saves me the trouble of saying the same thing.
Bottom line, if devm_ioremap_resource() fails, you're wrong. Just fix
your driver and move on.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150930/dbaeba0c/attachment-0001.sig>
next prev parent reply other threads:[~2015-09-30 16:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1443012841-13673-1-git-send-email-sbhatta@xilinx.com>
2015-09-24 9:10 ` [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver Peter Chen
2015-09-24 9:26 ` Subbaraya Sundeep Bhatta
2015-09-24 16:18 ` Rob Herring
2015-09-30 16:18 ` Felipe Balbi [this message]
2015-10-11 11:15 ` punnaiah choudary kalluri
2015-10-11 14:40 ` Kishon Vijay Abraham I
2015-10-28 11:55 ` Subbaraya Sundeep Bhatta
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=20150930161803.GI32625@saruman.tx.rr.com \
--to=balbi@ti.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;
as well as URLs for NNTP newsgroup(s).