From: Heiko Schocher <hs-ynQEQJNshbs@public.gmane.org>
To: Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Jonas Mark (ST-FIR/ENG1)"
<Mark.Jonas-V5te9oGctAVWk0Htik3J/w@public.gmane.org>,
Heiko Schocher <hs-ynQEQJNshbs@public.gmane.org>,
"linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"GUAN Ben (ST-FIR/ENG1-Zhu)"
<Ben.Guan-dUNdQdTMQaZWk0Htik3J/w@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Boris Brezillon
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Manfred Schlaegl <manfred.schlaegl-RbZlAiThDcE@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Subject: Re: [PATCH] Input: pwm-beeper: support customized freq for SND_BELL
Date: Tue, 14 Feb 2017 06:02:22 +0100 [thread overview]
Message-ID: <58A28F5E.1020401@denx.de> (raw)
In-Reply-To: <20170214042748.GC19688@dtor-ws>
Hello Dmitry,
Am 14.02.2017 um 05:27 schrieb Dmitry Torokhov:
> On Wed, Feb 08, 2017 at 10:11:21AM +0000, Jonas Mark (ST-FIR/ENG1) wrote:
>> Hello Dmitry,
>>
>>>> extend the pwm-beeper driver to support customized frequency
>>>> for SND_BELL from device tree.
>>>
>>> No, SND_BELL is literally SND_TONE @1000Hz. There should be no
>>> customizing. If applications want to use different frequency then should
>>> be using SND_TONE.
>>
>> We are not aiming for an application shortcut here. Instead, changing
>> the bell frequency shall be a system setting. That is, every
>> application which wants to make a bell sound shall use the alternative
>> frequency.
>>
>> The reason why we are deviating from the default 1000 Hz is that on
>> our hardware we are using a loudspeaker which is rated for 2.7 kHz.
>> That is, it will only sound at the specified volume and frequency if
>> you feed it with a 2.7 kHz square wave. If you deviate from it, e.g.
>> by using 1000 Hz, the output will be dim and squeaky. Worst case,
>> SND_BELL would be completely silent on our system. So the only bell
>> sound we can reliably generate on our system has 2.7 kHz.
>
> OK, fair enough. Please address Rob's comments on binding and resend.
Done already, just waited for more comments before sending v2.
> Also I am not sure why you needed to change the switch statement around,
> you only need to replace 1000 with value from the attribute.
Hmm.. the resulting code looks cleaner to me ... First we check all
the reasons for returning an error code, after that, we can do
the functions work ... but I can revert this part ... should I ?
> Oh, and please use device_property_*() API instead of of_*().
Thanks! Good tip, changed.
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-02-14 5:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 5:21 [PATCH] Input: pwm-beeper: support customized freq for SND_BELL Heiko Schocher
[not found] ` <1486444894-18321-1-git-send-email-hs-ynQEQJNshbs@public.gmane.org>
2017-02-07 18:13 ` Dmitry Torokhov
2017-02-08 10:11 ` AW: " Jonas Mark (ST-FIR/ENG1)
2017-02-14 4:27 ` Dmitry Torokhov
2017-02-14 5:02 ` Heiko Schocher [this message]
2017-02-10 15:48 ` Rob Herring
2017-02-13 6:12 ` Heiko Schocher
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=58A28F5E.1020401@denx.de \
--to=hs-ynqeqjnshbs@public.gmane.org \
--cc=Ben.Guan-dUNdQdTMQaZWk0Htik3J/w@public.gmane.org \
--cc=Mark.Jonas-V5te9oGctAVWk0Htik3J/w@public.gmane.org \
--cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=manfred.schlaegl-RbZlAiThDcE@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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).