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=-5.5 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no 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 2914DC433E6 for ; Sat, 6 Mar 2021 17:35:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC68164FCF for ; Sat, 6 Mar 2021 17:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231204AbhCFRfH convert rfc822-to-8bit (ORCPT ); Sat, 6 Mar 2021 12:35:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:59650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbhCFRey (ORCPT ); Sat, 6 Mar 2021 12:34:54 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 06F7664FCF; Sat, 6 Mar 2021 17:34:52 +0000 (UTC) Date: Sat, 6 Mar 2021 17:34:49 +0000 From: Jonathan Cameron To: "Hennerich, Michael" Cc: "zzzzArdelean, zzzzAlexandru" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" , "lars@metafoo.de" , "Sa, Nuno" , "Bogdan, Dragos" Subject: Re: [PATCH v3 0/6] iio: Add output buffer support Message-ID: <20210306173449.06f2f32b@archlinux> In-Reply-To: References: <20210219124012.92897-1-alexandru.ardelean@analog.com> <20210221120106.00ae1078@archlinux> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Mar 2021 08:57:08 +0000 "Hennerich, Michael" wrote: > Hi Jonathan and others, > > With output/dac buffer support the semantics of the scan_element type may change. > > Today the Format is [be|le]:[s|u]bits/storagebitsXrepeat[>>shift]. > > While shift (if specified) is the shift that needs to be applied prior to masking out unused bits. > > So far so good and it sounds universal. > > However, we use the right shift (operator) for that, which makes sense for capture devices. > For output devices the more logical operator would be the left shift. > > I'm not proposing a new Format here. I just want to get some agreement that for an output device > > le:s12/16>>4 > > is understood as a left shift of 4, since the unused bits are then on the LSB. Good question. Guess I wasn't thinking ahead when I came up with that :) I'm not sure I'd mind if we did decide to define a new format for output buffers. Feels like it should be easy to do. What do others think? Jonathan > > Thoughts? > > Best Regards, > Michael > > Analog Devices GmbH > Michael Hennerich                       > Otl-Aicher Strasse 60-64 > D-80807 Muenchen; Germany > > Sitz der Gesellschaft München, Registergericht München HRB 40368, > Geschäftsführer: Stefan Steyerl, Michael Paul Sondel, Yoon Ah Oh > >