From: Sebastian Reichel <sre@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: NeilBrown <neilb@suse.de>, Grant Likely <grant.likely@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rutland <mark.rutland@arm.com>, Jiri Slaby <jslaby@suse.cz>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] TTY: add slave driver to power-on device via a regulator.
Date: Fri, 12 Dec 2014 02:31:49 +0100 [thread overview]
Message-ID: <20141212013149.GB16599@earth.universe> (raw)
In-Reply-To: <3884A980-C9EE-42A2-8D23-DF65FEC61DD2@holtmann.org>
[-- Attachment #1: Type: text/plain, Size: 2362 bytes --]
Hi Marcel,
On Fri, Dec 12, 2014 at 01:46:33AM +0100, Marcel Holtmann wrote:
> > NACK. The compatible value should describe the connected device. You
> > did not connect a regulator, but a bluetooth chip! DT should look
> > like this:
> >
> > &uart1 {
> > bluetooth {
> > compatible = "vendor,bluetooth-chip";
> > vdd-supply = <&vaux4>;
> > };
> > };
> >
> > I think it would be ok to use your generic driver to handle the
> > specific compatible value, though.
> >
> > Having the proper compatible value means, that there can be a more
> > specific driver later, that other operating systems can expose the
> > device as some kind of /dev/bluetooth instead of /dev/ttyXY, that
> > userspace is able to know there is a bluetooth device connected to
> > /dev/ttyXY by parsing the DT and results in easier-to-understand
> > DTS.
>
> I think that is up to udev to be able to make this a nice device
> node. However the device node name is pretty much irrelevant.
Ah that was not about Linux, but about $random-os using DT. Just
ignore the device name its not important for the argument.
> What you want is enough meta data to tell that there is Bluetooth
> chip behind this TTY.
Yes, that is what I tried to say :)
> From a Bluetooth stack perspective only hciattach needs to be run
> to get the N_HCI line discipline up and running for that chip.
Yes, but with the metadata from Neil's proposed binding you do not
know, that there is a bluetooth chip connected, so you need to do
this manually. Not very nice, when it could be done automatically.
> However what would be interesting for hciattach would be a
> possibility to expose the Bluetooth manufacturer. Since the init
> routine is different for each manufacturer.
Yes and it may be, that a manufacturer breaks its init routine at
some point. The problem is not much different from other devices
and normally solved through the compatible string.
> So if that could be encoded in the DT, then that would be
> certainly helpful.
All needed data should be encoded when specified as in the following
example:
&uart1 {
bluetooth {
compatible = "wi2wi,w2cbw003";
vdd-supply = <&vaux4>;
};
};
Note: wi2wi is not yet in
Documentation/devicetree/bindings/vendor-prefixes.txt
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-12 1:31 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 21:59 [PATCH 0/3] Add support for 'tty-slaves' described by devicetree NeilBrown
2014-12-11 21:59 ` [PATCH 1/3] TTY: add support for "tty slave" devices NeilBrown
[not found] ` <20141211215943.4127.24792.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-11 22:41 ` Sebastian Reichel
2014-12-11 23:18 ` Peter Hurley
[not found] ` <548A264D.8070103-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2014-12-12 5:23 ` NeilBrown
[not found] ` <20141212162352.66be5b5e-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-12 13:02 ` Peter Hurley
2014-12-13 14:23 ` One Thousand Gnomes
[not found] ` <20141213142344.61372b92-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2014-12-16 16:14 ` Peter Hurley
2014-12-13 14:12 ` One Thousand Gnomes
2014-12-12 11:59 ` Grant Likely
2014-12-13 17:46 ` Sebastian Reichel
2014-12-13 22:22 ` Grant Likely
2014-12-28 14:20 ` Pavel Machek
2015-01-02 21:33 ` NeilBrown
2015-01-04 10:18 ` Pavel Machek
2015-01-05 7:09 ` NeilBrown
[not found] ` <20150105200936.2ba8f596-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-01-05 13:43 ` Pavel Machek
2015-01-05 15:41 ` One Thousand Gnomes
2015-01-05 16:28 ` Pavel Machek
2014-12-11 21:59 ` [PATCH 2/3] TTY: add slave driver to power-on device via a regulator NeilBrown
[not found] ` <20141211215944.4127.4186.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-11 22:58 ` Sebastian Reichel
2014-12-12 0:46 ` Marcel Holtmann
2014-12-12 1:31 ` Sebastian Reichel [this message]
2014-12-12 5:01 ` NeilBrown
2014-12-11 23:32 ` Peter Hurley
2014-12-12 5:27 ` NeilBrown
[not found] ` <20141212162714.3a2378df-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-12 11:59 ` Peter Hurley
2014-12-12 12:05 ` Grant Likely
2014-12-11 21:59 ` [PATCH 3/3] TTY/slave: add driver for w2sg0004 GPS NeilBrown
[not found] ` <20141211215944.4127.57146.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-11 23:04 ` Sebastian Reichel
2014-12-11 23:11 ` One Thousand Gnomes
[not found] ` <20141211231100.05782a30-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2014-12-12 5:06 ` NeilBrown
[not found] ` <20141212160607.361d20db-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-15 11:39 ` One Thousand Gnomes
2014-12-12 12:11 ` 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=20141212013149.GB16599@earth.universe \
--to=sre@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mark.rutland@arm.com \
--cc=neilb@suse.de \
/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