Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3686104lfo; Mon, 23 May 2022 11:24:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXbViEyEtUDmxfQqAwW/ETUFX3u9r1aHqZa/jPlnoF2rcgUQZ7arbBYfDb8dGGH8wMTIIz X-Received: by 2002:a17:90a:c002:b0:1d9:250a:73c8 with SMTP id p2-20020a17090ac00200b001d9250a73c8mr278472pjt.133.1653330275095; Mon, 23 May 2022 11:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653330275; cv=none; d=google.com; s=arc-20160816; b=Cm/73CkzkrmI24kBrYAQf3uDQmjXLmUQDFsq7Ifcr2GzYdSBlBnt5nc8/z0SeRmRHi ZLlyMX4BAt4bmcBkFOsFMkZ9MjrAf1ixfKRinMQgLY7eYTf3NE/ZfcgfKkl37+yOoVHQ s8N/mrxzC6uTab6fcAmG8a/yrjEwZJwV49yZXMZzuX2roNyKl5/HAM0tx2M367ADuRGl c0v9Je1W6fYmMRCjRFX8fNSNPD7RuhZoLkBKBe0qQtvp1ob4VLmMC73LzAJ8AHlLpPdl tDEcKgAPj3eowe81gKScYEwFvZ3XRto/8YYOEekjLVOOm0Y4WKlJNJW0zblEmSns0xb6 m6Yw== 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=bOlYsdGBjB8la7xfDxJ83baKM4S1nbqwnMPOp413tZ8=; b=kDEGhtR7Mek3STKwADLWevttolVzFfHfBeoIpVbliLlGZDNT1u0xpSt+EridDvUGWf shxjB4mQollNqnaE5ZpcUxTmt1NxN/NLZC+vlzyh1K17yz5lBt+acc/+z8VMJC/h4vkI 5WxmhXpP0fBJ5k10uyIcC6hI2HjVST+L0OdCgzsdHYCdAAfTOdis0JIpgcZE5Z4t+TlK cspinfHUAJEFAvrqFZqsTNXglUceHx09eYQgpD2uuhoLxy5wUGnXcb+KbZSpXnRdR/qX fBW3ndqrLcOdExJcnvqmPhEZyCmW0V98C5BQiYS32NHkFPkevbCm+YrbDhBHWr8qDs5I QTIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XulNbwRW; 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 na3-20020a17090b4c0300b001e069a53c68si172342pjb.0.2022.05.23.11.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:24:35 -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=XulNbwRW; 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 287BF11905A; Mon, 23 May 2022 11:24:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243276AbiEWSTw (ORCPT + 99 others); Mon, 23 May 2022 14:19:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245628AbiEWSSU (ORCPT ); Mon, 23 May 2022 14:18:20 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F165DD36; Mon, 23 May 2022 10:57:02 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id h8so18112417ljb.6; Mon, 23 May 2022 10:57:02 -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=bOlYsdGBjB8la7xfDxJ83baKM4S1nbqwnMPOp413tZ8=; b=XulNbwRW0NjEWCEnZSzm0Gq/3TvyuwtTwqHPQBDZFKe0nwSuv4sY+Gqbrnny+R5/jx 8jhRUwSCHPdZuGn76v3OuSYCy0sCm1fMsD4edv/qPUuxYYlRu4Lp3JkSppnV+xwktmQj 0l0FNHs4WTUaxkdNlBxJ8QoxokkPG7ZBRgJvlbes/0k44G4eKDVe3KlXyOXGDQVjEUUK vwrL1COxrm62BlICzbZl7jnF550PGr2vRRAp9KuP4Ez8dZcjN1Kfn1TmXMSUCWw7b4Go 142po8BcO0k2n6JiDvQQA2gOaHNeQSnwd0Nr5LQpKqO1SSuxfz7JuV7uqQoUXv7sxp1W vsdQ== 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=bOlYsdGBjB8la7xfDxJ83baKM4S1nbqwnMPOp413tZ8=; b=7FChkw3qqNTrUDoS3wCxL0ub01IEBPaZH1BGQmuP8rs5rVZefYxveqvsNEmo1CkGyl pttN0oTbbNpEtCYek2u22J9NzHItqaWcvAs5DXrokYVLJ9gHKOcGOu5vu0tS9g8WLgOr f9cPkCrxBJNN7ebLoQXoAiyqGIWfQYpxRNwgZnu2PAPUtbksc28bpTQCESEiU6pLYjjv 2ZfMMucLv1uIPBwa384GKRFP42V3+YRVl60Zh5O0y6Tz1xAHtNAIoog16qs9wui9FO46 VR8pwSPBb4liXSiV6Ngp87uB+JiBHsD1PGrfKtDzEUKSvl2A7UWGN0JMR+8p6atY1Syg 12+w== X-Gm-Message-State: AOAM533lfl61v9SNN7F2nu8ByvjeSWAnVHO1I2663RHvJ5uJ741SAVlR c9NYDguFr//Ml9OzP4oBbG/zPm1Dr3bUGA== X-Received: by 2002:a05:651c:10a8:b0:253:c8a7:3afd with SMTP id k8-20020a05651c10a800b00253c8a73afdmr13839377ljn.431.1653328468359; Mon, 23 May 2022 10:54:28 -0700 (PDT) Received: from nergzd-desktop.localdomain ([194.39.226.133]) by smtp.gmail.com with ESMTPSA id x9-20020a056512078900b0047255d211f9sm2087743lfr.296.2022.05.23.10.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:54:27 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org, jic23@kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Markuss Broks , Konrad Dybcio , Marijn Suijten , AngeloGioacchino Del Regno , Song Qiang , 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 v5 0/5] Add support for ToF sensor on Yoshino platform Date: Mon, 23 May 2022 20:53:39 +0300 Message-Id: <20220523175344.5845-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) v5: - "This patch adds..." -> "Add ..." (Krzysztof) 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