Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1286414imu; Fri, 9 Nov 2018 14:02:06 -0800 (PST) X-Google-Smtp-Source: AJdET5fiBZIjAi3LZqk30+g9XlfHTXYZt6Oc+eavHWSQw0ZNtMVBIeCPRNsrStzfE+ncj2Foi9o3 X-Received: by 2002:a62:e0dd:: with SMTP id d90-v6mr10454543pfm.214.1541800926120; Fri, 09 Nov 2018 14:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541800926; cv=none; d=google.com; s=arc-20160816; b=QScV2fro/mrcg9hxT9m+quxqPWWRsCh29cFTYUccCzOro4vJtaDL6sMSEtlKrYDfEX pD03qlmeEhwliGgWW5YciVlxY5O9UCv/uFSyXLVAavjaveJ+3hqWABSbnx9J4Fa2i9ze YvIvLabbFS8sAtBhWh5Oh/0rUtbytEy9J9g0fsXCQII1mcgRjwLjaiMPdzsHEiyyPton DXE6OaTBHSBCjtkJqgAnKuI0mBL4nKfie6sWH+Pxgkk0m6gLO2aWf+rvR4sYb9qnPjO8 ZecZvpmEVmFhmRDTgrK3s6zG9IIqW7edcciLIn8oRcG4MK6182cFguK2le8VFdPUyLnn /tZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=PypJCBItqAHhZtAV1pEt8q1mShtNp5yrZpvXlh8zIpA=; b=yVI+UKsnmW8k06mrS5+h0DJ+mDvr1EBQCFJw1uGfxgF+j76vBgnwwB15vNy8b5MP/v jzYoKhSJPCFGdcj8BmNK1rM8yTvn+wMcckq8mlwsHZ8EZTHRl5n/xMOJQ9Oubp3Iw+zi dr7CeRPjkMKZrq+EckrWulEXqqkqCV6GG9XmXRq7Es40UvDRvGgqtGpJdiafz0yCf9zq sx+hOPP2ZriEcvVicoXR//1dmZoKCUFLvvzXaztfur4xcxXLrl0yAfdf5MY7eI1yrXLi S3E70kiyD8K4y1O7xZvZps1h/MQnqIkPY95ObiGEJP8qwjLqr5Q44Og1esvO3be8cptB DEkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@usp-br.20150623.gappssmtp.com header.s=20150623 header.b=n8ECNe8X; 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=fail (p=NONE sp=NONE dis=NONE) header.from=usp.br Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f38si7693385pgf.206.2018.11.09.14.01.50; Fri, 09 Nov 2018 14:02:06 -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=@usp-br.20150623.gappssmtp.com header.s=20150623 header.b=n8ECNe8X; 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=fail (p=NONE sp=NONE dis=NONE) header.from=usp.br Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728514AbeKJHnv (ORCPT + 99 others); Sat, 10 Nov 2018 02:43:51 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:46640 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728490AbeKJHnv (ORCPT ); Sat, 10 Nov 2018 02:43:51 -0500 Received: by mail-qk1-f195.google.com with SMTP id q1so4345693qkf.13 for ; Fri, 09 Nov 2018 14:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usp-br.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PypJCBItqAHhZtAV1pEt8q1mShtNp5yrZpvXlh8zIpA=; b=n8ECNe8XttM1lMFHrmoGegTYTbaS/vHXlJjOm1fEylbHqjTWqs2UwCRP7hLlqVsTGL XWvdnmUkTSSk/atBSubz482ZwKky/kKjn3LK75TPs2cnx7OrMd8R5akuNKs7sSxKa2Eg I6I6YZz1Eff1YYCq2A6INCqQbMg4siz2lOT1qwwa2w0AbhkoP9BQ3ihF5w/fYucmdw+i 2SISTRl6myfUHjG/0I9fAt8ip2A+QNPo1UNerhShDrbXuu/icrK+F7y6wM+Zw4afMEa2 LjLt/7JvvEdjZrmqtQpKk4jdfjTZguwBlPE6vqWu2UcySAyv9uSlyCNWVReLuYKFkhpZ vYWA== 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; bh=PypJCBItqAHhZtAV1pEt8q1mShtNp5yrZpvXlh8zIpA=; b=dXW8h8PfN9swfdBPmCNcAhTHe6oEISHgzyD7WK6AbNPMsOqxV8MBiJQO2Hd6jI6KDs 8JXM9/SB0YlBUT585gwDvFcyzohXY8T8RvqFPqfxzEnNm1gL4Jv/RwbcTIqNbgYHSP1d wvQ/pPCEShZpNcofF15Q1OfKjgCefOV8YjZULPvkSBP3nqHcU2jDVMdQH5AQ4H8fXwIr 7CRGSiUGKfnTWkcFYyN27H85F1jj3/KMW0TbE+Uu6kFPc9nj65KTVz1HjRhgI+PsQ0eG pMEuSFnaFBPmrekTWF+jxeJnuxXOzo8A0MozuZxcYwtNSw6Vtdd030TSNOMODUHwO8iu zo6Q== X-Gm-Message-State: AGRZ1gJTpEM5WzFlyW8OJG13UAeKAL1L7xiS8XQpAJVJe33z3Oa6hmB6 c++RaVbpCuCCKSB5aMZ0UgO5Lg== X-Received: by 2002:aed:384a:: with SMTP id j68mr10289681qte.171.1541800880829; Fri, 09 Nov 2018 14:01:20 -0800 (PST) Received: from mango.spo.virtua.com.br ([2804:14c:81:942d::1]) by smtp.gmail.com with ESMTPSA id k6sm6082723qtk.41.2018.11.09.14.01.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 14:01:20 -0800 (PST) From: Matheus Tavares To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandru Ardelean , kernel-usp@googlegroups.com, victorcolombo@gmail.com Subject: [PATCH 2/6] staging:iio:ad2s90: Remove spi setup that should be done via dt Date: Fri, 9 Nov 2018 20:00:40 -0200 Message-Id: <20181109220044.24843-3-matheus.bernardino@usp.br> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181109220044.24843-1-matheus.bernardino@usp.br> References: <20181109220044.24843-1-matheus.bernardino@usp.br> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ad2s90 driver currently sets some spi settings (max_speed_hz and mode) at ad2s90_probe. This should, instead, be handled via device tree. This patch removes these configurations from the probe function. Note: The way in which the mentioned spi settings need to be specified on the ad2s90's node of a device tree will be documented in the future patch "dt-bindings:iio:resolver: Add docs for ad2s90". Signed-off-by: Matheus Tavares --- drivers/staging/iio/resolver/ad2s90.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/iio/resolver/ad2s90.c b/drivers/staging/iio/resolver/ad2s90.c index ff32ca76ca00..95c118c48400 100644 --- a/drivers/staging/iio/resolver/ad2s90.c +++ b/drivers/staging/iio/resolver/ad2s90.c @@ -77,7 +77,6 @@ static int ad2s90_probe(struct spi_device *spi) { struct iio_dev *indio_dev; struct ad2s90_state *st; - int ret; indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); if (!indio_dev) @@ -94,16 +93,6 @@ static int ad2s90_probe(struct spi_device *spi) indio_dev->num_channels = 1; indio_dev->name = spi_get_device_id(spi)->name; - /* need 600ns between CS and the first falling edge of SCLK */ - spi->max_speed_hz = 830000; - spi->mode = SPI_MODE_3; - ret = spi_setup(spi); - - if (ret < 0) { - dev_err(&spi->dev, "spi_setup failed!\n"); - return ret; - } - return devm_iio_device_register(indio_dev->dev.parent, indio_dev); } -- 2.18.0