Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1298243imu; Tue, 11 Dec 2018 16:57:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/VuVG8NzzavTyey99cVTL2z6qzYw8cyISDPvkf5MrKZ44b7EevLsqY00ZHc6r0iMBe9EV2i X-Received: by 2002:a63:1c61:: with SMTP id c33mr16210593pgm.354.1544576272523; Tue, 11 Dec 2018 16:57:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544576272; cv=none; d=google.com; s=arc-20160816; b=Y81zkUMlbbdiwyJPtq/x0Pox5jsypk8UUhBpIZYd6k5LjT16UkgKTuAFNWBBxjGYgt t91qoA6z5QPNbLSOqHiki5qeNg6DuIFrxGcv+TyqnCb6YpoSinxYHAJ7+Q9UgNOyumP/ nXkLCTgiQTPCWEx7FBGkaz+waePqZ44lVQzhVFq5lpY40nLWIsRUCk4tK1zuTzpvuTsn Qjgx7CNa6oJILYnk+CG69InZAc1yPt/9ATZ23Y1cUM80N4pdMe8ibjj0M2pS1N3neK0I /wbeY1C8q2kQHY4obyZTuWZQNS9HfGIsoF5OTfBjmO3Gb+Hup1A5eMr+hOk2YoOmjMF2 5GKw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JuTVzGlrd5P62PmG1C4j7pV1yedB7ZGV8yxuvoLTCUk=; b=JC2a5nvgIPVTdISNkow0dJPBvC/svJYN2+4rybO+Ylf2ELOYqGVsWIbGB05zF4G82A EP+4WV/7X9GngIM2TbvwMx+12jZjC/pcH44ATIeZHBcziUXQHrhaOM3njnQS0+oNTKTS X0Zd6/1D9+Kl3Rqrvclbz/4M+ebuH7aWG81ee3ubSaEJ4fHwPYTEIHXvx6oBy4340MTm Q9/xKHADH2el079LGJwiqZoLMqfbtFUrRI9YRGZvs+y3WKSVJgbsWO8IvA30uUCRw3xA Nv+nQQINysUOwaWD4EefuDKUXpYv9zpsvPGBXaSuMy+hn9L4gE6O6RPaXFM/6TiESIAT 8Ciw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nE9dzQCJ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si12470218pgj.399.2018.12.11.16.57.38; Tue, 11 Dec 2018 16:57:52 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nE9dzQCJ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726449AbeLLA4U (ORCPT + 99 others); Tue, 11 Dec 2018 19:56:20 -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-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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.19.1