Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2503753ybz; Sun, 3 May 2020 02:34:14 -0700 (PDT) X-Google-Smtp-Source: APiQypJzao26aI/FvCRvHv0ELlyoYx9Vr5TKzztaA1aoVca6R1giw2hFqQeF1euI0ZabGIgenVox X-Received: by 2002:aa7:cdd9:: with SMTP id h25mr10581073edw.17.1588498454617; Sun, 03 May 2020 02:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588498454; cv=none; d=google.com; s=arc-20160816; b=vIhYfugmBvKG2NzrZ5XaLFR3SPl52ugnRmvtzkgkIkUTdH/zJHmGmeC2w1Y7Jz0qot kORFXJHj1SzDx6q/v21F4g1NpGPoh58p+SVcJTuItrL8Y3yXar9BzBOUV/2CmR+vdjzb Y8l5F3dKWvidhRaq+kPpM0YgmgZ2R1rR5EPDPZ9qN3FEymmGhEhlP8+ldBCoc+JRuadB VmfWq5M0tcCMEZjJuiWgBmT0Zc6Pp8tV2HxpH/XwSPylr9EoOYgh4jkEVNCVyudMjMwP q1RNTsO+je3VQ+GMHWNSa/AVuokVYdZoPUlv8mY2ZdSiq33P/zK+RCkXu+fIlYZfEGhz yKmQ== 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=v48F27nCpiSeuCStzuPRcHVl03E6b+T/M/LToBjyeBY=; b=jnQcRoRv4JCjoKHdKbJMBXgy6kM1C8e8tKHlpQ7QsunDXbjeWMGksxzRkbzWIi6VlI rUdHzplZSYX3Q9MqO9jJ6TtlwYgq33SJfFQDyVxL88a9KlHobGBXN//f0Bp3ZZ6To76+ Y9cWAhwLhhGkfwYbdMpI6GNWVUVcsQpSMMCPZQ61SKs1YTzSW/R2eDQXkcKX0od/OxWk rn2hvMIwTPUCVxOJ00oZvfvyUhbY1sJOXVwxNc8Iny2yE/o6vbXS4Zjr7bV1TtyXT0ZJ rhpuoD/ejk6GcNl0JPxo/bDM7cXBheAtcku1d5c5pK6nbLR/PU9xMvTap0SfKkOWdQ5p Howg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="o2JeUOT/"; 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 b9si4664022edf.455.2020.05.03.02.33.51; Sun, 03 May 2020 02:34:14 -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="o2JeUOT/"; 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 S1727991AbgECJcW (ORCPT + 99 others); Sun, 3 May 2020 05:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726445AbgECJcV (ORCPT ); Sun, 3 May 2020 05:32:21 -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 281F3C061A0C; Sun, 3 May 2020 02:32:21 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id u127so5296622wmg.1; Sun, 03 May 2020 02:32:21 -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=v48F27nCpiSeuCStzuPRcHVl03E6b+T/M/LToBjyeBY=; b=o2JeUOT/SAXzjoRGgMb73kDM41GlcTO/bK49XobiuZLY6ZKbkGmf6x3HrXxn3qeRkX mDaQTzWMPkSTNEznRFg4V3lOo7hdPNjIKsSXRny/MsGt+VSHjyLmk8BpiN9vNt0a6s33 LrwRXg7NEJ8OSkZk9oWFy1sWPBE/HVk8z9ykn+ZFjERu8+q//wBLQNok5Xdojep2B0iU X/18FylZ9Q8LVR2YM38AHAbfbCuOCsTHdxVsZbRVmX02GXllGnCi46UNY6f7qcN2Ynbo r3MvFJYH3OfVuD5fR/HKfRy1b4irEH58iuPUHAXGs3+7KpenCGMbvNKo5OspY2Hzcq7I x/aw== 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=v48F27nCpiSeuCStzuPRcHVl03E6b+T/M/LToBjyeBY=; b=TA9TLcNKBIFGeQv/PqtVHXrRXHYp9CL1k7OfYV1W8AKl/cnkDMPrItZTgkLOsYgdBT n90mt6WBQUzye7e2alX+6s7D3AdqIwPfgMj23VJZ8eXt3fK/ZeUu0KsIeNYWLBlwCAJH HGmMAciKqWhvzFm61ac3iugj8ZVE2ubpN8beanr7JQc5TbwZR5WwE/MnhPLDQUJRF3lC Fw4TPgKQrtUBQtBKwvh+56uaHydlaClraF1QUh0i5VX6WRbAHoXo/aoifqT7nDDsWQLZ mcnKjN9mRH20ga59K1Sa3R5i1B9vLLMgmVZL7lwqpbX1BKJhzztVyV8JuKetrnzK5FOo YX2A== X-Gm-Message-State: AGi0PuYxVYv5QXDgSyK5qOJqTSggZgNL6CcsDJ8jsUWpXuTogDE3NVzR dd0+NOINde9YzlEHG0TrdCLOktcuR68= X-Received: by 2002:a05:600c:441a:: with SMTP id u26mr9279138wmn.154.1588498339898; Sun, 03 May 2020 02:32:19 -0700 (PDT) Received: from meru.home ([2a01:cb18:832e:5f00:1cf0:acc0:9003:83d6]) by smtp.gmail.com with ESMTPSA id e17sm10086963wrr.32.2020.05.03.02.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 02:32:19 -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 v7 0/5] iio: vcnl: Add interrupts support for VCNL4010/20. Date: Sun, 3 May 2020 11:29:54 +0200 Message-Id: <20200503092959.8806-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 v7 fixing Jonathan remarks. Thanks, Mathieu Changes from v6: * Add a missing Signed-off" tag in the first commit. * Clean exit pattern in vcnl4010_buffer_postenable. Changes from v5: * Fix i2c measure reads that are broken on the current driver for be16 platforms. * Use read_avail callback for sampling frequency. * Move scan_index setting to the correct patch. Changes from v4: * Rename vcnl4010_in_periodic_mode into vcnl4010_is_in_periodic_mode and vcnl4010_thr_enabled into vcnl4010_is_thr_enabled. Also fix bitmask checking in those functions. * Refactor vcnl4010_write_proxy_samp_freq to loop in the other direction. 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 (5): iio: vcnl4000: Fix i2c swapped word reading. 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 | 753 ++++++++++++++++++++++++++++++++--- 2 files changed, 689 insertions(+), 66 deletions(-) -- 2.26.0