public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: mpa@pengutronix•de (Markus Pargmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [RESEND PATCH v3 2/4] usb: musb: Bugfix of_node assignment
Date: Mon, 4 Aug 2014 12:13:44 +0200	[thread overview]
Message-ID: <20140804101344.GA2863@pengutronix.de> (raw)
In-Reply-To: <52937F76.107@linutronix.de>

Hi Sebastian,

This thread was about the of_node assignment for the child device
musb-hdrc. Mainline commit:
	4fc4b274f9b3 (usb: musb: dsps: do not bind to "musb-hdrc")

On Mon, Nov 25, 2013 at 05:48:54PM +0100, Sebastian Andrzej Siewior wrote:
> 
> Is this fixing a bug? Commit 4fc4b2 ("usb: musb: dsps: do not bind to
> "musb-hdrc") [0] should fix the problem that is described here.
> ux500 is affected by the same problem as dsps but it is only visible on
> dsps because we DEFER probe for few reasons there test the fail path.
> 
> So by just looking at it should fix the same problem as the change I
> cited _but_ it would also cover ux500. Currently I can't think of any
> side effects by assigning of_node if the musb_init_*() did not do it.
> If we take this in I would suggest to remove the check I added (because
> it does no longer serve any purpose) and the description (why we do
> this, what is the problem exactly) is could be taken from my patch
> since I think it is better described (it safe to assign a node to a
> driver, it becomes unsafe if after platform_probe _also_ the DT probe
> is executed which was not to designed to work like this).
> 
> In the long term I would suggest to move the DT probe over to the musb
> core code and we wouldn't need the node assignment anymore?
> 
> [0] http://www.spinics.net/lists/linux-usb/msg94701.html

Really old thread but I just noticed that this solution does not work
for automatically parsed properties like 'default' pinctrl. I added
'default' pinctrl settings for the musb device node. They are
automatically setup by the driver core infrastracture as expected.

The problem is that the 'default' pincontrol settings will be applied
again for the musb-hdrc because they are extracted from the of_ndoe
data. This fails because they are already claimed by the 'musb-dsps'
driver. musb-hdrc continues probing, but there is a big error message
that it failed:

[    1.181912] pinctrl-single 44e10800.pinmux: pin 44e10a20.0 already requested by 47401c00.usb; cannot clai
m for musb-hdrc.1.auto
[    1.194053] pinctrl-single 44e10800.pinmux: pin-136 (musb-hdrc.1.auto) status -22
[    1.201930] pinctrl-single 44e10800.pinmux: could not request pin 136 (44e10a20.0) from group pinmux_usb1
_pins  on device pinctrl-single
[    1.214790] musb-hdrc musb-hdrc.1.auto: Error applying setting, reverse things back

Any ideas how to solve it for mainline?

Best regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140804/ed1f3e6a/attachment.sig>

  parent reply	other threads:[~2014-08-04 10:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18 15:54 [RESEND PATCH v3 0/4] usb: musb bugfixes Markus Pargmann
2013-11-18 15:54 ` [RESEND PATCH v3 1/4] usb: musb: gadget, stay IDLE without gadget driver Markus Pargmann
2013-11-25 15:56   ` Felipe Balbi
2013-11-18 15:54 ` [RESEND PATCH v3 2/4] usb: musb: Bugfix of_node assignment Markus Pargmann
2013-11-25 16:14   ` Felipe Balbi
2013-11-25 16:48     ` Sebastian Andrzej Siewior
2013-11-26  9:34       ` Markus Pargmann
2014-08-04 10:13       ` Markus Pargmann [this message]
2014-08-05 12:33         ` Sebastian Andrzej Siewior
2014-08-05 20:17           ` Felipe Balbi
2013-11-18 15:54 ` [RESEND PATCH v3 3/4] usb: musb: dsps, debugfs files Markus Pargmann
2013-11-25 15:57   ` Felipe Balbi
2013-11-26  9:25     ` Markus Pargmann
2013-11-26 16:40       ` Felipe Balbi
2013-11-18 15:54 ` [RESEND PATCH v3 4/4] usb: musb: dsps, use devm_kzalloc Markus Pargmann
2013-11-25 15:58   ` Felipe Balbi
2013-11-26  9:26     ` Markus Pargmann
2013-11-26 16:41       ` Felipe Balbi

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=20140804101344.GA2863@pengutronix.de \
    --to=mpa@pengutronix$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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