From patchwork Wed Jul 11 08:02:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10519105 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 50E4C6032A for ; Wed, 11 Jul 2018 08:02:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E97F28CEF for ; Wed, 11 Jul 2018 08:02:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FB5428D0A; Wed, 11 Jul 2018 08:02:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7D4628CEF for ; Wed, 11 Jul 2018 08:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZrlgzUtuM4xcq1WITMs0XG9gjKeBQnuh4n7S1mROUDo=; b=VvG6UwUY3PzsxycW3mBkiN8Qy pMfP1CDlV2joP/uqfJEIyCByGyaXmsWS7DNiliusbUG8lSUZ9V42GBqcuS5mm7y9EhvZx7ax6ZGK1 0DWyMi8muaOIPvlNsNIEJSj7igq+pdrTSHBlCvIlUvlobSkeQRygUEdXXXFO03QRIJsGB0SUFEoNR nKEv/Gi7ejoa8ZG3Ecwfi6rVoSVvipniCWk1SSKLPi+LpaTXXfZbg6rplGjdOoukS6c+DToOAKaXv T2QDtdyAHeTY69jqo8LJsSpmY3LQyXAeShB0axpQ/OwKxlIJujRNR+QSrKqR8h5BXsxLihuluTMzG Gp7+1Pbtg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdA5C-00029n-7s; Wed, 11 Jul 2018 08:02:42 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdA58-00028w-J1 for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2018 08:02:41 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 5EC8D80576; Wed, 11 Jul 2018 10:02:21 +0200 (CEST) Date: Wed, 11 Jul 2018 10:02:18 +0200 From: Pavel Machek To: Sebastian Reichel Subject: Re: Vibrations on Droid 4? Message-ID: <20180711080218.GA21225@amd> References: <20180709081534.GA6799@amd> <20180709214910.tes6u4ivxomd3aja@earth.universe> <20180709220211.GA7760@amd> <20180710101147.lyu65ro4czvrs2da@earth.universe> <20180710133040.GA4391@amd> <20180710161123.azym6sbboriuj4yc@earth.universe> MIME-Version: 1.0 In-Reply-To: <20180710161123.azym6sbboriuj4yc@earth.universe> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180711_010238_930645_93F8B62C X-CRM114-Status: GOOD ( 14.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mpartap@gmx.net, tony@atomide.com, merlijn@wizzup.org, kernel list , nekit1000@gmail.com, linux-omap@vger.kernel.org, linux-arm-kernel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi! > > Its parent is gpio@4805d000 , and that one seems to be present. > > > > user@devuan:/sys/bus/platform/devices$ ls 4805d000.gpio > > driver driver_override gpio > > gpiochip5 modalias of_node power subsystem uevent > > Sorry, something went wrong with merging this. The parent > of ti,omap-dmtimer-pwm and pwm-vibrator should be / and > not gpio6. Ok, got it to probe... after dts fix and adding EPROBE_DEFFER to driver. Still can't get it to actually vibrate. user@devuan:/sys/bus/platform/drivers/pwm-vibrator/vibrator$ sudo fftest /dev/input/event3 Force feedback test program. HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES Device /dev/input/event3 opened Features: * Absolute axes: [00 00 00 00 00 00 00 00 ] * Relative axes: [00 00 ] * Force feedback effects types: Periodic, Rumble, Gain, Force feedback periodic effects: Square, Triangle, Sine, [00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00 ] * Number of simultaneous effects: 16 Setting master gain to 75% ... OK Uploading effect #0 (Periodic sinusoidal) ... OK (id 0) Uploading effect #1 (Constant) ... Error: Invalid argument Uploading effect #2 (Spring) ... Error: Invalid argument Uploading effect #3 (Damper) ... Error: Invalid argument Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1) Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2) Enter effect number, -1 to exit 5 Now Playing: Weak Rumble Enter effect number, -1 to exit 0 Now Playing: Sine vibration Enter effect number, -1 to exit 5 Now Playing: Weak Rumble Enter effect number, -1 to exit ^C diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts index 45305e8..c27fc87 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts @@ -159,13 +159,7 @@ dais = <&mcbsp2_port>, <&mcbsp3_port>; }; -}; - -&dss { - status = "okay"; -}; -&gpio6 { pwm8: dmtimer-pwm-8 { pinctrl-names = "default"; pinctrl-0 = <&vibrator_direction_pin>; @@ -192,7 +186,10 @@ pwm-names = "enable", "direction"; direction-duty-cycle-ns = <10000000>; }; +}; +&dss { + status = "okay"; }; &dsi1 { diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c index 665da3c..debeb70 100644 --- a/drivers/pwm/pwm-omap-dmtimer.c +++ b/drivers/pwm/pwm-omap-dmtimer.c @@ -265,7 +271,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev) timer_pdata = dev_get_platdata(&timer_pdev->dev); if (!timer_pdata) { dev_err(&pdev->dev, "dmtimer pdata structure NULL\n"); - ret = -EINVAL; + ret = -EPROBE_DEFER; goto put; }