Received: by 10.213.65.68 with SMTP id h4csp1301407imn; Wed, 21 Mar 2018 07:31:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELsGmRkYdeePFYyv+zJ45UmKm3geJoWtci28zvsi5E0HVoNGVJ6EiJcqhSPaTKvURIgI+AyV X-Received: by 10.99.168.13 with SMTP id o13mr5861860pgf.198.1521642673399; Wed, 21 Mar 2018 07:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521642673; cv=none; d=google.com; s=arc-20160816; b=FtgFbyCqdBCUzhfFrfDvgBXluIg2M0KykCyr1y9zFzmcZWxPj2soLKEv0lh8KDPDQq XNaNWB3MC6OmSMPKsseB1fjc3gUL8xCBL1WyzybZweQxi1ExqO0k7G2UU2E07S1UiKXx QKedLavS7x6mX92rgo5qfv5XE0g/KB4AKv5o7HCx/mJKmRyYuSyeIeJ+zU0fJV7RkhwP s542bhbHAIZuJX8FVpFiYM0GRpl6KT+jZUUiB6AY+SycvbmurQ+cCuOl2f4G7fHIV/Xu MmV1zw7NPpyytTGQQ6eex9gjdwInsbs5u/tbvySS2PLK0EYWO2/57zsSr03gRrZWUJwP 19tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=4z7rWHfPDjv60BgJSJE+PLZLXX+gijr/XeTZxPleaVM=; b=ZEl5bPTL0uhU2NkzoDhW8ajRlK1zEeOI5Ex4SwUPt3wODvlOoappb62F/5eok45dRo RIjJBigsNmW3YMtjX6Ezu74QhTAE09SqE7oP74YRqlYMQ1GrQfW5RHKau/YA8vc4oZgX Qk95KS/fXRH7dsAL/GoAOgYAFLviT3CFJ+SStIVtE0iazsUwZo/t86n2ubyQt+aDEvm7 EGSsBAdsDtOqqIxc6TJz7gPuxPsG21Ryq711/MUoKDJ65Ea4PMTW6S3f6GqeItfvFHWZ 2W6aeckPGaPlcCDC4qfNGAl6dYpLurVAKB1Am8vl6oJHLeyifHNEt+sa/fzf9Rk3GW2E zBeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=L5xXUuHV; 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 n6si2853739pgc.801.2018.03.21.07.30.58; Wed, 21 Mar 2018 07:31:13 -0700 (PDT) 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=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=L5xXUuHV; 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 S1752169AbeCUO3q (ORCPT + 99 others); Wed, 21 Mar 2018 10:29:46 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:35552 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752107AbeCUO3n (ORCPT ); Wed, 21 Mar 2018 10:29:43 -0400 Received: by mail-qt0-f193.google.com with SMTP id s2so5429192qti.2 for ; Wed, 21 Mar 2018 07:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=4z7rWHfPDjv60BgJSJE+PLZLXX+gijr/XeTZxPleaVM=; b=L5xXUuHVAJjYFsiu7NrV5qrlGa/UYjgZ4mxt/2llUT4cBTw2iXycO0DGDOInyg711+ YxcLadX63zxfhdilYq3taQq7lktDRrynb6nkCf+Qy4EE5DSDJBReTxHLjBMbXqJ2BICi yz1Fzx4fT9sAFGNCpeQx5M8PEu3zZVq3FGjArfdtUT2k0u13A0DNxG5IOot1Ahv0BlMW WyBawSb7P0T758i75MjTwL9rKB4iaqMEPjUjFJYcVdhPz5TTvu9c0tDvEQU+Hq9tK/Ve FieFgJLdIETMFbi7lomELCAF+POvpqu1M+Afleiinr3wjOVz+h4E8lkrIOH5Ojfz2jEI UDYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=4z7rWHfPDjv60BgJSJE+PLZLXX+gijr/XeTZxPleaVM=; b=bkX/JhKo2pnVzMn2t/+U1mmL7J/NcaykkWiToW74Y6iU/hJdg1GCM30+tLpEzOoRYf pZnNbHhiTr56RAIeJeAasiiQEbZnYcKH7A8ne81eUlkt35QPPGsjlhFUSyDIxonTC4Lz /oKRp4yEWzD7Gd3r7cLAFgspHJOdgQksc5TFLIjJR+xbtgTHZMIotYgx1QPCfKMuuLOQ ms/40nKZzjnj9OE78S89leCbnh3ZaFo+hFOYh8jWN6fa/SUscSzSS2lO8lHLkqhICAkj PQSieDWDgPBshOrp9QwARt/dIzqmNHRwjjrK5QFp8JAlG4hNrSLQY8ivcZKnPkobAKD4 cpPQ== X-Gm-Message-State: AElRT7E6sveNgd/Ih6bmGoYNevNLod73LIbKClxH/vuaW93QEhZXP4Q6 MdX1mC7a7tNp4z7+CTdctsil+Q== X-Received: by 10.237.60.9 with SMTP id t9mr18846668qte.228.1521642583079; Wed, 21 Mar 2018 07:29:43 -0700 (PDT) Received: from localhost.localdomain ([190.210.56.45]) by smtp.gmail.com with ESMTPSA id g14sm3118592qtk.71.2018.03.21.07.29.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Mar 2018 07:29:42 -0700 (PDT) From: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, hernan@vanguardiasur.com.ar Subject: [PATCH 00/11] Move ad7746 out of staging Date: Wed, 21 Mar 2018 11:28:48 -0300 Message-Id: <1521642539-4845-1-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series aims to move the cdc ad7746 driver out of staging. I have some design questions though so I would introduce them here, along with a short description of each patch. *PATCH 0001 - Adjust arguments to match open parenthesis. There were a couple CHECKS that still remained, so I got rid of them. *PATCH 0002 - Fix multiple line dereference In this case, I opted for avoiding the multiple line derefence and having a 80+ characters line instead as I consider that it improves readability. I may be wrong though, so this patch could just be discarded. *PATCH 0003 - Reorder includes alphabetically *PATCH 0004 - Reorder variable declarations in an inverser-pyramid way *PATCH 0005 - Remove unused defines There were a few too many #defines that were not used at all, so I just removed them. I guess if someone plans on extending the drivers functionality they can be added again, but they were just wasting space as they were. Again, I could be wrong with this decision so this patch could just be discarded. *PATCH 0006 - Add dt-bindings This patch adds dt bindings by populating the old pdata struct. It supports both platform_data and dt-bindings but uses only one depending on CONFIG_OF. I chose this way to avoid modifying too much the code, and introduce no errors (or as few as I could), keeping the same functionality and maintaining support of the platform_data. *PATCH 0007 - Add remove() I added a remove function so I could test that the driver probed properly when compiled as a module with the new dt-bindings. *PATCH 0008 - Add comments to clarify some of the calculations I had to go through most of the datasheet to understand some of the math in the code, so I added comments where I saw fit. (Comments on the comments are welcome). *PATCH 0009 - Add devicetree bindings documentation Add documentation on the devicetree bindings, explaining the properties of it and describing a short example. *PATCH 0010 - Rename sysfs attrs to comply with the ABI Comments are welcome on this one. I shortened the names of the sysfs attrs to comply with the ABI: [Y]_calibbias_calibration -> [Y]_calibbias [Y]_calibscale_calibration -> [Y]_calibscale The device supports 2 ways of calibrating the gain (from the datasheet): 'The gain can be changed by executing a capacitance gain calibration mode, for which an external full-scale capacitance needs to be connected to the capacitance input, or by writing a user value to the capacitive gain register.' The same for the offset calibration: 'One method of adjusting the offset is to connect a zero-scale capacitance to the input and execute the capacitance offset calibration mode. The calibration sets the midpoint of the ±4.096 pF range (that is, Output Code 0x800000) to that zero-scale input. Another method would be to calculate and write the offset cali- bration register value, the LSB is value 31.25 aF (4.096 pF/2^17 ).' The driver only supports the first way in both cases, as it only writes the register that starts the calibration mode and doesn't allow the user to write anything on other registers. What I understand from the ABI is not so different when explaining calibbias and calibscale: 'Description: Hardware applied calibration {offset,scale factor} (assumed to fix production inaccuracies).' Maybe I'm missing something and the renaming is not good. I would be really grateful if someone could shed some light on this for me. *PATCH 0011 - Move cdc ad7746 driver out of staging to mainline iio Move the files, modify the proper Kconfigs and the documentation. That'd be all. Any feedback is welcome. I hope this gets out of staging :) Cheers, Hernán Hernán Gonzalez (11): staging: iio: ad7746: Adjust arguments to match open parenthesis staging: iio: ad7746: Fix multiple line dereference staging: iio: ad7746: Reorder includes alphabetically staging: iio: ad7746: Reorder variable declarations staging: iio: ad7746: Remove unused defines staging: iio: ad7746: Add dt-bindings staging: iio: ad7746: Add remove() staging: iio: ad7746: Add comments staging: iio: ad7746: Add devicetree bindings documentation staging: iio: ad7746: Rename sysfs attrs to comply with the ABI Move cdc ad7746 driver out of staging to mainline iio .../devicetree/bindings/iio/cdc/ad7746.txt | 32 ++++ drivers/iio/Kconfig | 1 + drivers/iio/cdc/Kconfig | 16 ++ drivers/{staging => }/iio/cdc/ad7746.c | 168 +++++++++++++++------ drivers/staging/iio/cdc/Kconfig | 10 -- .../staging => include/linux}/iio/cdc/ad7746.h | 9 -- 6 files changed, 168 insertions(+), 68 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/cdc/ad7746.txt create mode 100644 drivers/iio/cdc/Kconfig rename drivers/{staging => }/iio/cdc/ad7746.c (84%) rename {drivers/staging => include/linux}/iio/cdc/ad7746.h (70%) -- 2.7.4