Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2428206imb; Mon, 4 Mar 2019 05:04:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwyeNuMFdKcFL7/VU5WH0EQKpiHHJ68CQlcBfQwma+XJiyDWTH8+Y840woCMkqHgqD3C/x+ X-Received: by 2002:a17:902:9307:: with SMTP id bc7mr20104567plb.234.1551704686502; Mon, 04 Mar 2019 05:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551704686; cv=none; d=google.com; s=arc-20160816; b=WJ5PMjtPh9nhqjdKGcWF23o0hIap/dWYnwyzZbqo2M5DaGa6LlCSIUrHoIp0IjtjKy MACWwPZYw0KxflomxAZwmf9UuMX7oOpa60kbzMCpWZku0+ayZDAwEtWboBABpKV/byJm 6OB/PkXNsyRqettwZYjMOy5+pk/CHKWlyBEwj6LrJrVEgUJyTy19M6oiqX7KH0I8WmYr Aw3Diyg8Bg2QfCoI2iWcU6kKipaQCjVzsU8DAYLJLmDXA+mmaKU/ipw/0PBUfPtS6yTY gbGW2QBIpkC+OmfG7hBSdKNThXBtANo6FSJyZAslv/en5gQqNU9tolMtvoWM5dIpcflL 0isg== 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=Ob8hWZ0HmNwlTXJo/mYlu29SYMoP0D3tHnTBPnurEpc=; b=B5LUZqlfS5sYMr6wzIjBluhNQ2v2HP903xOQqEwFm7Ne8f5rFGcS71ecWNbxXY+JAu zJPiXY0CEnvV+aNN4TJ+7Z06iv8tsGFGIURpJQXsaBefOAcOgfbL+qPUBH5u4R8FX0U+ i5gzjpxjohOLb4HN7Mwq0OCiIS1SFtDfYM2iGesJGxQpqPYI0bh9It8u1GxXOfjlSD9a vZlukpWC3TpzDulWkEcTjlyCNjhRO3Qvvp54mMNua+Lbu8ybTMOI5YWmc7jfMnv2kGxX u0Pior4M5v/217wTzk7/N1WcnoVyfB6weaGPPgOgaLX9R8RAxHwvHTU1+nwv2DXf++2j F4Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@essensium-com.20150623.gappssmtp.com header.s=20150623 header.b=smRGyYhe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si5585027pfc.39.2019.03.04.05.04.30; Mon, 04 Mar 2019 05:04:46 -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=@essensium-com.20150623.gappssmtp.com header.s=20150623 header.b=smRGyYhe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbfCDMgs (ORCPT + 99 others); Mon, 4 Mar 2019 07:36:48 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:34615 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfCDMgr (ORCPT ); Mon, 4 Mar 2019 07:36:47 -0500 Received: by mail-yw1-f65.google.com with SMTP id u205so3940187ywe.1 for ; Mon, 04 Mar 2019 04:36:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=essensium-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ob8hWZ0HmNwlTXJo/mYlu29SYMoP0D3tHnTBPnurEpc=; b=smRGyYheoWgrKBxK4FySqe7WvjpakYuVvISB7ltoRJLyCeitME4JA6Qumxa88B+pn3 3nMM8Q3/KPrMQYpvcRbdPs2YqnadxOaHZYg2T/22WWiYGqVVsTN3pU76f0jDMIryPuHB I0gK0YdNvRO5lIhsF/5go4P5ER6AYkEFyz4b4ULzr8JnJ9TAkmjy/J8lzVBsWlvvXjKh HKGUt8hpBqB6Rldtz37WT9w2332qf7UlJjhqOQECmuRdq3b/F9cJ9nJ53MpMtnABxLTq INCm+C+cD6ogS8xeEsPy11CGnWCU0qXNSzCuMQTsGu2SFwRPlmKOu/KKzgnjt0id3KNF i/2A== 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=Ob8hWZ0HmNwlTXJo/mYlu29SYMoP0D3tHnTBPnurEpc=; b=JeNrzZ04/oSWgWpLJAxFR7ygCnoa2/ekkqCvbDC+Im7yq+20j15ZEVXIlxkuuYCIwt lbywL4jkYmlua5HR2XWgrcWsXW2DzYGAXR0gAj9idZM/eJDZ/Fv2q1bXyoR1/DtTgVPG iYxLt0Ika/MunR1urMNGD3PI5Zdxlqxr+HkC1strDg5bBsNgSDxM2pJomVYZpFhW3y5Z RQT5cjuG5DhQzyH16VxoMmDXWii04i2PykzBWhwE8/ketK9nmNDaqrYkuT7M2Y0L7jgl Z9k+KQeC6GcHXmFmQhyBZOfkmsa54tTVM1s8Q8ku5enoNZ6wRTxI5Dy1yxtG3OArjY7G gcJw== X-Gm-Message-State: APjAAAV6DUJAl0Yx7NRVc/lK9WraqxC4/DkQ8MnVmCxaBgfrINR5E2vB ozMcwYPjZfQBuct+wElJ8r9jP4Hh49IpZeKnMmYsKg== X-Received: by 2002:a5b:b4d:: with SMTP id b13mr15071149ybr.318.1551703006622; Mon, 04 Mar 2019 04:36:46 -0800 (PST) MIME-Version: 1.0 References: <20190218140321.19166-1-patrick.havelange@essensium.com> <20190218140321.19166-5-patrick.havelange@essensium.com> <20190220164154.00547a77@archlinux> In-Reply-To: <20190220164154.00547a77@archlinux> From: Patrick Havelange Date: Mon, 4 Mar 2019 13:36:34 +0100 Message-ID: Subject: Re: [PATCH 5/8] iio/counter: add FlexTimer Module Quadrature decoder counter driver To: Jonathan Cameron Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Shawn Guo , Li Yang , Daniel Lezcano , Thomas Gleixner , Thierry Reding , Esben Haabendal , William Breathitt Gray , Linus Walleij , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, linuxppc-dev@lists.ozlabs.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 On Wed, Feb 20, 2019 at 5:42 PM Jonathan Cameron wrote: [skipped] > > + > > +struct ftm_quaddec { > > + struct platform_device *pdev; > > + void __iomem *ftm_base; > > + bool big_endian; > > I'm curious. What is the benefit of running in big endian mode? It is based on the same behaviour as in drivers/clocksource/timer-fsl-ftm.c The FlexTimer itself on the board I'm testing it with is working in big endian mode, so this mode is required. > > +static ssize_t ftm_write_reset(struct iio_dev *indio_dev, > > + uintptr_t private, > > + struct iio_chan_spec const *chan, > > + const char *buf, size_t len) > > +{ > > + struct ftm_quaddec *ftm = iio_priv(indio_dev); > > + > > + /* Only "counter reset" is supported for now */ > > + if (!sysfs_streq(buf, "0")) { > > + dev_warn(&ftm->pdev->dev, "Reset only accepts '0'\n"); > > + return -EINVAL; > > Why not just make the channel attribute itself writeable given we are > setting it to 0? Good idea, I'll see if this can be applied in the new subsystem. [skipped] All other comments are Acked.