Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2343722ybb; Fri, 27 Mar 2020 03:52:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvlSjXN5O8aoOj8EOLNOBfZS/FVSXHe+aZXCxOI+xfST/SAmO2j/t5oK+p+FbY3YocweWkr X-Received: by 2002:a4a:8241:: with SMTP id t1mr8576090oog.57.1585306321720; Fri, 27 Mar 2020 03:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585306321; cv=none; d=google.com; s=arc-20160816; b=SsPpnvPuOSpuhqjUv9BXnTKxwY0R8hfECFJ6AAKRgNBd9VvZNV/RB7sNtObsGp7VXj +ko9Vh2kcFsPujcF/4oZCH1RJiSvSl9tsXalABCihcCkJncKlyWDPPMSmkbkC/G+f9+F GGhZ7Z44dEfLh/isOn8lRb+11PD5FEcKm+oEusIbqwGJm3XX951OfiIr1U7BOiM0Ns7N r1KyE6ZHQhbVekTDJyrrKQoAHnpVedECPrtKFjUYP3x/QXp7f2xEAet/qujJ8oOFnvgv Ab2MnNbbB4bP71Wx9Xfzwj4Nd25zBAzb/eL6XFRkGdsmOuq2UTkp/L1Cy18v9ELKy8JM D1fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=iy+47a4w21tfpeICw2wkvA8AHnhWf79Gvi2hU6usAzw=; b=r9rpM+LrbVYsfgcmk836IUofyT2O0a17sIa9Zj08t2t6WY+owekL2Wy11ikWVlRE81 HaCqzp4anaaNXFmGj2Jmo5LSMHiRIjK/NyAdbXQIyqk/aWYUb2fI8n0Z/HQGgi1o9fwE j2EoWO+7pqp0HlvCa8itL7wiYxKiQfQTb/5Adcj2Y1wtvkccdI4qrodaSQ1gYjqYPLsO 73aRi7KVucNq+PurzB6mraX6AJNjvjFsAhnJR+D4dQ7DEvLVpCzNVtyNbiaY8lS2sk+L iDa8Fg16bVQHCJISsV3w1OhOV1VCa8g12zaQALrBhQVSE8sgv7dG25cKJgoRmc69jD+K QAJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yadro.com header.s=mta-01 header.b=Sagm9OPA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l25si2363185otn.206.2020.03.27.03.51.49; Fri, 27 Mar 2020 03:52:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yadro.com header.s=mta-01 header.b=Sagm9OPA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgC0Kt4 (ORCPT + 99 others); Fri, 27 Mar 2020 06:49:56 -0400 Received: from mta-02.yadro.com ([89.207.88.252]:44062 "EHLO mta-01.yadro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726217AbgC0Kt4 (ORCPT ); Fri, 27 Mar 2020 06:49:56 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 4C66D412D8; Fri, 27 Mar 2020 10:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=mta-01; t=1585306193; x= 1587120594; bh=lRdmUQL7NNCaphqPAmWvICfX+JM+aLcQYGMvReOsaBQ=; b=S agm9OPApza5MFrlvwHcQUqs0EYui+8/XQtFeKJlx1jxRCRiA0B3YM1VO6WFSHIJr VYG/3YFWdV/RF9/aoxk1SzsNOuhhzlDd5C3K1w9jVk6l2ZATGoTGg3TE025PlJ2L RXMpBRReochh7YZC67mBjLFiy71uKBOyHdO0Mt39S8= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qy4-AHzAK_TC; Fri, 27 Mar 2020 13:49:53 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id CC32741276; Fri, 27 Mar 2020 13:49:52 +0300 (MSK) Received: from localhost.yadro.com (10.199.0.42) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Fri, 27 Mar 2020 13:49:53 +0300 From: Ivan Mikhaylov CC: Ivan Mikhaylov , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , , , , Mark Rutland , Rob Herring , Andy Shevchenko Subject: [PATCH v4 0/2] iio: proximity: driver for vcnl3020 Date: Fri, 27 Mar 2020 13:49:52 +0300 Message-ID: <20200327104954.27829-1-i.mikhaylov@yadro.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.199.0.42] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add proximity sensor driver for Vishay vcnl3020. Only on-demand measurement is supported for now. Changes from v3: 1. minor changes. 2. add i2c block to fix dts section in yaml. Changes from v2: 1. using regmap_read_poll_timeout instead of do-while in measurement function. 2. change struct i2client* in vcnl3020_data to struct dev* 3. enable REGMAP_I2C in Kconfig Changes from v1: 1. using regmap interface instead of i2c_smbus_* calls. 2. switch from probe to probe_new. 3. s32/int32_t -> int Ivan Mikhaylov (2): iio: proximity: provide device tree binding document iio: proximity: Add driver support for vcnl3020 proximity sensor .../bindings/iio/proximity/vcnl3020.yaml | 52 ++++ drivers/iio/proximity/Kconfig | 11 + drivers/iio/proximity/Makefile | 1 + drivers/iio/proximity/vcnl3020.c | 232 ++++++++++++++++++ 4 files changed, 297 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/proximity/vcnl3020.yaml create mode 100644 drivers/iio/proximity/vcnl3020.c -- 2.21.1