Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2724234imj; Mon, 18 Feb 2019 10:59:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IYc3ZArU3MT0FQ6YU6NsAugs8hunNbRNtPwfKuGKDHpe6GDDxdDfjl6fgrwAFxOj59PTu4g X-Received: by 2002:a63:f753:: with SMTP id f19mr18998708pgk.437.1550516376989; Mon, 18 Feb 2019 10:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550516376; cv=none; d=google.com; s=arc-20160816; b=uYI+ET4/XAKXb1GduSiixWFD8K1AlvPZEFreKArxAltskBeC0/kqfufBWcnS2DSypN tLBGbZy4/FNBHX3RjlW2RoHnHaolQIhXGjZ7TaeIS2RGW5a7qlaXeH7w4tKqzBQUn3qt IR185iyawJ+JouEP0PQvTFgUfAvswMXqmLxX7QhY5bM0dWaAuc81d6VgilnRUV8KZ5jW EQcEi+5Y4lf+gSBcuPDiYfPfT0KWqF3kN8YgATGyCOODzHaIF6X7kEi79zOjx6tefK1t TVJfp9sMuGtkAZA85Ti8uXpw2j2tM8uWLjouFg2Szu+I+t5iuUfyfqNndHai8/rf0DK0 NbnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=e9Ju8o7UI0AE5oEO08Wi6g50YqLMKlVnM2Sf/QzK7J0=; b=SjT5bG7si9UDgfCmG+qxrhgbLwh3/jXVX4H3R1dGLqwt7N95McBqjJd3n6vhl+5qkr de6WwzvYSUzKymdR2KKL9ZokdjNynsTpKNnC1r4DxMmdmfOpsZ42YReK1nrFWrVsixqw hJTuzfGckb9dzczvaQUhzXhIpUXKYMS2jGlxgMHk6S4+kUi9sc+IMmRmPme7qJq6UdXE Rxf6osUp99TuLP0aEAAcnOzx6f26SNtbGmaxYgBs7HgoZhWhY5W5ohEMVACTCiEBtNap XlCnaP+9yt50ZGk5dQIPsSumNsNO8Krtz93eDF/WOyg3st2h+++OjRcveLCeQKc9O+QL Ulmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XlPaoM/y"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21si14836738pls.324.2019.02.18.10.59.21; Mon, 18 Feb 2019 10:59:36 -0800 (PST) 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=@gmail.com header.s=20161025 header.b="XlPaoM/y"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387816AbfBRROM (ORCPT + 99 others); Mon, 18 Feb 2019 12:14:12 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:41850 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731396AbfBRROL (ORCPT ); Mon, 18 Feb 2019 12:14:11 -0500 Received: by mail-ot1-f66.google.com with SMTP id t7so13085984otk.8; Mon, 18 Feb 2019 09:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e9Ju8o7UI0AE5oEO08Wi6g50YqLMKlVnM2Sf/QzK7J0=; b=XlPaoM/yy+gaPvXUQlf6IVhNEhO4cWMtw9PNgcOtK5VapyrujCJK4FOLkoMVamEFhV Mwe9FKkHAGW2iZGhwGpq6I56RkEU4SqNMGlTvOVcSIh4ivP+lpG8EtwaLTYNYGsq9VHy 7glXivZuZoFubR8VZ5a7TaL/KSTrpVfxFk2NZOZ3arNqziF5UVfcy6w3Nbnv5VPoBieJ v+WLD1XKGZ/z8PwGf6R0GOQAROBeY6Cu0trwEp0bRJiDAkItF4k3KQI26w08dFsH8BcX vs03CmgyN9zf3f2b/lXLPLXELrjcr+vAScslA28gSSy1cX+dFlObPokLv6/ITCRRBcT4 kuoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e9Ju8o7UI0AE5oEO08Wi6g50YqLMKlVnM2Sf/QzK7J0=; b=Bv1azvVBiCuKPHLHLAhn6xCMh34k7Uoq6HGU5FWjiT/HTodmqSZstr9kAPvs+vz0tq MSJ6bk0gU506G6eXffMPB1pLhGomuOcNNSos5VypuZ5J9MnDOPwAS/SBZK97x3N+1y8r JIEsw7Dyc3+11hXHK0iLMJ1TLlNDiqFB+M1PdXs3HAFNcD2xKZi5Z8DXVVKoUR2EXMQO iyhChAIda7+NAfJyB+utharmSqMNqprhXBbS6hwqfwYqOR4CuLO6qhqV5O6Bfj+Wx2o0 OkYkl2Q7mpoe6XOOo5vrT+aclmDKbaVEJNZVeeNJ+sBSeSuC4jXKNk7aFVxhvYWXhmbX hffA== X-Gm-Message-State: AHQUAuYbhl66iX5gFgk49FICwO0YaC5pIekE9VihQ3QsRLXA+1ScNubT dxZWAMjjNWDaEjL+SbIfPtf9Z/Dp6vNy48AR2z4= X-Received: by 2002:a05:6808:693:: with SMTP id k19mr14234489oig.77.1550510050977; Mon, 18 Feb 2019 09:14:10 -0800 (PST) MIME-Version: 1.0 References: <89716a4433cd83aea5f4200359b184b0ee2cc8bd.1549828313.git.bobbyeshleman@gmail.com> <20190213021753.GA19621@bobby.localdomain> <20190218152224.00007920@huawei.com> In-Reply-To: <20190218152224.00007920@huawei.com> From: Sven Van Asbroeck Date: Mon, 18 Feb 2019 12:13:59 -0500 Message-ID: Subject: Re: [PATCH 1/3] iio: light: Add driver for ap3216c To: Jonathan Cameron Cc: Robert Eshleman , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Linux Kernel Mailing List , linux-iio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Jonathan, First of all, thank you so much for taking the time for such a detailed reply ! On Mon, Feb 18, 2019 at 10:22 AM Jonathan Cameron wrote: > > > So, what I'm reading above is worrying. The interrupt is cleared > by the read of the data registers? I thought the datasheet allowed > for an explicit clear? > I don't think there's any need to worry. The part allows us to choose between clear-on-read, and explicit clear. Bobby's approach is fundamentally sound. IMHO most of my suggestions were based on an incomplete understanding of a) the interrupt in the device, and b) the event guarantees in iio. I will respond to your larger reply properly soon.