Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp970557iob; Fri, 13 May 2022 18:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS5QdMHz+ClDHyHNQLIwm7FcuPLPDTXK1rwMJ5hYQRgnK8IoBWGiISbF+WhGJqb+naoA0E X-Received: by 2002:adf:decb:0:b0:20a:c975:8eec with SMTP id i11-20020adfdecb000000b0020ac9758eecmr6033781wrn.438.1652490407859; Fri, 13 May 2022 18:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652490407; cv=none; d=google.com; s=arc-20160816; b=odsv/XhnsuaHDQ8aj5lFD0/QJGf2bA7eWQKV6NwFerCTz9VKdlybBiXeoK+qQMeuYF pbTeGDm45fCDAEkzIGmBRpDLW7wTL6vfjY0t4AmUHbCFjJp/3OLjPtkdTCAs0bNzm14h KaQD3fVaATUhhQGhlHMqcL52MdqR2vHSNPX6e5MYI7CttJjUPOFDbcUyOOusVuTZHREx pWLrBBzuib8IjMuhBcJmP+LWh2mn0TjUiszvdotDg2QxR7OkybjE3ufPFuE/iKk7pR2u TI5b3O4QfhL1xMsv6p0dpPDaqGwThp1uLtnl4vAIBVnCR5itGGzt9XmRQckQ+DmnT7iZ /ctA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=VyhacgbGSHcXGDEruHjCBEZQJDTnm+E2dVyccxhfr+I=; b=yWu0tSQm2sm6HCr3Nz+jmneFbzp6pRmFAxZfve3oONIr0VX/tcoNFYTNQgzaKj7/go RGHi0XZNYhA9x5CVnj3N2VBBcnzqUK65BbY8sPUdM+WFjBicUNs6POGjl/6uudltJ+ZM 7CM101CaNk2mHZ+xGGdl+BFXg5XEEHw+wi4rVXlY+8dN7Fy1/UPzKkVezZXeRVmGRIHj vUT7CUfIsF+nSRKZGg1rbVObvg1lMoQFC7MdUzHcAjiQJHOcHNC7IBB5O2owauDmPgm/ xsiaAkP/SE0YQfIejOZNWlAVOcmXaf0vz6kxEXOFRDxLPG6Bmm1Yp7VHcnsWF7JZftKr g4wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V+ZKHmrB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x17-20020adff651000000b0020c633937d7si3366513wrp.324.2022.05.13.18.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:06:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V+ZKHmrB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A3904380A88; Fri, 13 May 2022 16:39:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357946AbiELTNu (ORCPT + 99 others); Thu, 12 May 2022 15:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353107AbiELTNr (ORCPT ); Thu, 12 May 2022 15:13:47 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EDBA1A0AF3; Thu, 12 May 2022 12:13:46 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id j4so10770672lfh.8; Thu, 12 May 2022 12:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VyhacgbGSHcXGDEruHjCBEZQJDTnm+E2dVyccxhfr+I=; b=V+ZKHmrB3XgS4QXRdNl/khDE7X8CSh8yCTaxSwN1FEKAVom8pm74Z4kc4NlnwTtCsm qeMyOXTSrz7ckDawSm1y3pIaP5aE9U9PtPphS6ssVTQcmTAOb9mw61+aan+YSKWvR4SQ /jaXeZ2z7pRVH+qV7p/H+3l1qiqD//bfD97+KkD8+DpEymTAOQjgqOyAo4BBrXEdxywL G1rYgCY/eyLJyJh1F5K6HEoNVFYHu2wuvdl/TaK4QGhcSOq1LmsTo+sgUlcw3t3v6Qu4 VvKLTztHU5ZVoejUPvWdqCqrzSEDkGgwUODmDsOnbafYVW/sM/wrrVeJCWpdW4ZRhBSH 1hiw== 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:mime-version :content-transfer-encoding; bh=VyhacgbGSHcXGDEruHjCBEZQJDTnm+E2dVyccxhfr+I=; b=VIgwD+Bdr6826bZGSx8w9hpfxU80n/N/1JEGsRa4jSHkVJ93uZ93uLKuq5MzTJVltz 73x1SBEey3JVupUbTIIB6fBMjf3DUhaKM5HUiBg0aSzoz9Ypo/Gn/gADgHBQ2bA3PqwD Xbz5jg8yXSAAvCOL92dy45CfsIPtT9Y8lvfLrcsw6WZB5V8FsdkwARgDdiYkh5bMRLRf lC7fDe/qJ3kwl/8A3/ZkQ7D81vpRhZ5vLlXWaL8eCx2T0INjv8OW6/Ik4RONhoHPcM50 Se0wbsW7vtmQqaVPyive/8dAXaaijfv2kSgji1cCr19vs+j5nAMfNOImV9J1sY+QPXUv JgKg== X-Gm-Message-State: AOAM5311BU14ncrpq6qfM/5obplHo3bCep1hKwsvGtjLbVIcWAAE/ivZ QCelDjpBYstvx/vLXCw/kYa61qNjQ6EtwQ== X-Received: by 2002:a05:6512:2009:b0:471:ffee:6ee1 with SMTP id a9-20020a056512200900b00471ffee6ee1mr893466lfb.268.1652382824597; Thu, 12 May 2022 12:13:44 -0700 (PDT) Received: from nergzd-desktop.localdomain ([194.39.226.133]) by smtp.gmail.com with ESMTPSA id y26-20020ac255ba000000b0047255d210f4sm62146lfg.35.2022.05.12.12.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 12:13:44 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Markuss Broks , Konrad Dybcio , Marijn Suijten , AngeloGioacchino Del Regno , Song Qiang , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v4 0/5] Add support for ToF sensor on Yoshino platform Date: Thu, 12 May 2022 22:13:28 +0300 Message-Id: <20220512191334.61804-1-markuss.broks@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 This series adds support for the ToF proximity sensor installed on Yoshino devices. As part of this series, support handling the reset GPIO and VDD supply by the VL53L0X driver. Also stop hardcoding the interrupt type, since on Yoshino devices it seems that edge triggering doesn't work properly. Tested on Sony Xperia XZ1 (poplar). Cc: Konrad Dybcio Cc: Marijn Suijten Cc: AngeloGioacchino Del Regno v2: - Fix a nasty issue: turns out grouping the pinctrl makes it not apply, which was the main cause of edge interrupts not working correctly and having to use level interrupts, which caused a large amount of false detections. - handle the irq type more gracefully: if it's not provided, default to falling edge, but if it's provided, then use the provided one. v3: - add irq.h header (forgot to commit) - reword commit message (already initialized -> pre-initialized) v4: - reorder powering on and power off action (Jonathan) - sort pinctrls by GPIO number (Konrad) Markuss Broks (5): dt-bindings: proximity: vl53l0x: Document optional supply and GPIO properties proximity: vl53l0x: Get interrupt type from DT proximity: vl53l0x: Handle the VDD regulator proximity: vl53l0x: Handle the reset GPIO arm64: dts: qcom: msm8998-xperia: Introduce ToF sensor support .../bindings/iio/proximity/st,vl53l0x.yaml | 5 ++ .../dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 34 +++++++++++++ drivers/iio/proximity/vl53l0x-i2c.c | 50 ++++++++++++++++++- 3 files changed, 88 insertions(+), 1 deletion(-) -- 2.35.1