Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5373383pxb; Sun, 13 Feb 2022 18:59:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4x73nOVFKDhQ8ineR1V+AdxoVpgMA+xewGa3OKVGxRtMjgaha2/K7vCl+z2AU+msfzM24 X-Received: by 2002:a17:907:869e:: with SMTP id qa30mr1220790ejc.483.1644807595326; Sun, 13 Feb 2022 18:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644807595; cv=none; d=google.com; s=arc-20160816; b=Wx593WmgA54G+tBrR4fmNIUtKwdU62ET/6BLkUofb6+t1INhJPFGdmlqWI9maku6Lk QglQT7bAnUkXnnvDWY0oDzQbbkTMMcPp50YsHhy51ADg/50znApF7f6pn5uw+SnR/MFn vtYbJzDGQ9VoL9dEaVkyAw7Eg/qo5IBrst41KWFXSN8CQDkEQIIAAhLxv0AWj9z82B4M ymGEHRP339l99hkOiZWV71ud6oAI9EWkvDKwE4nJESwybHAVCeEalluXkr3grL9DvXpj +rP8IpfGPVAzwoclEH15XngrU1sPLTlJXhHGMojQntUqXCfE51ssvRBJErX8pmXdmXIH 9p6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pqCmSI3oKgXqeKRHORXbpr0RliiGdpjxqXgh77LeuyE=; b=dTjoyQfIzsqCwVPBymdUi6SlQiND4kY7TEd62ysveVK0fWvy1rIt7JMfnaw/EBPeN/ ECHRkZFmx3n19A2CZRx555mDl3HSK9sIuiMgkXzHeIWD02TFEQEYvAxrbDoNyNn73HxT g1gEDuqJGTE367G7W2HW7mwXj21d6oQ6wctq05ilr6dSHUShlVta18CHc3RwtpkM3kVU P5i8fJ1tyxmLzd3kEFoybNxbiXTWyWomJj5Iqskz9wturjkTE49FReMahNhu7DxmZidt Lc4026UwvetkX90kRwSgvokzRi3DNkaaj6GVwH+z1HhZY0LBeHG7xbNC4sudl6iKn05Q HiTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UGi8i1E0; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11si11821833edd.105.2022.02.13.18.59.33; Sun, 13 Feb 2022 18:59:55 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=UGi8i1E0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237301AbiBMRQL (ORCPT + 99 others); Sun, 13 Feb 2022 12:16:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237293AbiBMRQJ (ORCPT ); Sun, 13 Feb 2022 12:16:09 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5BC058E6D for ; Sun, 13 Feb 2022 09:16:03 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id hw13so4489153ejc.9 for ; Sun, 13 Feb 2022 09:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pqCmSI3oKgXqeKRHORXbpr0RliiGdpjxqXgh77LeuyE=; b=UGi8i1E0VtCl4TrRHyJC7+OxbcGu58MuNZmH8NIyBazCX7XnZcl9L09tzxQHXp2ZIa Y0N7pIhXSGFKWe+4S4dgBXPvTwEbk4CnSiHw/oFY1gtQPhQ3KHL/ZeFJeY6qkiOBI0t2 RAluvfJOG9hxIUlo5Ur+kB/K92zvFsYZxLLHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pqCmSI3oKgXqeKRHORXbpr0RliiGdpjxqXgh77LeuyE=; b=TfSjAej3bKEzyRos1MoXPa7zFBbAktWVNlwzRjvbq9YadQpZ7UUbHpIa7EZeW/YQO8 TptgEUGn9jzeB4fYhVAU15EZP3b3HTKxr07sjq/C6H2ekeXGskchZu3CxWq9KpdFH4j1 2iHUq3P51yvyx057oDeYd4Xz1g1kWEywaNonFAa1wz2HQCtWSCc+EM6fc7q8h/iwsU/A T9lFiEtXtjgDNM93ub2Q6YcEoW4Sg7SenF2fse61B5wcZNFEuu+3paehLd9zFy4BaGZS zoVrF14FAvDhaYUcdm0NZGMIIFU56wqv64mSJbxuD1vH+Tn0552rkXYBBG3foh7SMn5N kvTg== X-Gm-Message-State: AOAM533Ai5uZHVSo8fPAXNsLexNo5z7DdPM8ltSnqUmFOR9b9MnZKWvJ pNrLxA/S6qVfKZ668vIyfgG4WAn47EKwtA== X-Received: by 2002:a17:906:720e:: with SMTP id m14mr8820358ejk.399.1644772562128; Sun, 13 Feb 2022 09:16:02 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-52-8-210.retail.telecomitalia.it. [82.52.8.210]) by smtp.gmail.com with ESMTPSA id o10sm6598878ejj.6.2022.02.13.09.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 09:16:01 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Dario Binacchi , Michael Trimarchi , Dmitry Torokhov , Marco Felsch , Oliver Graute , Stephan Gerhold , linux-input@vger.kernel.org Subject: [PATCH 3/6] Input: edt-ft5x06 - set report rate by dts property Date: Sun, 13 Feb 2022 18:15:29 +0100 Message-Id: <20220213171532.346270-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220213171532.346270-1-dario.binacchi@amarulasolutions.com> References: <20220213171532.346270-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 It allows to change the M06/M12 default scan rate on driver probing. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/input/touchscreen/edt-ft5x06.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 77f061af5c61..b3e492cfc41c 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1213,6 +1213,14 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, edt_ft5x06_ts_get_defaults(&client->dev, tsdata); edt_ft5x06_ts_get_parameters(tsdata); + if (tsdata->reg_addr.reg_report_rate != NO_REGISTER && + !of_property_read_u32(client->dev.of_node, "report-rate", + (u32 *)&tsdata->report_rate)) { + edt_ft5x06_register_write(tsdata, + tsdata->reg_addr.reg_report_rate, + tsdata->report_rate); + } + dev_dbg(&client->dev, "Model \"%s\", Rev. \"%s\", %dx%d sensors\n", tsdata->name, fw_version, tsdata->num_x, tsdata->num_y); -- 2.32.0