Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp62033ybk; Tue, 12 May 2020 15:24:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLLFkSwRD64WCMavv7UoFS/Ax9mw1FDwJkPU8EBBUl+rH1VCm09WNSmpZJPTPwYfdyCvvaE X-Received: by 2002:a17:906:4903:: with SMTP id b3mr19077832ejq.80.1589322272527; Tue, 12 May 2020 15:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589322272; cv=none; d=google.com; s=arc-20160816; b=Pp0c0wcwzU6OwRVTpjcMvvYUf3zR1MMKR5RXOeBdtXDTYxhPvSg6g7la3osoKhdDho bFv4jd3CGn3u1mhOQfxNiyW3pfEokraCt5EoXWUWNdi5Ql9EuG+c/8d04omdTOzSwkkl EASmgv+Vlur2P1NgDm9dUVFzua5ckxTwudn3qQzcn+mlPdyzoNd5ciEqObYE/X9f4ZgU R9ZBk1M+C7beGr/EFbVNHoiUlom6X2k6WtQ/OjWCnLeJMTnyaC8bFsc9+yVB3+co2avg LeVHoJrPtiVVJuuGTDLq4Ug3Dp3kq3vBgGIFQL/aVxXOyzuINzDCAiHWODqfa6o9+0QE 8w1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tNZCfPK80HvVnQFExMmjOJtmanMJ3zwH0Qqd4P5pjyE=; b=sPHm0QB4Wat9oIPxKSdlnCT2+0d8FuwsHIjtUIaEuJ9DqN+55LcZcyci9zJY4+dySX BA1IKi1Z9H6pXDhdtqJG0sFT/oav81Uc8yF6YmqxXuSCJfH6xKjrnR21YCtGpjwEl0R8 JXgTk56gaV58CDiYlj1gDTjTPlbukO8+6F/SC3grujvz/qFP/PEDymow+AQzYPLbLIwt 53FoGRVgz2StoxrTP+2UwdS14RjMHuiIIbSjjoka0imnjNSX5qRhAMhlTYqKzwSs94hK zKk4VakA9Gj5ETw2L2raNqJ4fFJ+9TJw90Nm1Voig5lDkIdYJmg7pw7iLKozozS2huqV CLag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=SO6+Q+T4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si8888928edy.66.2020.05.12.15.24.09; Tue, 12 May 2020 15:24:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=SO6+Q+T4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731620AbgELWWN (ORCPT + 99 others); Tue, 12 May 2020 18:22:13 -0400 Received: from vps.xff.cz ([195.181.215.36]:41466 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731048AbgELWWM (ORCPT ); Tue, 12 May 2020 18:22:12 -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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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) -- 2.26.2