From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Eric Holmberg <eholmber-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Cc: kramasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [RFC] Driver configuration using Device Tree
Date: Sat, 20 Jul 2013 07:02:14 +0100 [thread overview]
Message-ID: <20130720060214.A7E853E16F1@localhost> (raw)
In-Reply-To: <51DC6E52.3080102-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
On Tue, 09 Jul 2013 14:10:58 -0600, Eric Holmberg <eholmber-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> wrote:
> I am trying to determine if Device Tree is an appropriate use for
> configuring drivers and would like to request comments. We currently
> use Device Tree in our Shared Memory Driver (SMD) that manages up to 64
> ports (where a port consists of an RX FIFO and a TX FIFO) between any
> two processors and a pair of interrupts for each processor. The shared
> memory address and interrupt configuration is stored in Device Tree and
> since this is hardware, this is considered an acceptable use. However,
> we also have two separate modules that use SMD and export devices to
> userspace through either the TTY framework (SMD TTY) or through a
> character device (SMD PKT). For these drivers, the configuration has
> less to do with hardware and more about which port to connect to in the
> SMD driver and how to expose the port to userspace through a device
> node. This code is used in Linux-based phones.
>
> The DT configuration looks like this:
> qcom,smdtty {
> compatible = "qcom,smdtty";
>
> qcom,smdtty-ds {
> qcom,smdtty-port-name = "DS";
> qcom,smdtty-edge = <0>;
> qcom,smdtty-dev-idx = <0>;
> };
> . . .
> /* on the order of 10 more port config items */
> };
>
>
> Question
> --------
> Is there a concern that DT should only be used for hardware
> configuration and that this "driver configuration" is not an acceptable
> use? If it is not acceptable, should I go back to using platform
> devices (seems like a step backwards) or some other method such as
> exporting a control channel to userspace that can be configured using an
> IOCTL?
It still is a reasonable leap to say that the DT contains the known-sane
configuration settings that are needed by the platform. It may not be
/strictly/ a hardware description, but it is a description of the usage
model of the platform.
I would however say that you only want that configuration to appear once
in the system. If, say, the linux host sets up and configures the SMD
regions, then I would like to see the remote systems dynamically
receiving the configuration from the linux host instead of having a
separate configuration file.
g.
next prev parent reply other threads:[~2013-07-20 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 20:10 [RFC] Driver configuration using Device Tree Eric Holmberg
[not found] ` <51DC6E52.3080102-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-07-20 6:02 ` Grant Likely [this message]
2013-07-22 20:05 ` Eric Holmberg
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=20130720060214.A7E853E16F1@localhost \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=eholmber-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=kramasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.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).