Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2134152pxp; Mon, 21 Mar 2022 12:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+sX4SVGiMTlxcN6BtD9uKCiYjg7tAGdfjIlumqyLTH94+hD7w4grJAGtiM4Ftelaj/Q5A X-Received: by 2002:a17:906:a152:b0:6cd:3098:18c9 with SMTP id bu18-20020a170906a15200b006cd309818c9mr22928287ejb.422.1647889600117; Mon, 21 Mar 2022 12:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647889600; cv=none; d=google.com; s=arc-20160816; b=duI6X/nJtJUU8cVsKR+KvLBJl4UNRHlVB+3uO6Iiq9LuulNfGIUQSxa6LinJ8rRkkU xJRQ2+OBK3/LOxgEH9EMHD328gqDkh5EZP2BerlBdJa3VkhpO8XV0XpQzusD4pILSQmH MkY240tLUaPIdyJWEplc0fSmezDPgJBvwTXS/WZiT3PfLHva22ShjMD2aK4STI5WKTcv lnd0OKlYpSs9t8w1PI1Fuc2h8qNQbeX662ToO55SnZQimZjvZw6hLy+4Dv4TvnQIL45x 1V2Bfxy7oZzWpST6okR5UKW4W32LtNBbiRA+jVvk5qZ80088TyDFYK3ycr+wPvTQiJPf Fzdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0T1DFi3YvaPuxckua7QaVBMphJ9LBbQAkY4vD+4O8Hw=; b=R/llvEZyCRiuQIZWF2PvQb+clzNp4LREZcPChJ5J9O01SlP3pbOagEVfcWV5yGAnwB hMUwzZfyerNG3TOXPrCJomF+IuD3EttVtqTQ6pUZrtTB6MbYNDmYm2yaHNRIi/MzcOKJ 164tpEV1FuHcQ+XJyDXWRdSgYL9EXtCndV2AManXogjTpkguF/0PWfWKKssbVudDCyoh vUatO9qr1IATa3v8S8oJNR68VDzlPGO96je8AVKe74FDZRE6EhRQIF5aVp/PhuWRndi4 cVPCu3GXBKJW66ayGCIkpZNyqur6tMslWgYQ1ALrc7q+FTkLseI5x869pITw+kj3u10e 3tIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XF6Mx1WG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a17090670ca00b006df76385e90si7282198ejk.816.2022.03.21.12.06.08; Mon, 21 Mar 2022 12:06:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XF6Mx1WG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1345351AbiCUImB (ORCPT + 99 others); Mon, 21 Mar 2022 04:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244556AbiCUIl7 (ORCPT ); Mon, 21 Mar 2022 04:41:59 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CC60A0BD9; Mon, 21 Mar 2022 01:40:34 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id qx21so28228719ejb.13; Mon, 21 Mar 2022 01:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0T1DFi3YvaPuxckua7QaVBMphJ9LBbQAkY4vD+4O8Hw=; b=XF6Mx1WGGfI49hR3SkziNiVObmVgNdDc6gvs/6Mk6RaZeRNCIJI0k/It0NC88nTx7K T9YfkicpaEim0L6LwOxlNArBqVAp72YuaThUQXnzCiQcnRBEbfNtAyc4RTORJ9dZhNr5 DTHB4iMzYJt4P6O/5k+pdSlKlKGz9iqx0alZifrF7WJmuO5RHI1sFZvqp+GDrKVdN1CT u6pM/ePd15wl/hZ3tf6kA4OrBqrE6RZikjaFvsMZdJ85T9/Qv/Yz4KO7NkbDCaRzQXSs 2RG1IxspOBuZIxHa+p5kCGGXGYxj257TfN96kB97PTke9N7ra0bWCkzQ2ahsJ9RVaVJ4 KQJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0T1DFi3YvaPuxckua7QaVBMphJ9LBbQAkY4vD+4O8Hw=; b=nSCgY08yKaaK6X5ZeWPg8tvT/vBSoZEZbIm+W8wLdKlF7OQyjBP2INQwN5NJZQBYKx E1Sq03es2ztFFGJUS1ce2gVxl86WjuoXzHtc4ivh5VTLP4sHytSo8neIchmHCBV83DVr LAzkZrS0h5JdKXG07r+PjTy8IvhsBxYcmKUs6c1CnX/Hzm6UOU9xGoaFtaBYb5vOKpgx Y7cM6La6rFMhG1Y6EMeehet69mG3QoXy3HTuU8HIb6Z6eHG3UeJ6s8xiOaKrUd4EwSVx w7rL/InREpI9ywFnHxLIMqozfx5ZA+mBxTmLiXqE7MrZUsqOG5wjU9NTqfnrhxjCKuu/ 2Q7w== X-Gm-Message-State: AOAM530Kvk9sv5+Uxt+Gls/UglORNlLUYaLDqXcG86hrqatpZvxGRz1W lB+O7wyU8aUZ0NwVeY8CSNfCSp0dNzzpQvn0rqL0/JxdALc= X-Received: by 2002:a17:907:628e:b0:6d9:c6fa:6168 with SMTP id nd14-20020a170907628e00b006d9c6fa6168mr19815300ejc.132.1647852032784; Mon, 21 Mar 2022 01:40:32 -0700 (PDT) MIME-Version: 1.0 References: <20220319181023.8090-1-jagathjog1996@gmail.com> <20220319181023.8090-4-jagathjog1996@gmail.com> In-Reply-To: <20220319181023.8090-4-jagathjog1996@gmail.com> From: Andy Shevchenko Date: Mon, 21 Mar 2022 10:39:22 +0200 Message-ID: Subject: Re: [PATCH v1 3/5] iio: accel: bma400: Add triggered buffer support To: Jagath Jog J Cc: Dan Robertson , Jonathan Cameron , linux-iio , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 19, 2022 at 8:10 PM Jagath Jog J wrote: > > Added trigger buffer support to read continuous acceleration > data from device with data ready interrupt which is mapped > to INT1 pin. ... > #include > #include > #include > +#include > +#include It would be nice to keep the above in order. > +#include > +#include > +#include > +#include These ones, possibly including iio headers from the above piece, are good to be grouped together here with a blank line in between the above part and iio/*. ... > +static const unsigned long bma400_avail_scan_masks[] = { > + GENMASK(3, 0), > + 0, No need to have a comma in terminator entry. > +}; ... > + ret = regmap_bulk_read(data->regmap, BMA400_X_AXIS_LSB_REG, > + &data->buffer.buff, 3 * sizeof(__be16)); sizeof(buff) ... > +out: A useless label. Moreover this raises a question: why is it okay to always mark IRQ as handled? > + return IRQ_HANDLED; ... > + dev_err(dev, "iio trigger register failed\n"); > + return ret; return dev_err_probe(); ... > + dev_err(dev, "request irq %d failed\n", irq); > + return ret; Ditto. ... > + dev_err(dev, "iio triggered buffer setup failed\n"); > + return ret; Ditto. -- With Best Regards, Andy Shevchenko