From: Simon Glass <sjg@chromium.org>
To: lk <linux-kernel@vger.kernel.org>
Cc: Devicetree Discuss <devicetree-discuss@lists.ozlabs.org>,
Che-liang Chiou <clchiou@chromium.org>
Subject: Device tree node to major/minor?
Date: Tue, 20 Nov 2012 14:23:14 -0800 [thread overview]
Message-ID: <CAPnjgZ0+8MbjmW7XKsSW0O0n2ob7XcUZokLd8b=1LkSUJ+tQEA@mail.gmail.com> (raw)
Hi,
I hope this is a stupid question with an easy answer, but I cannot find it.
I have a device tree node for an mmc block device and I want to use
that block device from another driver. I have a phandle which lets me
get the node of the mmc device, but I am not sure how to convert that
into a block_device. In order to do so, I think I need a major/minor
number. Of course the phandle might in fact point to a SCSI driver and
I want that to work correctly also.
I imagine I might be able to search through the wonders of sysfs in
user space, but is there a better way?
Thanks,
Simon
next reply other threads:[~2012-11-20 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 22:23 Simon Glass [this message]
2012-11-20 22:32 ` Device tree node to major/minor? Grant Likely
2012-11-20 23:48 ` Simon Glass
2012-11-21 15:47 ` Grant Likely
2012-11-21 20:48 ` Simon Glass
2012-11-21 23:07 ` Grant Likely
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='CAPnjgZ0+8MbjmW7XKsSW0O0n2ob7XcUZokLd8b=1LkSUJ+tQEA@mail.gmail.com' \
--to=sjg@chromium.org \
--cc=clchiou@chromium.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.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).