From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23597357CF7 for ; Thu, 11 Jun 2026 15:41:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781192472; cv=none; b=u36Z59r1E3DsWNl0GAHbnBX0kNL4mFxnuZQEDZoRKcWory7PvyYBOwfP3Bb48gA/r58U6xRB3AJqYTY+nSHR+7EUdSaWOxVTqXlw+7VdUL0+5IQaKvvFLVK3Ja1+Gx3Mr7HONTUnNH7uV38ppMe8nesHSg+vhFXExapWSUB5mew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781192472; c=relaxed/simple; bh=h6MWLCfUd85/1dSrfNYdTXKwJSaieCPmgnUikAdWiDk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SLYTn81Yfeo+A7GM19eEJXyZByVKcuTadHdo8nqLgbiQpNtomqUl6bRYvte/tVoxZ+eNm5ieV0rF1Naoa1oRhOQU17cZYzdi1FCuDNpm6NjEEIwPynOGRcUIpG9pvGSUVyn342eHFnpzVaf309OmbGJqxw0rRkoGAXHTSZreVxk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M6MPRow3; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M6MPRow3" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-3965f215817so72173221fa.3 for ; Thu, 11 Jun 2026 08:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781192468; x=1781797268; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=APKUOIAbDv6xgvZxBxqpunnnVlUhklDqkLiJkSm1Xgo=; b=M6MPRow3UzQLWSYpG65PHzm9p2vZhwDufZ+URknbcmtJjusH6wlZj3Fgr1YcWaQSa+ Xx1jY4l3I8RYmrJbFEtZljyWNcPUO2P7pgFNa0iOJpwpNsdWEYAGwRABuuPzFdzw7OML OBvXgamPO+71yIFYPPHZLhIRpG4NEt6CD2hK6fW7b1TxI+a3zJAoN2Lnosexm9KMQCZe ZFoCyhh0CpHpyRN0r7OmLPI10WRfVInLtJ5HHbDDbArKPP1mfL9+XfQF/ttZnagnaoEk I+bE/INOc59Td34hVYGUETEXUD5Oyrpqw0N5Ls4dBwsQcFL/9/11VJ6IvMyYNTwbc76W zYqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781192468; x=1781797268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=APKUOIAbDv6xgvZxBxqpunnnVlUhklDqkLiJkSm1Xgo=; b=KrXP9mPKvH3rddcudGzXwpYw6a0JkE64KfjbotqpN2CrTGyoNmMQxvoRIIvSUeVCyC juePoDRS/zmB3kmfdeJvT5rfVyhl7RydfzLTHFYvUTupfkSZYv+WJSi+wz30lEFtfSbM TGVByt7xK/4SwtIMyop7SxrTKFQqYgXLLMvDp8pJzhpYBh/9CYCzp96OlfDDBZrrSkAG ijOrMJFpvcryM6Ln94q8xIqRCR9BzWM/tmM0FQ7ANeeEWiy91mkPqNXUWwWKJnnYjjY0 cRqE/mOQJx1cyc6uajDzZUUxdrVPqWYroOTf2g3T2UDBVuCQx1wyhl1OM+RZHd6unnem MWVQ== X-Forwarded-Encrypted: i=1; AFNElJ8SM9ijhegNUQg30quvH0L0Rk6Xg6eKx3cJWTKw0jJeiQcT7CtJMKzyQnwxyPXPqmK/wMLplIPu1O0cawM=@vger.kernel.org X-Gm-Message-State: AOJu0YyQp/KrK8Nt17u0bfmjMaQFCZSf58E4/SbIGVWGqJx2Bgvv+lsq 4zZfE2SndIsWgsI/cN90e0Lv3okLl2KheZAP4XUMC6vMLdqed6SuJSaPwBitBlTvcwU= X-Gm-Gg: Acq92OECRcwMmrrwpeBoQcDP0VVnIR0YRCqh0kictkGYFE93+f6U2qmR4YX5RQeP6nH VSi8mh4GBhWCicSCCOrsOMXU5BNXgKe5rC1Z4nEM56jeP8az/YiZpeNXPlrMmWECOmNzmwgXll8 QLM7Wy6E1mqqO3ExpJp4fkN9ijOuwyohPmtO219Ei0ko+5cxK92SipwHAi0OTMX4vnsTesIGqoh NKFS+YJ0KgO487oi3qCxpdvicliqjRKlZrWHoLqP4TnYboNYf+zT5+vgHJwWC93+fxBtxEE9hUo ZQzF1YxP7NzSTYqHxWPLfDpCdMWWc7I81WoGhkN24ttfPTKKbRPmRaKWCHT//GVjvTNBkboyl86 QyWj0P0srOKaDaa5LBYarleu80lJXeJ3vwp+NHA/5JzneuFKFiN3LJ83y3IkIdGb7tUCyPMbS+G FVhfn9DerxzkKMcFp131bDMbc8dloYxySv+w8LGCSRORbjmif761l6ntifK+zQuf1NWxZgFHR5f qa5CA== X-Received: by 2002:a2e:bc84:0:b0:396:66c8:1070 with SMTP id 38308e7fff4ca-3991a19e3f6mr10922481fa.21.1781192468187; Thu, 11 Jun 2026 08:41:08 -0700 (PDT) Received: from Shofiq.home (87-92-251-137.rev.dnainternet.fi. [87.92.251.137]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3991ac81488sm5994641fa.1.2026.06.11.08.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 08:41:07 -0700 (PDT) From: Md Shofiqul Islam To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linusw@kernel.org, linux-kernel@vger.kernel.org, Md Shofiqul Islam Subject: [PATCH v2 1/3] misc: lis3lv02d: set default click detection thresholds Date: Thu, 11 Jun 2026 18:41:03 +0300 Message-ID: <20260611154105.3727-2-shofiqtest@gmail.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20260611154105.3727-1-shofiqtest@gmail.com> References: <20260611154105.3727-1-shofiqtest@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Several upstream board DTS files use st,click-thresh-x/y/z (the name documented in the old lis302.txt binding), but the driver reads st,click-threshold-x/y/z. As a result those boards have had click detection silently broken since the DT properties were added. Set a default threshold of 10 for all three axes immediately after the platform data allocation so those boards get working click detection without requiring a DT change. The DT reads for st,click-threshold-x/y/z are unchanged so boards using the correct name can still override the default. Fixes: 6a7740c7f5b2 ("lis3lv02d: add device-tree support") Signed-off-by: Md Shofiqul Islam --- drivers/misc/lis3lv02d/lis3lv02d.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index 21e8ad0a7444..6a028c1bf866 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -956,6 +956,14 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3) if (!pdata) return -ENOMEM; + /* Set sensible click threshold defaults. Several upstream board DTS + * files use the misspelled property "st,click-thresh-*" which the + * driver never reads, leaving these at zero. Default to 10 so those + * boards get working click detection without a DT change. */ + pdata->click_thresh_x = 10; + pdata->click_thresh_y = 10; + pdata->click_thresh_z = 10; + if (of_property_read_bool(np, "st,click-single-x")) pdata->click_flags |= LIS3_CLICK_SINGLE_X; if (of_property_read_bool(np, "st,click-double-x")) -- 2.51.1