From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC995C433E0 for ; Tue, 2 Jun 2020 08:54:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2FB620734 for ; Tue, 2 Jun 2020 08:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725921AbgFBIyt (ORCPT ); Tue, 2 Jun 2020 04:54:49 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2265 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725907AbgFBIyt (ORCPT ); Tue, 2 Jun 2020 04:54:49 -0400 Received: from lhreml710-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id B113D257B5EFB95BE55A; Tue, 2 Jun 2020 09:54:46 +0100 (IST) Received: from localhost (10.47.95.180) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 2 Jun 2020 09:54:46 +0100 Date: Tue, 2 Jun 2020 09:54:06 +0100 From: Jonathan Cameron To: "Ardelean, Alexandru" CC: "jic23@kernel.org" , "lars@metafoo.de" , "s.hauer@pengutronix.de" , "alexandre.torgue@st.com" , "linux-iio@vger.kernel.org" , "linus.walleij@linaro.org" , "linux-kernel@vger.kernel.org" , "songqiang1304521@gmail.com" , "mcoquelin.stm32@gmail.com" , "lorenzo.bianconi83@gmail.com" , "shawnguo@kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v2 3/3] iio: remove iio_triggered_buffer_postenable()/iio_triggered_buffer_predisable() Message-ID: <20200602095406.00005add@Huawei.com> In-Reply-To: References: <20200525113855.178821-1-alexandru.ardelean@analog.com> <20200525113855.178821-3-alexandru.ardelean@analog.com> <20200531164020.765822dc@archlinux> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.95.180] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Tue, 2 Jun 2020 07:50:23 +0000 "Ardelean, Alexandru" wrote: > On Sun, 2020-05-31 at 16:40 +0100, Jonathan Cameron wrote: > > On Mon, 25 May 2020 14:38:55 +0300 > > Alexandru Ardelean wrote: > > > > > From: Lars-Peter Clausen > > > > > > This patch should be squashed into the first one, as the first one is > > > breaking the build (intentionally) to make the IIO core files easier to > > > review. > > > > > > Signed-off-by: Lars-Peter Clausen > > > Signed-off-by: Alexandru Ardelean > > > --- > > > > Friend poke. Version log? > > Version log is in the first patch. > I was wondering if I omitted it. > Seems, this time I didn't. But I admit, it probably would have been better > here. Ah fair enough. That works fine if there is a cover letter but not so much just putting things in the first patch! > > > > > Other than the wistful comment below (which I'm not expecting you to > > do anything about btw!) whole series looks good to me. > > > > These are obviously no functional changes (I think) so it's only really > > patch 2 that > > could do with more eyes and acks. > > > > Far as I can tell that case is fine as well because of the protections > > on being in the right mode, but more eyes on that would be great. > > > > So assuming that's fine, what commit message do you want me to use for > > the fused single patch? > > Commit message-wise: I think the message in the first commit would be > mostly sufficient. > No idea what other description would be needed. > > So, maybe something like: > > ---------------------------------------------------------------------- > All devices using a triggered buffer need to attach and detach the trigger > to the device in order to properly work. Instead of doing this in each and > every driver by hand move this into the core. > > At this point in time, all drivers should have been resolved to > attach/detach the poll-function in the same order. > > This patch removes all explicit calls of iio_triggered_buffer_postenable() > & iio_triggered_buffer_predisable() in all drivers, since the core handles > now the pollfunc attach/detach. > > The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's > not obvious that removing the hooks doesn't break anything** > ---------------------------------------------------------------------- > Looks good. > ** for the comment about 'at91-sama5d2_adc', we really do need to get some > testing; otherwise this risks breaking it. Agreed. > > > > > > Thanks, > > > > Jonathan > > > > > static const struct iio_trigger_ops atlas_interrupt_trigger_ops = { > > > diff --git a/drivers/iio/dummy/iio_simple_dummy_buffer.c > > > b/drivers/iio/dummy/iio_simple_dummy_buffer.c > > > index 17606eca42b4..8e13c53d4360 100644 > > > --- a/drivers/iio/dummy/iio_simple_dummy_buffer.c > > > +++ b/drivers/iio/dummy/iio_simple_dummy_buffer.c > > > @@ -99,20 +99,6 @@ static irqreturn_t iio_simple_dummy_trigger_h(int > > > irq, void *p) > > > } > > > > > > static const struct iio_buffer_setup_ops > > > iio_simple_dummy_buffer_setup_ops = { > > > - /* > > > - * iio_triggered_buffer_postenable: > > > - * Generic function that simply attaches the pollfunc to the > > > trigger. > > > - * Replace this to mess with hardware state before we attach the > > > - * trigger. > > > - */ > > > - .postenable = &iio_triggered_buffer_postenable, > > > - /* > > > - * iio_triggered_buffer_predisable: > > > - * Generic function that simple detaches the pollfunc from the > > > trigger. > > > - * Replace this to put hardware state back again after the trigger > > > is > > > - * detached but before userspace knows we have disabled the ring. > > > - */ > > > - .predisable = &iio_triggered_buffer_predisable, > > > }; > > > > > Hmm. Guess we should probably 'invent' a reason to illustrate the bufer > > ops in the dummy example. Anyone feeling creative? > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel