Message ID | Y8+9WRP51u+dof8p@mt.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2092989wrn; Tue, 24 Jan 2023 03:24:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXuBpc1n5xGnIoZh6Z3pujNfrdnpmnRAuX5arrj6JD83OibeTY2RWtGD3XF6lCv6X12xcaKO X-Received: by 2002:a05:6402:28c6:b0:49b:98be:c38 with SMTP id ef6-20020a05640228c600b0049b98be0c38mr30856082edb.11.1674559478538; Tue, 24 Jan 2023 03:24:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674559478; cv=pass; d=google.com; s=arc-20160816; b=WRElqCrUxnJZgS6y9y3ilaFxyfDWVnmoqT4pStnkCtG+SGTvYccT+C5YF2vbVSOjU8 pDF6VQbaxZV25o1WNhmHC/lLrTCxzw4ChWB9gotsbuguKMlhkogETLc4HOBSPc/J3qZl jCGgI+qnrq3e6U2+Tomx11YIis+XTpq99wi31J4mFnyRt4AwTmjAffjlb9ppr8CJMeY8 8asJz67ltC1UgzrnWTjoWbn93QfYRSn8YXl5bm6KUs/1KC1HLZwYkzWIAkLm21AQhpW+ h1kXBI9QrJIY+DKl1b6ZkSuPhrsw5HOdfmoa7mvpZidPHwv/ggr1UnnCCNIhdzKLIY3A Di5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WnodbyZMopN7JaAyoJy+8eyLEBzx5ZhK8voZ+UTUvUc=; b=xEWpzxRTY6atEnCzEAUjQ1f7yNscWOCDQn0v+5mqVGLhNT/XGEWfO2vR2/5OYG811p uFuZePfL8lnrHIQczv+XWxFkQ2K4ZYP+h7Q+qFgBKwrTP3Y3w5CURnQS+dJH3rGM0ik/ Dgvctpffekt5uSyXoPz5vCt+qy+2VdNjM/75zyrdISlTwntPkR/q8oAkgW38hOWKypPu C0k53eWmmcRDRylyHbax8fLoEIgRaHGn9bZdTVkVqnxIksG2p0A48VAStz/fNN4KHH9N 2svs0xfVGLzYl06DcZX1gkBPHpQHO6dQZoF2V+vwyuwCKQ5gaC21+eblKZJ6s/VUfGGT Y8Zg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mt.com header.s=selector2 header.b=CxaLKHjk; arc=pass (i=1 spf=pass spfdomain=mt.com dkim=pass dkdomain=mt.com dmarc=pass fromdomain=mt.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020aa7d982000000b0049cbe322904si2584602eds.408.2023.01.24.03.24.09; Tue, 24 Jan 2023 03:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mt.com header.s=selector2 header.b=CxaLKHjk; arc=pass (i=1 spf=pass spfdomain=mt.com dkim=pass dkdomain=mt.com dmarc=pass fromdomain=mt.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233806AbjAXLNi (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 06:13:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233279AbjAXLNf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 06:13:35 -0500 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2123.outbound.protection.outlook.com [40.107.104.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A91BFEC63; Tue, 24 Jan 2023 03:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RVhvvgMxMWq8r6se6EOEMvym5azmhiDkJJkB689h2USgqTP1eOa8RVFl12az+I53VOUIg/YXoocE5F2H7M+C5lFF5Hk79aD6ipydwcb58c901HtIFUPCZqfGGZm1T+W02wFeUJIeGX9U7mQpAmDwUD1zxccte0yCQKrREZLj08uVEZuIjSCiPC919KNxteBlsnLWCxac0e0uCaMN0ByJULvX4X7xb6kXZvo9fCW9qprzh65tWi+pejHBUC2baFy+3eQCTW7HzcAU+C4uJzXqjns7ay7cvGI3ZF6MK6vE5em0ujkMZi3ehpe/8Yz99DbZdpj5a++UarsMk1dhjjs6+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WnodbyZMopN7JaAyoJy+8eyLEBzx5ZhK8voZ+UTUvUc=; b=UkD6qPtlPdzsB9cQwgWpId/tjTYcfQC08jdjI9DWHyT8P29nXVp5tl2EUHHUiOOczWgMt1twbqq3nDrxgjRGbrPNna1IXFsUlrThChSLh8zUpWOspRVgUhV57eqP96ITgCFkSs9pfHz8lFsarg5jzCjnirbThfCZ5oVGavko5+kiP913E9xPi4E8a9H+HzVfNZdN03i9XjPZNzyLsSzM1OJQuaB9h4V8uiozrCNED4UL8JebqQcHLei/Nypczvk+BnwilaDU4vRpfIyiPv0xWTFSvJj5dJ1bFPowtGVilNlBCJ7sThwQpXoCz6lVhysiZu0Yq2WNA3rm+//lvTjtzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mt.com; dmarc=pass action=none header.from=mt.com; dkim=pass header.d=mt.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mt.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WnodbyZMopN7JaAyoJy+8eyLEBzx5ZhK8voZ+UTUvUc=; b=CxaLKHjkcMMJvOMNccXgh/9aq8s6KUpqwfYdSb8rhFy8ilc28XRZrtOpN21tNsBjVOv9ex1MKU6j7XQlMxqc09A5XLsP0ZZXTSCpvJtCK9uNtG8shLej26DDJA/hd/58OxVeaHXrJNbA+oDOTZZrViJBG1jj+1yb0Z9JBdlLMJZiA/ln4X5Ovmr98WqHsSm7tm7K3cj4u2W1Q5zbTvzuofwuT9FgiskZE3gl7tjvviZ4pIlJ+tSSO9QP2Dl9jz4H7vVsCCqb3GdggLVejrglzYFTgbX8XGqatrcXCcX1LUCqrlKxujRBh/iU0WxcJ2JWxG0Ip/YH/XBebRnD9kAczA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mt.com; Received: from AS8PR03MB7621.eurprd03.prod.outlook.com (2603:10a6:20b:345::20) by DB9PR03MB9639.eurprd03.prod.outlook.com (2603:10a6:10:45b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 11:13:31 +0000 Received: from AS8PR03MB7621.eurprd03.prod.outlook.com ([fe80::b42f:82f8:24cb:a225]) by AS8PR03MB7621.eurprd03.prod.outlook.com ([fe80::b42f:82f8:24cb:a225%5]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 11:13:31 +0000 Date: Tue, 24 Jan 2023 12:13:29 +0100 From: Manuel Traut <manuel.traut@mt.com> To: linux-kernel@vger.kernel.org Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Frieder Schrempf <frieder.schrempf@kontron.de>, linux-input@vger.kernel.org Subject: [PATCH 2/3 v6] input: pwm-beeper: add feature to set volume level Message-ID: <Y8+9WRP51u+dof8p@mt.com> References: <Y8+8824hy/fWkpEk@mt.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <Y8+8824hy/fWkpEk@mt.com> X-ClientProxiedBy: AS4P189CA0036.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5dd::7) To AS8PR03MB7621.eurprd03.prod.outlook.com (2603:10a6:20b:345::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR03MB7621:EE_|DB9PR03MB9639:EE_ X-MS-Office365-Filtering-Correlation-Id: 8202e2c4-155f-43fa-98c1-08dafdfc06f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /DoLYMOGqCtPgNRme7Ku/UNbTO9/FVKp/le9+9pdagAu1gh1QiyTL11IV69QlOUUSNC03NuaUOBbHTp7X76wHCBRsh5ClPbWAAsZdcTVHGJYHquEWbQq8/sfqogvqO03qKkYa9CiK4vE8BCS/Zm1KK8AZqc1QBRtY2ax0OihhmDhwduT/oKz9crA6hay1PuKMNTLd7u7WSBHgPDUyYKau/2WDODErwzQglnElJNjufimApxTW0whOtm9r12GnuizJJj+DX92NJbUDmmCp5aG8b2bWq774Uu8Kz+HhR88YuMPh/SvfjSnjssTg6R5bOl9sqPKj/zG/cALTLp+ahghp/pObxGJzRxnqYxr83/8MOt9oVFpy5lkoTmaBHhx00yJzCLRFJpWMbJWXZ2aaPAJUXo2h+IOAV+kyZ6epgA356eqNytOCI+Ejxj5XN/hGp6v/JyoDkEeNHilimUQyp7xJBaJq79VQwAtyrcXcGz1Mx5llY4S5oGyf/3yWQg4sTECgHHAFAotlp4pxSjvt3X0Dx6f1ysapah8Ai8o1/rMIQlvyW9ABF9lJV/FSIVDXwwTL1jX+0CLqeqNvt0NCTOIcXDJ/yR3Clx+3yk60KHylC4v+LMHwFgWgP7lZ/JvBiydPRejEAKdbRzTP9zQjxbTUIXbxTYGHumZezDoIifRbJ24xh5k31bol9oL+L4z5DbkWHOO+RjBlOR+cSMzLh47Bw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR03MB7621.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(346002)(366004)(136003)(396003)(39860400002)(376002)(451199015)(2906002)(54906003)(41300700001)(4326008)(66476007)(66946007)(36756003)(6916009)(66556008)(8676002)(44832011)(5660300002)(2616005)(8936002)(316002)(186003)(6512007)(38350700002)(86362001)(6506007)(38100700002)(26005)(52116002)(6486002)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ALRYwTHsNUWeE/PpSso016i1Y6zy?= =?utf-8?q?XJ4IlAeiRmlbhPyuiwMLFoMPaJ7kSKKzUmwiwEPVvT/tPuQkyyeVTSkqHY4Uec3Xu?= =?utf-8?q?vFAmD2e/2LFB9hZGqD/hZYtEpp/pIdUpqVLPxAAq3yOR5uIYeh0cweRPjj9KSHIfH?= =?utf-8?q?sMhmuLjYw4vrEb6GxVjB1KF6rLh8hm2CToYACWrxb7ywj72/qgdY8Q1+kLVez7kgN?= =?utf-8?q?8HCfazYuDW6ldWyRjF3KcGV0YVvyvF946ezyrRdK2ompQ6W8Rqq9VMs8GHQGIOHiC?= =?utf-8?q?tvIJ1ELjmJAFUozqWfEUgYygnfPJDqF3Bf6J3zeVWNEIiB+2u+0yYJRJPm3jDjwcI?= =?utf-8?q?P9RcTDsjKo/toNSoEGBhZKVwCZiry2NcE4xhecCkX0aRa6MA/5DqmUvpYsRONtlxv?= =?utf-8?q?8v+8eNSN+MC1SGCfuDgdF8SWRpflappK702RAyGPOLBMtSHF+ir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jCMa4/2?= =?utf-8?q?bdPuzVKpNvi9LiupbHKbe4KsFP9og+BXcJF3dGM3TX1VMBkfqg9lkGFDAhQFFdUJq?= =?utf-8?q?N4ptU0lU25TQFjtJsCu4MEvqNUuWrayT3eEbebYQPGJVFmgGF5vwAPCE+Rp1bJLr5?= =?utf-8?q?cHbpRN8RQcKzu5KOp80TJs7plBuWDBk8+g06+Gxi4JAqm7mW0uh4tgXDYIRSQDp8u?= =?utf-8?q?L93GZXnxzjQI?= X-OriginatorOrg: mt.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8202e2c4-155f-43fa-98c1-08dafdfc06f9 X-MS-Exchange-CrossTenant-AuthSource: AS8PR03MB7621.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 11:13:31.7890 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fb4c0aee-6cd2-482f-a1a5-717e7c02496b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: b8JjyLNwiyv/EypsAcuvqcOmKhDu8S7ubHHQxR7ZzQ8NUqnRHKJv3UiTOOdrbyuKGOoSiHm2PlXiXw4koTFnpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB9639 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755902235795346530?= X-GMAIL-MSGID: =?utf-8?q?1755902879806099298?= |
Series |
input: pwm-beeper: add feature to set volume level
|
|
Commit Message
Manuel Traut
Jan. 24, 2023, 11:13 a.m. UTC
This patch adds the documentation for the devicetree bindings to set the volume levels. Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> Acked-by: Rob Herring <robh@kernel.org> --- .../devicetree/bindings/input/pwm-beeper.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Comments
On 24/01/2023 12:13, Manuel Traut wrote: > This patch adds the documentation for the devicetree bindings to set > the volume levels. Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel. > > Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> I think it is kontron.de now. > Acked-by: Rob Herring <robh@kernel.org> This misses your SoB. > --- > .../devicetree/bindings/input/pwm-beeper.txt | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt b/Documentation/devicetree/bindings/input/pwm-beeper.txt > index 8fc0e48c20db..93cab5eee9f2 100644 > --- a/Documentation/devicetree/bindings/input/pwm-beeper.txt > +++ b/Documentation/devicetree/bindings/input/pwm-beeper.txt > @@ -9,6 +9,15 @@ Required properties: > Optional properties: > - amp-supply: phandle to a regulator that acts as an amplifier for the beeper > - beeper-hz: bell frequency in Hz > +- volume-levels: Array of PWM duty cycle values that correspond to > + linear volume levels. These need to be in the range of 0 to 500, > + while 0 means 0% duty cycle (mute) and 500 means 50% duty cycle > + (max volume). > + Please note that the actual volume of most beepers is highly > + non-linear, which means that low volume levels are probably somewhere > + in the range of 1 to 30 (0.1-3% duty cycle). > +- default-volume-level: the default volume level (index into the > + array defined by the "volume-levels" property) The bindings should be converted to DT schema first and then new properties added. Best regards, Krzysztof
On 24/01/2023 12:13, Manuel Traut wrote: > This patch adds the documentation for the devicetree bindings to set > the volume levels. > > Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> > Acked-by: Rob Herring <robh@kernel.org> > --- One more: Use subject prefixes matching the subsystem (which you can get for example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch is touching). Best regards, Krzysztof
Hi Krzysztof, Am 24.01.2023 um 12:29 hat Krzysztof Kozlowski geschrieben: > On 24/01/2023 12:13, Manuel Traut wrote: > > This patch adds the documentation for the devicetree bindings to set > > the volume levels. > > > > Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> > > Acked-by: Rob Herring <robh@kernel.org> > > --- > > One more: > > Use subject prefixes matching the subsystem (which you can get for > example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory > your patch is touching). Thanks for your feedback. I will post a v7 soon that includes your feedback, the findings from the kernelbot and a fix that allows unloading and loading of the module. Best regards Manuel
diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt b/Documentation/devicetree/bindings/input/pwm-beeper.txt index 8fc0e48c20db..93cab5eee9f2 100644 --- a/Documentation/devicetree/bindings/input/pwm-beeper.txt +++ b/Documentation/devicetree/bindings/input/pwm-beeper.txt @@ -9,6 +9,15 @@ Required properties: Optional properties: - amp-supply: phandle to a regulator that acts as an amplifier for the beeper - beeper-hz: bell frequency in Hz +- volume-levels: Array of PWM duty cycle values that correspond to + linear volume levels. These need to be in the range of 0 to 500, + while 0 means 0% duty cycle (mute) and 500 means 50% duty cycle + (max volume). + Please note that the actual volume of most beepers is highly + non-linear, which means that low volume levels are probably somewhere + in the range of 1 to 30 (0.1-3% duty cycle). +- default-volume-level: the default volume level (index into the + array defined by the "volume-levels" property) Example: @@ -21,4 +30,6 @@ beeper { compatible = "pwm-beeper"; pwms = <&pwm0>; amp-supply = <&beeper_amp>; + volume-levels = <0 8 20 40 500>; + default-volume-level = <4>; };