Message ID | 20230130135650.1407156-4-manuel.traut@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 s9csp2190727wrn; Mon, 30 Jan 2023 05:57:56 -0800 (PST) X-Google-Smtp-Source: AK7set9w0E3mviASJLVPIvakPl5DANHP78OFRhdlPT/0Rm2HKsN+Hohb5oiJg7oDcoBFlTV0pgH9 X-Received: by 2002:a05:6a20:7f8b:b0:bd:8f4:991b with SMTP id d11-20020a056a207f8b00b000bd08f4991bmr6037266pzj.56.1675087076567; Mon, 30 Jan 2023 05:57:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675087076; cv=pass; d=google.com; s=arc-20160816; b=suvaphMvnL8LUv5/Sy7TjxcZMflEojScwJxc+m4fff3qYuAnDQJDP+IijBrq6lRVMO mCTRJHnkC8+aSsqTFcEfE57iI8XdMXANjglm4TapKxB451GxzwL/5lh9Cp3qYn9C0E0C BK4r3xb8/ZgHO7mAtsFa2ykZNM0Fwie22FUUdXQC4oFl0uTQKif4b4Vza4AMgkaRD0oa qm0IEnZaqfkZJTYP25M+U5tdp45h5vZZkGU7bPAepM9imN9dCyUmBHdT39rg8Xi630j0 WVD27r6MoC7N/5r+A0ORUo9igTgms+toBaSN30zWqbc6REXHIikPEvR8DJ0YwmuBZQJO sFdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xdmM1EIME/d/UNuEnq5tXxpVUaNzDCS+vZxpVuC/Ekw=; b=E1zS3Em7ufiXWKepS5AP8CUsTqEC7vRd0BLc9X4zayFK29vfWU4uj3+PnlX1uOmb+N /5hW1hHK74vXkB1mSpAN8F0Fv4S3tbxH2iCfAtNkTPzcFE7bQdVUJI+dQ63AIaTPeosM 8XGbRD+SM3zmpVXINUVIeXu93kXGwvngYbPaRiMORdHTKiBiPl117zNca+EIXjAKj5Cb orbE4n77jBaHG/DkU47hEzR2+TqKCCoNux9HviHrge3j8eaU4cYt/iczjTDH0+4kjSDs sdf+Yru397eH4kQfLi4laVnSoWP/Jpo8qf8EHft2QHAUlgf9NvpIHCNMADuJ2r7Mzt3U AtSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mt.com header.s=selector2 header.b=BYwYSutj; 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 o2-20020a639a02000000b004cf1153a948si12440340pge.305.2023.01.30.05.57.43; Mon, 30 Jan 2023 05:57:56 -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=BYwYSutj; 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 S236754AbjA3N5V (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Mon, 30 Jan 2023 08:57:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236691AbjA3N5I (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 30 Jan 2023 08:57:08 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2098.outbound.protection.outlook.com [40.107.6.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF76339CD9; Mon, 30 Jan 2023 05:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mKm/yF8ZTmy+Guf7FEbcin1dksfbqI1LI/KgL8JukWaiVHDzwmGbrZY90Mn8JLilyYY5Be9bmV/QSK7wf2vgdmAdtuzseeTyrvQrWtZbRWpwZhHVBCAU443io4YZOjo7chlb4A21WFJvRrJBGQmej+4uV0qH3cGVd0MwXWFoLufUm3b2Uowvc5rpzeurdB5+DTF62Qu1RANjKtDfdTHjKV0yuriJIuhxRqc6Q79Qw2SEBnnj0QDYm5lc7WiDhkq9Pz5+rm5vARL2xLvNPbalzlYVQHl3NIWll82ccdJ0iI3uZHIDuCN44TeTPYa8zmKyH3tqehXmu1FCFVLW6tFLYg== 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=xdmM1EIME/d/UNuEnq5tXxpVUaNzDCS+vZxpVuC/Ekw=; b=X/+BNQK0qzSMaZRWfRdNOI9aG/tPpO/U0PAWgSLAnApseHnNPLyajDlaDSy3JXezvWUYO466ROny6w6Hc1ni4kpE6g52Pgwb4ZCMsmyXuxmdYRotSSOTa4pmgzhOW+QdEGZ5dbFDxxJVQe3PqdnUcpQmDvB7I70KtPCkpTL6jcqR9VE1NrrdKLoAyt6Ad1lc9Z/8puyCQlRnT6e+fquebyjWmwiUN2bqv/b3RVzrhgSc2arUXKX5xZ0/N/Ph1aDYdwm6nNWtQVqezFaot79kRAk8g7ZXu35/qwOxVP9amQoeFPtXiWMGPr8UuLyS99XxL6rMr98OaArikSwbGuiSbw== 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=xdmM1EIME/d/UNuEnq5tXxpVUaNzDCS+vZxpVuC/Ekw=; b=BYwYSutjGvtGr6n5BErQhq8zIJB1G076VC/WkB5SjtkaIJx+7lEpSDGZvrbcPeBbD1E7QiMiJLaKXFqUEAhvI/7YfbidCO2It9a1KiQEKsocfjFsP8ABFgAfY57mHV4bzLnTQvaWIq/SA4iJIZ3rZFDvyO796o1ClrfBxk+vB0cS+7BYdNuCFKQiGrs8uGup2OMpGLttQ1NX+k8Qi2swb3HomCSEmqVyjMDhrknTZLUQktuJlrk/EKHxYGnQba0uotyhNqBEk3f8b+MUoMU/DfOP1nMG6jrPZkW43AvUVOInKdvMNb7JEhwsSSjm7tEJQgvI1AKQSCfwv3MKPpHRWw== 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 PAWPR03MB9081.eurprd03.prod.outlook.com (2603:10a6:102:33d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33; Mon, 30 Jan 2023 13:57:05 +0000 Received: from AS8PR03MB7621.eurprd03.prod.outlook.com ([fe80::b42f:82f8:24cb:a225]) by AS8PR03MB7621.eurprd03.prod.outlook.com ([fe80::b42f:82f8:24cb:a225%9]) with mapi id 15.20.6043.036; Mon, 30 Jan 2023 13:57:05 +0000 From: Manuel Traut <manuel.traut@mt.com> To: linux-kernel@vger.kernel.org Cc: Manuel Traut <manuel.traut@mt.com>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Frieder Schrempf <frieder.schrempf@kontron.de>, linux-input@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v9 3/4] dt-bindings: input: pwm-beeper: add volume Date: Mon, 30 Jan 2023 14:56:49 +0100 Message-Id: <20230130135650.1407156-4-manuel.traut@mt.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230130135650.1407156-1-manuel.traut@mt.com> References: <20230130135650.1407156-1-manuel.traut@mt.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: FR2P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9a::17) To AS8PR03MB7621.eurprd03.prod.outlook.com (2603:10a6:20b:345::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR03MB7621:EE_|PAWPR03MB9081:EE_ X-MS-Office365-Filtering-Correlation-Id: dc27189e-9dd1-4570-777c-08db02c9deba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8C9EcDG6yFWbIxKCHXUQeap8op5PnehfBeQJjc64PUSsJYv1OOYmzL4oHK3RaL3VH5zk2A0229YO+qKTi9W1L8LUchW7Mw/0+SP3lsMGH1/JwgyCT93OAVQdW9EbohGpdICQb+U0sCoVco9W0M6ojAUp+9mkW/WLGAQetribACeR7TMKQdm+9XU59LAQ0m2docI/ysITvxZj93Kp1VxWoV8QBLvzgs5/nK5h6fp+34j8HanB/+Q2DoY8b98N12dNqelumH2h7NoSYEmyc2WDybw6fO9yNJf1bcJ+08uNYuNUWAVc7RcZHkOu6q1VO8/4zQ6TE6dv/XpuEaAjg44ObpdcVqjBtqzwxG7MD4opY23bq0St0vhJF06boXl6EO5AKjdvmIJEviE55KUKwGnbstLv9EtTLyAtMmDVPn7xKa9w3c9NrAejFzPLS2kTUscdXF9ieDxapxA6HL7LdIPYjE/oXBR00183OW+Oeuoio0WEFNFwECmKQaz7uOqGulSf7iU7kWC+sFSGW/A+isKGBBxIFpKzJP3c8/Z0E7SRQyCdF8GEHE+8l/NOAZvHgbPEmxz/MV9lJbCtuK1YJxT0fWYGV9lRnLWTfrmmQ2KspHhXaDazuzyg19VfCR2pzc0oekV2KXNwJZWUhMKtQ9LUZCf+XbACe3bbeuELioMVrj+eDo6qsRt9YKp6/nC2R0L8o/YegERvWWJXIXFFhXy9Mg== 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:(13230025)(346002)(136003)(396003)(366004)(376002)(39860400002)(451199018)(5660300002)(36756003)(86362001)(44832011)(38100700002)(38350700002)(2906002)(2616005)(52116002)(6486002)(6512007)(186003)(478600001)(1076003)(26005)(6506007)(54906003)(4326008)(66556008)(66476007)(8676002)(66946007)(6666004)(6916009)(316002)(41300700001)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WRTcQ6QtgqtqGOmGAWCsFVcv8RJkldBpIu5fdbjlb2w6iQKtDvanuSu40biIxF1biVfB2/VxBkNwpIe4Bi7mxwiqqmgaKY5sUNCuTINB+r4hdniGnAj7O/WJ+9OHA7zChpoxiJbaQSsN5hJpayw11zEehaLFVd4CXMaCLBc3o3omIo9qbJQ9WWxAVSvRACvKXYozlF3QY61zfM3D7Y9EvOHNBOo8rzxaTEqGuYF5ah5P1kLRl7yxg+DKX9JugCav7yYAODzuhPIWB5aBNN/01YnRMJOvWEcDrNkWs+JqdDaXOycLJnoMQKMAjHE96CxkwlbDK+s+QGH/HWyD//KP9HlR2t2i/jRv9gk7d1wA7mV0JXv7a1f6YULbyA7q3QG8WqWPQS2P+bwHoXIlWXsyPLt4q7PC5JJsJrJ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YwFgLC3sEVu9AVXBXAfAEQmryfvWHTjDIWsycBdePYedJ8TMOxy9i6kvAFDMOO6O6UShmWDdptXqUP0hCJbERs1xrWwLu5jsaO80v3rz6UpQjh X-OriginatorOrg: mt.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc27189e-9dd1-4570-777c-08db02c9deba X-MS-Exchange-CrossTenant-AuthSource: AS8PR03MB7621.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 13:57:05.2595 (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: VZmcsZwvFvqwjJo/97naPO85bH5gHR4xXiBpxFmydxl08n3LBXQn3u3966PTDE8IWeSaHw4ATUNkUk97PHD/iQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR03MB9081 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_PASS,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?1756456106555709133?= X-GMAIL-MSGID: =?utf-8?q?1756456106555709133?= |
Series |
input: pwm-beeper: add feature to set volume level
|
|
Commit Message
Manuel Traut
Jan. 30, 2023, 1:56 p.m. UTC
Adds an array of supported volume levels and a default volume level.
Signed-off-by: Manuel Traut <manuel.traut@mt.com>
---
.../devicetree/bindings/input/pwm-beeper.yaml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Comments
On Mon, 30 Jan 2023 14:56:49 +0100, Manuel Traut wrote: > Adds an array of supported volume levels and a default volume level. > > Signed-off-by: Manuel Traut <manuel.traut@mt.com> > --- > .../devicetree/bindings/input/pwm-beeper.yaml | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/pwm-beeper.example.dtb: beeper: 'default-volume-level', 'volume-levels' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/pwm-beeper.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230130135650.1407156-4-manuel.traut@mt.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 30/01/2023 14:56, Manuel Traut wrote: > Adds an array of supported volume levels and a default volume level. > > Signed-off-by: Manuel Traut <manuel.traut@mt.com> > --- > .../devicetree/bindings/input/pwm-beeper.yaml | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.yaml b/Documentation/devicetree/bindings/input/pwm-beeper.yaml > index 1ebc3a46d934..ca9efab7efbf 100644 > --- a/Documentation/devicetree/bindings/input/pwm-beeper.yaml > +++ b/Documentation/devicetree/bindings/input/pwm-beeper.yaml > @@ -25,6 +25,21 @@ properties: > beeper-hz: > description: bell frequency in Hz > > + volume-levels-bp: > + description: > Does not look like you tested the bindings. Please run `make dt_binding_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.yaml b/Documentation/devicetree/bindings/input/pwm-beeper.yaml index 1ebc3a46d934..ca9efab7efbf 100644 --- a/Documentation/devicetree/bindings/input/pwm-beeper.yaml +++ b/Documentation/devicetree/bindings/input/pwm-beeper.yaml @@ -25,6 +25,21 @@ properties: beeper-hz: description: bell frequency in Hz + volume-levels-bp: + description: > + Array of PWM duty cycle values that correspond to + linear volume levels. These need to be in the range of + 0 to 5000, while 0 means 0% duty cycle (mute) and 5000 + 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 10 to 300 (0.1-3% + duty cycle). + + default-volume-level-bp: + description: > + The default volume level. + required: - compatible - pwms @@ -36,4 +51,6 @@ examples: beeper { compatible = "pwm-beeper"; pwms = <&pwm0>; + volume-levels = <0 8 20 40 500>; + default-volume-level = <4>; };