From patchwork Wed Dec 12 00:55:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Fertic X-Patchwork-Id: 10725407 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 1CD94112E for ; Wed, 12 Dec 2018 00:56:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D76629FF0 for ; Wed, 12 Dec 2018 00:56:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 019932A17B; Wed, 12 Dec 2018 00:56:26 +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 9B85029FF0 for ; Wed, 12 Dec 2018 00:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726241AbeLLA4T (ORCPT ); Tue, 11 Dec 2018 19:56:19 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:46409 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726371AbeLLAzw (ORCPT ); Tue, 11 Dec 2018 19:55:52 -0500 Received: by mail-io1-f68.google.com with SMTP id v10so13427388ios.13; Tue, 11 Dec 2018 16:55:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JuTVzGlrd5P62PmG1C4j7pV1yedB7ZGV8yxuvoLTCUk=; b=nE9dzQCJntmbkZDYcuB0f+5CpI3dPJBVZLHrbsFI98fR9TAsoFsDQCEFQ1B7X4Co8S tecCA7jCXf/g7ddZOc+7TINyGNGhadYfqtBSdnYy7yx46RgqSZkdU4h+NUq5TbDvrfOp DUHqDMzxmZ/CuxIuynSpPmAB4XauAfGojrWAKcvXUTNUIOrbYb8ix+6rCsK2idISqqmG igJnceluGbxVNu4pl+p4x5IVuwWhDcz91DSOR6FKr9E4FrgDwJsW4+xYdR7vwr4hh3yO Q2km4flG5IWkAde0zyDZ1udb5qbfcBHlQ1AtXTcyA7NFbEuRgm81DfrFEplqMPw6s4FY Gamw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JuTVzGlrd5P62PmG1C4j7pV1yedB7ZGV8yxuvoLTCUk=; b=rutHdwu3r6ujBN85h+U423S3Bj2o4Vh1hZukcczUV2tCbisJRw3BeYHaOKieapK+Vc XoOSSxAjV7Fz4vsNx0HmI6qRNAfpzE5dS0O/J7/JEMqCtTL7yp38pPoj2PYJI8NQieIf /yltLgKCLeGTodhXFifwcfx+EcCE5PWh+tf8IR3fAM4BYVoUGs2n09964hioxg13F3w2 kzSNlK6XM39zqLOkgLXywArMxawOQZzffvv/mQN1zkZJcLcb9WiEUewfM+/L9SEADUHF vjo7fRWokC2etfS7nutzRAXqVGxa2NMzscPJYJnIClRpyTZg7DE24NlQbYdsmKZlL5t+ 1gUQ== X-Gm-Message-State: AA+aEWZpQ70VAL/XHlvUP8meOKV6PGs0My4PUWvqiBgKPv0bH8wNkde3 2DdynD9M/Z7M3PgyaeFFzAM= X-Google-Smtp-Source: AFSGD/XNg3HpCB72+QnrSv2pJhuwVhhGx9pLoGBz42yt8vFDigh25JESqZx8dWegswa6y605546pTA== X-Received: by 2002:a5e:8f09:: with SMTP id c9mr2173301iok.241.1544576151886; Tue, 11 Dec 2018 16:55:51 -0800 (PST) Received: from r2700x.localdomain (c-75-70-96-103.hsd1.co.comcast.net. [75.70.96.103]) by smtp.gmail.com with ESMTPSA id l186sm1952445itl.22.2018.12.11.16.55.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 16:55:51 -0800 (PST) From: Jeremy Fertic To: Jonathan Cameron Cc: Lars-Peter Clausen , Michael Hennerich , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jeremy Fertic Subject: [PATCH 09/11] staging: iio: adt7316: remove dac vref buffer bypass from adt751x Date: Tue, 11 Dec 2018 17:55:01 -0700 Message-Id: <20181212005503.28054-10-jeremyfertic@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181212005503.28054-1-jeremyfertic@gmail.com> References: <20181212005503.28054-1-jeremyfertic@gmail.com> MIME-Version: 1.0 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 The option to allow the external vref to bypass the reference buffer is only available for adt7316/7/8. Remove the attributes for adt751x as well as the chip->id checks from the show and store functions. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 3348fdf08f2e..bca599d8c51c 100644 --- a/drivers/staging/iio/addac/adt7316.c +++ b/drivers/staging/iio/addac/adt7316.c @@ -964,9 +964,6 @@ static ssize_t adt7316_show_DA_AB_Vref_bypass(struct device *dev, struct iio_dev *dev_info = dev_to_iio_dev(dev); struct adt7316_chip_info *chip = iio_priv(dev_info); - if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) - return -EPERM; - return sprintf(buf, "%d\n", !!(chip->dac_config & ADT7316_VREF_BYPASS_DAC_AB)); } @@ -981,9 +978,6 @@ static ssize_t adt7316_store_DA_AB_Vref_bypass(struct device *dev, u8 dac_config; int ret; - if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) - return -EPERM; - dac_config = chip->dac_config & (~ADT7316_VREF_BYPASS_DAC_AB); if (buf[0] == '1') dac_config |= ADT7316_VREF_BYPASS_DAC_AB; @@ -1009,9 +1003,6 @@ static ssize_t adt7316_show_DA_CD_Vref_bypass(struct device *dev, struct iio_dev *dev_info = dev_to_iio_dev(dev); struct adt7316_chip_info *chip = iio_priv(dev_info); - if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) - return -EPERM; - return sprintf(buf, "%d\n", !!(chip->dac_config & ADT7316_VREF_BYPASS_DAC_CD)); } @@ -1026,9 +1017,6 @@ static ssize_t adt7316_store_DA_CD_Vref_bypass(struct device *dev, u8 dac_config; int ret; - if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) - return -EPERM; - dac_config = chip->dac_config & (~ADT7316_VREF_BYPASS_DAC_CD); if (buf[0] == '1') dac_config |= ADT7316_VREF_BYPASS_DAC_CD; @@ -1713,8 +1701,6 @@ static struct attribute *adt7516_attributes[] = { &iio_dev_attr_DAC_update_mode.dev_attr.attr, &iio_dev_attr_all_DAC_update_modes.dev_attr.attr, &iio_dev_attr_update_DAC.dev_attr.attr, - &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr, - &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr, &iio_dev_attr_DAC_internal_Vref.dev_attr.attr, &iio_dev_attr_VDD.dev_attr.attr, &iio_dev_attr_in_temp.dev_attr.attr,