From: Stephen Warren <swarren@wwwdotorg.org>
To: Mark Rutland <mark.rutland@arm.com>, Alexander Shiyan <shc_work@mail.ru>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Pawel Moll <Pawel.Moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>
Subject: Re: [PATCH] Input: Add new driver for GPIO beeper
Date: Tue, 12 Nov 2013 12:23:46 -0700 [thread overview]
Message-ID: <52828042.4050501@wwwdotorg.org> (raw)
In-Reply-To: <20131112105930.GE2976@e106331-lin.cambridge.arm.com>
On 11/12/2013 03:59 AM, Mark Rutland wrote:
> On Tue, Nov 12, 2013 at 10:47:57AM +0000, Alexander Shiyan wrote:
>> Hello.
>>
>>> On Tue, Nov 12, 2013 at 10:07:13AM +0000, Alexander Shiyan wrote:
>>>> This patch adds a new driver for the beeper controlled via GPIO pin.
>>>> The driver does not depend on the architecture and is positioned as
>>>> a replacement for the specific drivers that are used for this function.
>>>>
>>>> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
>> ...
>>>> diff --git a/Documentation/devicetree/bindings/input/gpio-beeper.txt b/Documentation/devicetree/bindings/input/gpio-beeper.txt
>> ...
>>>> +Example:
>>>> +
>>>> +beeper: input@0 {
>>>> + compatible = "gpio-beeper";
>>>> + reg = <0>;
>>>> + gpios = <&gpio3 23 0>;
>>>> +};
>>>
>>> What are the reg / unit-address for?
>>
>> Just an example from "simple-bus" container.
>
> If they have no meaning, they should go. They're unnecessary and make
> things more confusing.
>
> I'd expect the example to be:
>
> beeper: beeper {
> compatible = "gpio-beeper";
> gpios - <&gpio3 23 0>;
> };
>
> And if we have multiple beepers, something like:
>
> beeper0: beeper0 { ... };
> beeper1: beeper1 { ... };
DT node names aren't meant to encode identity though. What we've done in
the past for nodes without a reg where multiple instances were desired
is to put them into simple-bus and add a reg, so:
beeper0: beeper@0 { reg = <0>; ... };
beeper1: beeper@1 { reg = <1>; ... };
Of course, if there's only one of them, then it could just be "beeper"
with no reg. The binding and example should probably reflect that simple
case.
next prev parent reply other threads:[~2013-11-12 19:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 10:07 [PATCH] Input: Add new driver for GPIO beeper Alexander Shiyan
2013-11-12 10:15 ` Mark Rutland
2013-11-12 10:47 ` Alexander Shiyan
2013-11-12 10:59 ` Mark Rutland
2013-11-12 19:23 ` Stephen Warren [this message]
2013-11-19 21:32 ` Dmitry Torokhov
[not found] ` <20131119213239.GC25784-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2013-11-22 17:28 ` Alexander Shiyan
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=52828042.4050501@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=Pawel.Moll@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-input@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rob.herring@calxeda.com \
--cc=shc_work@mail.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.