Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4631673rwr; Sun, 30 Apr 2023 11:22:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5RNUGbNHwKfQJROuptPsKjT9dx/Wa6INof++/cYjB5ILfWi7KCjo9ipguGj4HnKSr/J+JL X-Received: by 2002:a05:6a20:1616:b0:f0:38a7:dc71 with SMTP id l22-20020a056a20161600b000f038a7dc71mr15454826pzj.4.1682878949956; Sun, 30 Apr 2023 11:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682878949; cv=none; d=google.com; s=arc-20160816; b=JsFGHUyAimAeIjAg9YOVELqwHR3LeoxH6VQZ83mCYOP7/5GEtLKFBE/Mp8z9eVPhlC MvUFKlQwD6p4lHY2J5KO2c3k71fhVkWi/QIkGM8XBMXCLlX3adw/yjuNTx9Wjeh2/OJ+ +0F65I4fFZ5otMaIEuXHT3tjBnr6SqvmR07lB79LAOHwodRw8CMm0QyvBLLckVMM7mXP zsZ4Cgen2/mlb1A3eVuVY4rI6tKS1Qd8E9bINpQ2Bk+LGOD9HQFZbzsj5hU4nyDSHo+Z iGV3VXPz1oYL6dD+4RTE5Q3olHFfAJfdM5KqOqklM+b0w4dXybvXzZ6r7l0l2wp7mvim hf7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=pqUYPMhmfDVZpLYOjVDwKCqbCRhlD3qiLjr2l+zXPl8=; b=ETTpDhPF92edjkFqqbymjhqqCm69LK2wsmL/7LBP5DM05oODyQvF4Txpf+wiDIza55 VFGKxIBW5vw9BUok6DeDs1bZcUisocIOvjwasf9aos6SPLekCIz5AWRmgBvflX9y7arH 3If2Blrt3T6Sks5HzNtmNgjoLeFsV6onlglg5QF4nXFtvst6jW0Sf2LfiRGXlutaW+o2 V3ShKfz0ivkGjBa6zIEdb5W0IbhgqDkEL10u8vba2Z9ps0JJElPKWuR11/v1zfJZkxZL V4BXG0fup2qZ6tTPMxVg9bNOKJgyxmtH5GIFlhMRYVFTGa8sYI4pDHUKvDi0rVBx13Cz +HOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=YfpFwhRy; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y190-20020a638ac7000000b0051b5ecb17c0si27468262pgd.61.2023.04.30.11.22.17; Sun, 30 Apr 2023 11:22:29 -0700 (PDT) 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=@z3ntu.xyz header.s=z3ntu header.b=YfpFwhRy; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbjD3SVg (ORCPT + 99 others); Sun, 30 Apr 2023 14:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjD3SVf (ORCPT ); Sun, 30 Apr 2023 14:21:35 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AB6F1728; Sun, 30 Apr 2023 11:21:34 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 09A17CEB83; Sun, 30 Apr 2023 18:21:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1682878892; bh=2KDm+MfmQDPFzRhM3HuRPWRDE4x8ieq6b/WlHIl9jK0=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=YfpFwhRy8QJv97qougAH4t8sLJG+/Am0Bumbrt96VeHjGjj/Q/aOmWplSHNW46q+k RmaBlZlNEjjOai+CABQNobYyORT/0tZmBKcizGdcODdARBXmZk1agFmc+CjnLRWQXa JUXlnkHaWY24939X13CqV3E0yCFqbNeb75hq4njI= From: Luca Weiss Date: Sun, 30 Apr 2023 20:20:54 +0200 Subject: [PATCH 2/5] Input: drv260x - sleep between polling GO bit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230430-drv260x-improvements-v1-2-1fb28b4cc698@z3ntu.xyz> References: <20230430-drv260x-improvements-v1-0-1fb28b4cc698@z3ntu.xyz> In-Reply-To: <20230430-drv260x-improvements-v1-0-1fb28b4cc698@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dmitry Torokhov , Dan Murphy , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Raffaele Tranquillini , Yassine Oudjana Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=830; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=2KDm+MfmQDPFzRhM3HuRPWRDE4x8ieq6b/WlHIl9jK0=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkTrGnuoEsRTAkX895HNLQSK31eIpbRae/YptSw 7CkOkDUZH6JAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZE6xpwAKCRBy2EO4nU3X Vp5qEACtdUzv1B33TViLXCnVQagZdBhCzFgGnvNikuW5vMJOjg7aSJA8Aa1S0a5t5B5YOToCbCM QK2Sj28kuCYDnxaiFpfUL9Ip75zq4oM9dUudZ6VCmk0lEHs/ZXQQQYBiR/YcMzJ7yJsOXrMHPBk BmNPiU+SvcJrS69TPRDRmCUalgaiT/vpeynwcoSy4LDKLccTNYplmGrciXXERhQ7BF1inK/fz/w E8a4L4OWYuHpNqxSDAHsvw3jnE+Pk8GpGSJgO8Oivsr3yEUF7Qyt88EH5G8DiFKAScLaqabMDC1 HZIHs8pOgzz1mXKBB33DxYvS6j05WSYfKge0kFl0JVNasl4pK+DsnH1E5Q7+mFR6MqR9/+Xyyaf c7YeJwQlHXVAkPLm5A++c1wa5fmrMQEQgRMXY2ulEFvPZtfAaxcEZNOsIoPTjphPSLxJRdCzKrW KKUiem/rSn7IA6JdicfnMaySANKDSw0DL1zx0s8zW9CHt2v7+eQpnU2ErBALMzvvqqEtU0IdusZ FJwBvZAcVxNHWXLiLTsh7mS7i4zgynKjLbeae4u2+bzS2uxulMh9Xbn/Tm6Lx98eTS52wjo6wA+ V+7gKdPES8S8Y8zPfUwba7+YUNi1D9d41Ve8On8O9i/8iakZlqzfOh9esI3L0G1ambMAIhr+R4P bPfXMMt7GYldNMg== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org When doing the initial startup there's no need to poll without any delay and spam the I2C bus. Let's sleep 15ms between each attempt, which is the same time as used in the vendor driver. Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver") Signed-off-by: Luca Weiss --- drivers/input/misc/drv260x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c index e95c4e775b5d..884d43eb4b61 100644 --- a/drivers/input/misc/drv260x.c +++ b/drivers/input/misc/drv260x.c @@ -435,6 +435,7 @@ static int drv260x_init(struct drv260x_data *haptics) } do { + usleep_range(15000, 15500); error = regmap_read(haptics->regmap, DRV260X_GO, &cal_buf); if (error) { dev_err(&haptics->client->dev, -- 2.40.1