Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4470865ybz; Tue, 21 Apr 2020 00:57:10 -0700 (PDT) X-Google-Smtp-Source: APiQypJnusZp3jkGkcocnbeFr/8CrAnc7Koq94trvNSYczo4WRcqkmbyuaAaz7hXHer+Aon0P6k4 X-Received: by 2002:aa7:dd14:: with SMTP id i20mr5073456edv.225.1587455829854; Tue, 21 Apr 2020 00:57:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587455829; cv=none; d=google.com; s=arc-20160816; b=OjoCxJM5CilySeNcTcqKvBUhWrXYXX2zQcqblGx1F6GJ8J/U+bRtWAK9NW4vFakELf CKvbxopqO/4wBgsEvI0psJNMY1xYBi1vMmhBSDeFtTefYSKZs5PlFOlztpBHBIkhq26Q L8Yo2p/i8Xb+L00dvhQxc8XL1WKXuNtewHvozk6IRGO4of42Y+XA0dfHO5WYucwP+dJp 1x3FyLZiBWMeEUUIW7v1F25XxxOna2bNZYyzz3QJRQCPIq9ED5T+1i1jhjGwI2szhD0E qIj843vfzPc0myHJV9tA9o3qqKiM/lx8Mrj3dc82ssNjC8WaTTzPSwF1tndm1kE3ASdM gBew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9KHZNctYOhjFckhn2qMQlu+HnNBvg93+938BxzB/qXk=; b=yaUptROTi/OmzhEXaOxToZd0TkUaYqhZJM2q8Uy6RAEGiTOKMtFidvXkzAAqzMdNtf ao//GYXeKEXELJWjjqE+LBeEeZzw7BUn6zMhbZ8tOXZYGXiszvgaHL/yh0ZxP61c+jsE 0zq0viB2FjtQy0SFxQrVHaB9jruCTLNVklkX0DtmAhnSYn48B4pmiW8UoBc2Dfr0bH0I QeQCDMax2RDqEcZuF6hEBWiJgnHe8eB9hgeBfD2lTgZn5KLaaRMG84TXio3UzZ2/YMpr w4theKq3fMxjsHfirDTd6TKlR8YQja+rrAQanHe0dlMog8tYxGTB5EMme+p9cyS8xJa3 GHcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rD4G4DY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1151526eds.503.2020.04.21.00.56.46; Tue, 21 Apr 2020 00:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rD4G4DY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728275AbgDUHzm (ORCPT + 99 others); Tue, 21 Apr 2020 03:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbgDUHzl (ORCPT ); Tue, 21 Apr 2020 03:55:41 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B684CC061A0F; Tue, 21 Apr 2020 00:55:40 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id z6so2536910wml.2; Tue, 21 Apr 2020 00:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9KHZNctYOhjFckhn2qMQlu+HnNBvg93+938BxzB/qXk=; b=rD4G4DY+VhyR8RlILQ8P5h6uIb96WX59w47l9toPCaaDFia2jKbT3IMMXkZ5wtDxu6 +r06QIqmZoIh16Fki/4nI2NPrAED8m74o0mUxULApjNPMKeaUeJwLnnYkfgAqaAMzUEQ BCxTPPmB/XPJXC3yLP/xfzhgXdonVOpJp74S+c4K/NYCE02sYCis2zR8EVcKVHRR0yWM iHwgSM/3NrWal8kWuypWMosb4PVO+NfGHoRMUa736Ix8JNeKpogoRKrVczmFcPKMgNso XgepSBebYVt8BZdTbOVU236FAEuzYz5+vAQLRERHiKdC7iOyam5pbY1Be088DUL/swmF uxGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9KHZNctYOhjFckhn2qMQlu+HnNBvg93+938BxzB/qXk=; b=Wj2i3jyXrVEvaCVU/HAIOsXlUoUrx8hlSgRHYS4qONboV8m6+JT7dRNRvvVViXxy4f HTqqomidJKshqIfjiyEcF6399/f35cgFDpB/J6U6/MLoGI1AehnXibjPRgwxmT8xj+2U meJLvnvGYPEzPhasnp6dCuen2WtDSQ8JN1dCYX7GYYQz6MMamL3Fs4XHEII7wOJqxfVK ohq35H1ZbLIwC7uzqsLQQk6iH4SQOSTrwKouzc4PTo6LbrTPmEsnVeKeFCQeP4NkPRuK Lh7zoRDZGEuj4Fso9OdTNgI0+D9wlKv9VuWdpZHSgW42l83ERi3UaaHjo7Jq/hixKHFO OvqA== X-Gm-Message-State: AGi0PuaKolV0+X7o3JlRacjADKDimu1f8N2hZH2bEwPkAi69/JprOGmB Ea6OdBGomJohkgwNunSweJw= X-Received: by 2002:a7b:c74d:: with SMTP id w13mr3410328wmk.36.1587455739444; Tue, 21 Apr 2020 00:55:39 -0700 (PDT) Received: from meru.fronius.com ([2a01:cb18:832e:5f00:f9a2:4:b043:a3fb]) by smtp.gmail.com with ESMTPSA id c190sm2514510wme.10.2020.04.21.00.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 00:55:38 -0700 (PDT) From: Mathieu Othacehe To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Othacehe Subject: [PATCH v4 0/4] iio: vcnl: Add interrupts support for VCNL4010/20. Date: Tue, 21 Apr 2020 09:55:28 +0200 Message-Id: <20200421075532.19192-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Here's a v4 addressing Peter and Andy remarks. The most important change is the removal of most mutex uses, as i2c accesses are already protected by the i2c framework. Thanks, Mathieu Changes from v3: * Use i2c_smbus_read_byte_data and i2c_smbus_write_word_data for read and write functions. * Rename vcnl4010_prox_threshold to vcnl4010_config_threshold. * Do not lock i2c accesses as they are already protected. * Fix a typo in irq name. * Do not provide ALS sampling frequency operation, as ALS data are not buffered anymore. * Return bool in vcnl4010_in_periodic_mode and vcnl4010_thr_enabled functions. Changes from v2: * Rebase on iio testing branch. * Remove useless test in vcnl4010_probe_trigger. Changes from v1: * Split into four different patches. * Use iio_device_claim_direct_mode to protect raw access from buffer capture. * Requesting a sampling frequency above the limit is no longer possible. * Inline read_isr and write_isr functions. * Remove IIO_LIGHT data from buffer capture. * Make sure postenable and predisable functions respect the common form. * Do not set the trigger by default. * Remove the devm_iio_triggered_buffer_setup top half. Mathieu Othacehe (4): iio: vcnl4000: Factorize data reading and writing. iio: vcnl4000: Add event support for VCNL4010/20. iio: vcnl4000: Add sampling frequency support for VCNL4010/20. iio: vcnl4000: Add buffer support for VCNL4010/20. drivers/iio/light/Kconfig | 2 + drivers/iio/light/vcnl4000.c | 747 +++++++++++++++++++++++++++++++---- 2 files changed, 683 insertions(+), 66 deletions(-) -- 2.26.0