From patchwork Tue May 12 22:22:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11544267 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D8291668 for ; Tue, 12 May 2020 22:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 562F02492C for ; Tue, 12 May 2020 22:27:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=megous.com header.i=@megous.com header.b="ZSclaWce" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731313AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 Received: from vps.xff.cz ([195.181.215.36]:41822 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731524AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1589322129; bh=2kuqCfvBiBgSUuWgI49jTz7T7hYvoNkypGtcPc22suM=; h=From:To:Cc:Subject:Date:References:From; b=ZSclaWceGXKK8TlazmlVyjxbImVQl2CTSVLPfxDhZubC8op+g/z54lqTVRl1P09F4 uM2G1V54TCT6q3NccRezPMtaEHcgOZz1Wr44lX2RsUU3eC1KaVrPftGaFUnlFHBif4 DE/DEM5xwqDkELhUm0Az/4xdozKgpM9tkh8rH1p4= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Dmitry Torokhov , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Ondrej Jirman , Luca Weiss , Tomas Novotny , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring Subject: [PATCH v2 1/4] dt-bindings: input: gpio-vibrator: Don't require enable-gpios Date: Wed, 13 May 2020 00:22:02 +0200 Message-Id: <20200512222205.1456300-2-megous@megous.com> In-Reply-To: <20200512222205.1456300-1-megous@megous.com> References: <20200512222205.1456300-1-megous@megous.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org It is possible to turn the motor on/off just by enabling/disabling the vcc-supply. Signed-off-by: Ondrej Jirman Acked-by: Rob Herring --- Documentation/devicetree/bindings/input/gpio-vibrator.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/gpio-vibrator.yaml b/Documentation/devicetree/bindings/input/gpio-vibrator.yaml index 2384465eaa19..c700b640bd53 100644 --- a/Documentation/devicetree/bindings/input/gpio-vibrator.yaml +++ b/Documentation/devicetree/bindings/input/gpio-vibrator.yaml @@ -24,7 +24,6 @@ properties: required: - compatible - - enable-gpios additionalProperties: false From patchwork Tue May 12 22:22:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11544261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB24314C0 for ; Tue, 12 May 2020 22:27:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFB5E2492C for ; Tue, 12 May 2020 22:27:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=megous.com header.i=@megous.com header.b="SO6+Q+T4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731551AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 Received: from vps.xff.cz ([195.181.215.36]:41814 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731156AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1589322129; bh=8NnK5CsraaZezbyEm3ALbCdiOU7kYIlUQyLKmB3n8RA=; h=From:To:Cc:Subject:Date:References:From; b=SO6+Q+T41K4T2JL05TZZ2IY/e+nGZgKFEXLbxmq9QBlFYcu5A7X8teO00J4r4Tw2U wS6ZXVfwNFYJ1j+H58opUYdoszBJijDY3fkwh22g1xi3N0quarcGWyHpL3Wy1+Rn3G /0+dNsie3axkhfAn8fV8ZjFo/1jrPmHs7umY8phQ= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Dmitry Torokhov , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Ondrej Jirman , Luca Weiss , Tomas Novotny , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/4] input: gpio-vibra: Allow to use vcc-supply alone to control the vibrator Date: Wed, 13 May 2020 00:22:03 +0200 Message-Id: <20200512222205.1456300-3-megous@megous.com> In-Reply-To: <20200512222205.1456300-1-megous@megous.com> References: <20200512222205.1456300-1-megous@megous.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Make enable-gpio optional to allow using this driver with boards that have vibrator connected to a power supply without intermediate gpio based enable circuitry. Signed-off-by: Ondrej Jirman --- drivers/input/misc/gpio-vibra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/gpio-vibra.c b/drivers/input/misc/gpio-vibra.c index f79f75595dd7..f11877f04b43 100644 --- a/drivers/input/misc/gpio-vibra.c +++ b/drivers/input/misc/gpio-vibra.c @@ -121,7 +121,8 @@ static int gpio_vibrator_probe(struct platform_device *pdev) return err; } - vibrator->gpio = devm_gpiod_get(&pdev->dev, "enable", GPIOD_OUT_LOW); + vibrator->gpio = devm_gpiod_get_optional(&pdev->dev, "enable", + GPIOD_OUT_LOW); err = PTR_ERR_OR_ZERO(vibrator->gpio); if (err) { if (err != -EPROBE_DEFER) From patchwork Tue May 12 22:22:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11544269 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 930021922 for ; Tue, 12 May 2020 22:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 726622492E for ; Tue, 12 May 2020 22:27:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=megous.com header.i=@megous.com header.b="KkWWh4AL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731134AbgELW1V (ORCPT ); Tue, 12 May 2020 18:27:21 -0400 Received: from vps.xff.cz ([195.181.215.36]:41826 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731538AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1589322130; bh=b9l6jhTz95HtziyiK/WtyUDqMPHpI5aFV0oYbIcE+vw=; h=From:To:Cc:Subject:Date:References:From; b=KkWWh4ALhc+PRFHfEh099xQOptYQQ6xhyYOjUHyfazCqou4xI1fXgKsdo4YRZc1F8 u4/Z8EE33aneGs6oF52UHG4xIzT9TKZ+zkK+eTsbJJTdfe2XhlTFiJYjGRjMQq9pLi acGqW5S+xeMVKlMqSb2rzMY07t4WLGspQbX5FGLk= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Dmitry Torokhov , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Ondrej Jirman , Luca Weiss , Tomas Novotny , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/4] ARM: dts: sun8i-a83t-tbs-a711: Add support for the vibrator motor Date: Wed, 13 May 2020 00:22:04 +0200 Message-Id: <20200512222205.1456300-4-megous@megous.com> In-Reply-To: <20200512222205.1456300-1-megous@megous.com> References: <20200512222205.1456300-1-megous@megous.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The board has a vibrator mottor. Hook it to the input subsystem. According to the PMIC specification, LDO needs to be enabled (value 0b11) to achieve the specified max driving current of 150mA. We can't drive the motor with just GPIO mode. In GPIO mode the chip is probably just using the regular CMOS logic output circuitry (typically limited to around 20-35mA, but not specified in this datasheet). Signed-off-by: Ondrej Jirman --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index bfc9bb277a49..a278a1e33930 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -99,6 +99,11 @@ panel_input: endpoint { }; }; + vibrator { + compatible = "gpio-vibrator"; + vcc-supply = <®_ldo_io1>; + }; + reg_gps: reg-gps { compatible = "regulator-fixed"; regulator-name = "gps"; From patchwork Tue May 12 22:22:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11544265 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2940318A3 for ; Tue, 12 May 2020 22:27:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 117CE2492C for ; Tue, 12 May 2020 22:27:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=megous.com header.i=@megous.com header.b="MvLZ0+OT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728095AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 Received: from vps.xff.cz ([195.181.215.36]:41818 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731313AbgELW1U (ORCPT ); Tue, 12 May 2020 18:27:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1589322130; bh=JFe/nwMSA6vjCYShOxGSMoLkzCpZNbpdrhZDImIOA/U=; h=From:To:Cc:Subject:Date:References:From; b=MvLZ0+OT0w6t9T1roThSn1RHOcYbUluUau/zL6wlyhmuWJ6PG89U+sUmG3yKJQOdw emI/0T8uIhd7tgBbmCeAy7rat0LL3eMNNEjbKoWT79KVAp6LFmbg0YsSeGSjkCaIGh 5g7hgQ+zZqIuvmDKPOiFVORdEo2RmSmIE5pDAu2c= From: Ondrej Jirman To: linux-sunxi@googlegroups.com, Dmitry Torokhov , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Ondrej Jirman , Luca Weiss , Tomas Novotny , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/4] ARM: dts: sun8i-a83t-tbs-a711: Increase voltage on the vibrator Date: Wed, 13 May 2020 00:22:05 +0200 Message-Id: <20200512222205.1456300-5-megous@megous.com> In-Reply-To: <20200512222205.1456300-1-megous@megous.com> References: <20200512222205.1456300-1-megous@megous.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Vibrator motor is weak at the current voltage. Increase the voltage. Signed-off-by: Ondrej Jirman --- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts index a278a1e33930..1e086e979348 100644 --- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts @@ -434,8 +434,8 @@ ®_ldo_io0 { }; ®_ldo_io1 { - regulator-min-microvolt = <3100000>; - regulator-max-microvolt = <3100000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-name = "vcc-vb"; status = "okay"; };