From patchwork Thu Jun 25 20:21:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 191746 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1611833ecs; Thu, 25 Jun 2020 13:21:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+3ZO1eSpJQS17cUS2xJGP2LEDylBKyUhhgfr+4OD6AHNvH+uN/n90OQzouDWKK/ne4/ak X-Received: by 2002:a17:906:fc20:: with SMTP id ov32mr29258788ejb.531.1593116516898; Thu, 25 Jun 2020 13:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593116516; cv=none; d=google.com; s=arc-20160816; b=l5YPRGSgvuwmN7ig5L68a9Hv+T3hkdulCqrY38oy70PHDkag5TzMR01Ba0BFGYEP6U uLm9oZwqbgbstZIIfJ+qiFVNTPbVcRSr+OrciIC+OQF+BwYMHWIPzRMoidsJ7moIqmDV jL5VAOaJRLW3fpMbPsqi65mshhgBXjbv0ywdvVVLRh/iwcGRx6iMFsyzU8n+QQG6WXUg 7vF9m/POzQcXya8P3qF201+Yhi/DsSnZOLRIBSi3A+825hd/SCb9BdVfnfMvNVS70fVW mt37PrTlq0MoXtCjXSIHsq0OkDB1jtRs2ZygAI7Bn05uFv49oniaF2T9bZX9ibv87vvr Voew== 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:cc:to:from:dkim-signature; bh=xYgswlYnh711UyVZ0F4dAhoCaz6CsidBkei96d/K4MY=; b=TB/z48NDvieFd6AkXGJ93njMYz/hnLeKrW2fjJ8mqqDDOBtto/KcQE+TuNwMAunLvM cl291VpJM9Hcu4Q7gWuWcak7kWqo1KQsKSiCGnI8jSt9eVIRI7BiWlNmWqy/ekZ4mAre /2GHtCTVi6jpgl5JJT0m9bzbae1ftHvxSJ38GAXgy9oJZBpIudV+xnKI34Dinlk6VTZ4 oNzXxRUsWCzlWgr1MwtgLRgtpSgXvaR0hFPe+GEjDbnCaG7oeF8mc+xZuW5Bl6JgBOon AibYjW5MVX6Fc3mwCSgyLq6lxkBgyTvuAizP9NnGooqrRkqb0bWNpcsIvhrsLjGvD6K6 kS3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xs1T3V8s; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si15301942edy.556.2020.06.25.13.21.56; Thu, 25 Jun 2020 13:21:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xs1T3V8s; spf=pass (google.com: domain of linux-spi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407111AbgFYUV4 (ORCPT + 2 others); Thu, 25 Jun 2020 16:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405161AbgFYUVz (ORCPT ); Thu, 25 Jun 2020 16:21:55 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D4BEC08C5C1 for ; Thu, 25 Jun 2020 13:21:55 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id n24so7941142lji.10 for ; Thu, 25 Jun 2020 13:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xYgswlYnh711UyVZ0F4dAhoCaz6CsidBkei96d/K4MY=; b=Xs1T3V8sGiwF/LlWGTFa85fTIiVpqO9E3ymJ1M3v0oep/zoSkNYbzrMAqbWpdzLtEE jCliXdurNvqbWyOsmhmk4RBSu6oIEEFLh4pk/K/+rgrn6Rh5jS71KUTabYriiyrey6Ke gtVqMZ9LINSrCoUG4aoGjYPWoUDmkdgnU7b0rAUdz0R+bwOkCWDz0603+Q3c859Rg//H dYcuqexJUpeE4XqYWQwMDXD35zpcgUW8NpofGlhq2ZRYe3CLxNOmfJWNieGjWmu3mxVD e5ZwyXOzrtgJzXfmAqZmQECRGeQhqET9z5MnfYp6vku9/o5Y3ofo6KVoXjXWtNDWUesn ogQg== 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:mime-version :content-transfer-encoding; bh=xYgswlYnh711UyVZ0F4dAhoCaz6CsidBkei96d/K4MY=; b=UMzFrJIaW072tzgX1XB2a8oe3/kqdfroo9St6BTXD8J/plvLLW/bwmWBYhy/tQT8n7 rYL8Dsl2/J2njZUXIfO1UeRCoE2is9kUQEmZZMSbC5FrzhrfojQzbgK8pQk9k2E2m/eC 2DYVqpknRqecDnZdapDzuVgR+yqYwh6UgSBmnNc6KyPb4qCTKDXx6mP1lhOP9v/NH35L eTO0AkyWR75PrGl8S9dWe0Z9FBNd0QEiIcHdGQB9bN+XLqNw8zjexNVNYEPielw3TR2R JikUPA5dawibducWqzLMwIlAl3F98r/kTg7lwQMVfITCIvLQEsrfQXnZBLaQ20H7G4LT mptg== X-Gm-Message-State: AOAM531hRPDjvw0cXkT8qZSfEctUyM+jaDDXH5IOMmLWcJ/BmLZEgqgv NS+3KWgBzdXZliYOLC7OFIcnu5N4+Gk= X-Received: by 2002:a2e:3808:: with SMTP id f8mr17390178lja.165.1593116513249; Thu, 25 Jun 2020 13:21:53 -0700 (PDT) Received: from genomnajs.lan (c-d63ee155.152980-0-69706f6e6c79.bbcust.telenor.se. [85.225.62.214]) by smtp.gmail.com with ESMTPSA id t16sm4916822ljo.22.2020.06.25.13.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 13:21:52 -0700 (PDT) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: Linus Walleij , Hauke Mehrtens Subject: [PATCH] spi: lantiq-ssc: Convert to use GPIO descriptors Date: Thu, 25 Jun 2020 22:21:49 +0200 Message-Id: <20200625202149.209276-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This switches the Lantiq SSC driver over to use GPIO descriptor handling in the core. The driver was already utilizing the core to look up and request GPIOs from the device tree so this is a pretty small change just switching it over to use descriptors directly instead. Cc: Hauke Mehrtens Signed-off-by: Linus Walleij --- drivers/spi/spi-lantiq-ssc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.4 diff --git a/drivers/spi/spi-lantiq-ssc.c b/drivers/spi/spi-lantiq-ssc.c index 1fd7ee53d451..1cf650e25e31 100644 --- a/drivers/spi/spi-lantiq-ssc.c +++ b/drivers/spi/spi-lantiq-ssc.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -391,7 +390,7 @@ static int lantiq_ssc_setup(struct spi_device *spidev) u32 gpocon; /* GPIOs are used for CS */ - if (gpio_is_valid(spidev->cs_gpio)) + if (spidev->cs_gpiod) return 0; dev_dbg(spi->dev, "using internal chipselect %u\n", cs); @@ -888,6 +887,7 @@ static int lantiq_ssc_probe(struct platform_device *pdev) master->dev.of_node = pdev->dev.of_node; master->num_chipselect = num_cs; + master->use_gpio_descriptors = true; master->setup = lantiq_ssc_setup; master->set_cs = lantiq_ssc_set_cs; master->handle_err = lantiq_ssc_handle_err;