From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8B03C33C9A for ; Sun, 5 Jan 2020 08:35:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FE612071A for ; Sun, 5 Jan 2020 08:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578213337; bh=ADADXtiRMJ8GY/BHNd1uS0UdQYNUUVQcEinoIdZJmYA=; h=In-Reply-To:References:Cc:Subject:To:From:Date:List-ID:From; b=vzISmalYEibHWu5hiKV2Xl8LzMfxatqxigUdep8MT4JwFJL5GsBlk8HG3w1MC7kh1 ZFPH9eii8CtldKpuZwxDEZTs8EpE0hY6CSBkY3HO9haX+dnSOvzBiFXlbbuhQ1knSg 4/Ebk3s0cyL0iOSLPYr+FE+FYOWFmuLF4JUz9Xwo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725930AbgAEIff (ORCPT ); Sun, 5 Jan 2020 03:35:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:53992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbgAEIfe (ORCPT ); Sun, 5 Jan 2020 03:35:34 -0500 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 01EB12071A; Sun, 5 Jan 2020 08:35:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578213334; bh=ADADXtiRMJ8GY/BHNd1uS0UdQYNUUVQcEinoIdZJmYA=; h=In-Reply-To:References:Cc:Subject:To:From:Date:From; b=NNEg5KHjF6zAVzMLn6mv13ZVJzxC6EdeNGCm6nTv6mur+H8QltaU45h8qRKHg4I2Y 5CnhBSgCqgZgDqp3fG1sCLsGIvaRWm1fCFN4BA40OQZlM8QLAdaVM+f1rmbjrkjvff LQ81wEA/lGHOy32ojqvGQ7lAkhKMyLkcIaXzISIE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20191205002503.13088-5-masneyb@onstation.org> References: <20191205002503.13088-1-masneyb@onstation.org> <20191205002503.13088-5-masneyb@onstation.org> Cc: mark.rutland@arm.com, agross@kernel.org, bjorn.andersson@linaro.org, mturquette@baylibre.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCH 4/7] dt-bindings: Input: introduce new clock vibrator bindings To: Brian Masney , dmitry.torokhov@gmail.com, robh+dt@kernel.org From: Stephen Boyd User-Agent: alot/0.8.1 Date: Sun, 05 Jan 2020 00:35:33 -0800 Message-Id: <20200105083534.01EB12071A@mail.kernel.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Quoting Brian Masney (2019-12-04 16:25:00) > diff --git a/Documentation/devicetree/bindings/input/clk-vibrator.yaml b/= Documentation/devicetree/bindings/input/clk-vibrator.yaml > new file mode 100644 > index 000000000000..2103a5694fad > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/clk-vibrator.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/bindings/input/clk-vibrator.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Clock vibrator > + > +maintainers: > + - Brian Masney > + > +description: | > + Support for clock-based vibrator devices where the speed can be contro= lled > + by changing the duty cycle. > + > +properties: > + compatible: > + const: clk-vibrator > + > + clocks: > + maxItems: 1 > + > + clock-names: > + description: output clock that controls the speed > + items: > + - const: core > + > + clock-frequency: true Can you use assigned-clock-rates for this instead? Then the driver can call clk_get_rate() if it wants to know the rate that was actually set on the clk. > + > + enable-gpios: > + maxItems: 1 > + > + vcc-supply: > + description: Regulator that provides power > + > +required: > + - compatible > + - clocks > + - clock-names > + - clock-frequency > + > +examples: > + - | > + #include > + #include > + > + vibrator { > + compatible =3D "clk-vibrator"; > + > + vcc-supply =3D <&pm8941_l19>; > + > + clocks =3D <&mmcc CAMSS_GP1_CLK>; > + clock-names =3D "core"; > + clock-frequency =3D <24000>; > + > + enable-gpios =3D <&msmgpio 60 GPIO_ACTIVE_HIGH>; > + > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&vibrator_pin>; I'm still trying to wrap my head around this. I think we can have a pwm provider in a clk controller node (so imagine &mmcc has #pwm-cells) and then this 'clk-vibrator' binding wouldn't exist? Instead we would have some sort of binding for a device that expects a pwm and whatever else is required, like the enable gpio and power supply. Is there an actual hardware block that is this way? Does it have a real product id and is made by some company? Right now this looks a little too generic to not just be a catch-all for something that buzzes.