From patchwork Sun Mar 10 17:47:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Schmitt X-Patchwork-Id: 10846393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2C241390 for ; Sun, 10 Mar 2019 17:47:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACD9C28C79 for ; Sun, 10 Mar 2019 17:47:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A060F28F78; Sun, 10 Mar 2019 17:47:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B18E28C79 for ; Sun, 10 Mar 2019 17:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726546AbfCJRrI (ORCPT ); Sun, 10 Mar 2019 13:47:08 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:38825 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbfCJRrI (ORCPT ); Sun, 10 Mar 2019 13:47:08 -0400 Received: by mail-qk1-f195.google.com with SMTP id z3so1436522qkf.5; Sun, 10 Mar 2019 10:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=biGbN1qZKcjEQifkIF3WDWR9XJQqnSG1Zf6I9cTOXp0=; b=tnKrfpKLESda8h7QeJDNIhF0qktGsiutkzE9u6NzPr3A7gskNc8g2w2NNkUjOEDTOV BySVbbzm2/jRNsb4niOLHDFxi1Vd7hZqRkqEQqNZcqrK+0PKlNlyagvXkv5iytcg0enF 9ZCq6shSrGm+DruBJspx+aHSOq31HavuwaU94pTctGjjVlEVEIrKEEm4Pt4XwZgJ260r AvUfmf0VXTBx7kobZJQoCC3yC09ZUFozKyUCPCUTAn27BkgzAdjDtIXndcRbFAH2rt3d b45HxoYAMzKhncl5u64aFvv0K33q8Riv07pHLXmq/xkpTftkBuYT78tRxz0pjzKTZgz2 iCFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=biGbN1qZKcjEQifkIF3WDWR9XJQqnSG1Zf6I9cTOXp0=; b=cl2rHQGmOHG/1jeNX3oKECqx1LK2gz8h9sZZluN8Sr2qMqjnrfwNJrdRRWzrGzdm+l cJoalucoSFGlsy2LLnQIyMAF+8iDo9VVwGhvBEgEXvYFTeJGrA+rV+/FMVcPwNw3t2fF OOSyLz+nN8LBJVA8xtd151a1IgGOvXrwR1aPWJhAvPPqIUaMcS9THRqpIFbYgDhu1y3f uBO5XLb1fNlaSldBMcqb6XMPfRy9EJ/RanrAHHiC0lTLK7Onl7LJn1XN4/8Ak5yaIfGz MJK8cj4juVmQpRHrw1rXp2LP/IgVrTRAmq5v9FkQTlV6BdRM46EoX6SeFKNauVzqBcaT jnmQ== X-Gm-Message-State: APjAAAWb3tulmHtMHkLjAUABXYTzZ4W3YO2HtdK1KvbKTMNKUCwdfIKN 5neKZWQt5bEaMwJnGr4Qz3w= X-Google-Smtp-Source: APXvYqxMXJ0pDgOKHaIH6ga5oK3sYevhKrt4rJYzyYa8CxP5qtZfepDxvyA810NKcuDXUQzVbu7o5A== X-Received: by 2002:a37:4f45:: with SMTP id d66mr21671668qkb.81.1552240026919; Sun, 10 Mar 2019 10:47:06 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id u13sm2285694qtb.2.2019.03.10.10.47.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 10 Mar 2019 10:47:06 -0700 (PDT) Date: Sun, 10 Mar 2019 14:47:02 -0300 From: Marcelo Schmitt To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com Subject: [PATCH v3 6/7] staging: iio: ad5933: change attributes' ABI call Message-ID: <20190310174702.fko4xwrw5pclw6kr@smtp.gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180716 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change device attributes to use more suitable ABI functions when setting and displaying AC output excitation voltage. It better complies with device hardware since these attributes are used to manage DDS peak-to-peak output voltage. Signed-off-by: Marcelo Schmitt --- drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c index d75bdfbf93de..314cb71b1b5a 100644 --- a/drivers/staging/iio/impedance-analyzer/ad5933.c +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c @@ -443,12 +443,12 @@ static ssize_t ad5933_store(struct device *dev, return ret ? ret : len; } -static IIO_DEVICE_ATTR(out_voltage0_scale, 0644, +static IIO_DEVICE_ATTR(out_altvoltage0_raw, 0644, ad5933_show, ad5933_store, AD5933_OUT_RANGE); -static IIO_DEVICE_ATTR(out_voltage0_scale_available, 0444, +static IIO_DEVICE_ATTR(out_altvoltage0_scale_available, 0444, ad5933_show, NULL, AD5933_OUT_RANGE_AVAIL); @@ -480,8 +480,8 @@ static IIO_DEVICE_ATTR(out_voltage0_settling_cycles, 0644, * don't create dedicated sysfs channel attributes for out0 and in0. */ static struct attribute *ad5933_attributes[] = { - &iio_dev_attr_out_voltage0_scale.dev_attr.attr, - &iio_dev_attr_out_voltage0_scale_available.dev_attr.attr, + &iio_dev_attr_out_altvoltage0_raw.dev_attr.attr, + &iio_dev_attr_out_altvoltage0_scale_available.dev_attr.attr, &iio_dev_attr_out_voltage0_freq_start.dev_attr.attr, &iio_dev_attr_out_voltage0_freq_increment.dev_attr.attr, &iio_dev_attr_out_voltage0_freq_points.dev_attr.attr,