Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1717608imu; Wed, 12 Dec 2018 03:08:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/WO07CcHLyFsut10LNAYi6Q9zJjCV39khUn2jKSyVwCSMOP31bQp7GCDZEE3c1g8gdhOGrh X-Received: by 2002:a17:902:d01:: with SMTP id 1mr19794561plu.127.1544612909429; Wed, 12 Dec 2018 03:08:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544612909; cv=none; d=google.com; s=arc-20160816; b=LoNzfRcuuCJlGDFsNn/TWNBVnO3hxnvp35JxeiVnu4LS6LWC9kNzL8r5+hBHZOC3NC q67C5Yb2Pc8e161OResr17K+IOEceQVIjgQKZamzRNXtx2e5bklphhrdUDcpJTGiUqWr hOHLTx2MZxnMu7Q/4pEl+elwS+ZdHhbSTN0lpxDrKSXMUrH7el+qmhXgokluIn8l/bbL QdVXPF6zBTc3wWCfuyJILeoAqZm0ThA7UK3suFpY3DTBUFqr1Bdlveu5OJNHySlKKGaL 5vUUBUTNcSZ2nRpUPeYJwiVshuxLLBuYIBfoLqeXSoo+ztkR52YiPHOAtaOuBvZXO733 yrAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=7aJDD8TGN/fajIp23PAPMcsCpp9JApF5z5qhWoInSxQ=; b=u42Z+NxwB8uzYBZNeI5VjTgsGAtpcZHcyxF7Dga2+lfNOeGZMWrjPa9QKNLqbrmAvj qXgQJPuTlUqNN77JKDjkNhi4x1PX7DkkVapO/YA/bye2w87tZ/RBoXcAy6Q3B0J546xd lA6WuASsXEowrTZ/dpbQMx11Ak+dPpud+gPkCXVanthwtwMfzosExXHu+s4qELRBNz15 egB/Q5b2KNyWgQHMGehRx/gcUztr1Z8+5nvI2Og/iB2A7C0ZPqRnmx7cnAquYhnEWc6T fzUFj5rG9m4xwkcWiYPymNpOj+2Cw2dlS9Oxo3AP/1pMpO38UAf91xFKgUWuhB96oCOx iQDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 72si14924910plb.224.2018.12.12.03.08.14; Wed, 12 Dec 2018 03:08:29 -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; 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 S1727088AbeLLLFk convert rfc822-to-8bit (ORCPT + 99 others); Wed, 12 Dec 2018 06:05:40 -0500 Received: from saturn.retrosnub.co.uk ([46.235.226.198]:42360 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbeLLLFj (ORCPT ); Wed, 12 Dec 2018 06:05:39 -0500 Received: from [10.202.226.243] (unknown [185.176.76.27]) by saturn.retrosnub.co.uk (Postfix; Retrosnub mail submission) with ESMTPSA id EB43C9E74BE; Wed, 12 Dec 2018 11:05:36 +0000 (GMT) Date: Wed, 12 Dec 2018 11:05:26 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <20181212083132.GJ3116@kadam> References: <20181212005503.28054-1-jeremyfertic@gmail.com> <20181212005503.28054-11-jeremyfertic@gmail.com> <20181212083132.GJ3116@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 10/11] staging: iio: adt7316: change interpretation of write to dac update mode To: Dan Carpenter , Jeremy Fertic CC: Jonathan Cameron , devel@driverdev.osuosl.org, Lars-Peter Clausen , Michael Hennerich , linux-iio@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Peter Meerwald-Stadler , Hartmut Knaack From: Jonathan Cameron Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12 December 2018 08:31:32 GMT, Dan Carpenter wrote: >On Tue, Dec 11, 2018 at 05:55:02PM -0700, Jeremy Fertic wrote: >> Based on the output of adt7316_show_all_DAC_update_modes() and >> adt7316_show_DAC_update_mode(), adt7316_store_DAC_update_mode() >should >> expect the user to enter an integer input from 0 to 3. The user input >is >> currently expected to account for the actual bit positions in the >register. >> For example, choosing option 3 would require a write of 0x30 >(actually 48 >> since it expects base 10). To address this inconsistency, create a >shift >> macro to be used in the valid input check as well as the calculation >for >> the register write. >> >> Signed-off-by: Jeremy Fertic >> --- >> I'm not sure if this patch is appropriate since it's making a user >visible >> change. I've included it since the driver is still in staging. > >We don't want to break user space, but I agree with you that applying >this patch is probably the right thing. > >regards, >dan carpenter This driver breaks the standard abi in loads of ways. It is going to change userspace interface a lot before it is ready to move out of staging. That includes this particular interface almost certainly being completely replaced. Hence good to move towards something sensible. Don't worry at all about userapace ABI breaks in this one! Jonathan -- Sent from my Android device with K-9 Mail. Please excuse my brevity.