From patchwork Sat Dec 15 23:38:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10732317 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 992BF6C5 for ; Sat, 15 Dec 2018 23:40:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 779BC29E4E for ; Sat, 15 Dec 2018 23:40:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66F0F29E4C; Sat, 15 Dec 2018 23:40:43 +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,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 0CD6229E4C for ; Sat, 15 Dec 2018 23:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727227AbeLOXkm (ORCPT ); Sat, 15 Dec 2018 18:40:42 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41111 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbeLOXkm (ORCPT ); Sat, 15 Dec 2018 18:40:42 -0500 Received: by mail-lj1-f196.google.com with SMTP id k15-v6so7944933ljc.8 for ; Sat, 15 Dec 2018 15:40:40 -0800 (PST) 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=QJ2cGH+GnLlSNOpAL5sCyQ2Yjefv7ABUW6sqYcQUzH8=; b=AuS56J6oyBUzc7vnazn2IAocbe2mm5ATMdGI8XNearaZaJxv+irnnAuElBUtwaHPvw feBtCxMS43B5fscTPmI8MspTWkFgUNfOKd+WmYGsAGt7vleVA+CKKaD/LUqbPguwu/KF PvcBhTVh2JjXh+pOVvBaJEIlkLna3iHyvleJ8= 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=QJ2cGH+GnLlSNOpAL5sCyQ2Yjefv7ABUW6sqYcQUzH8=; b=VA0pscpv/5z3xXJrQEclIiGO3+SxtIw6e6o6kAXvDxzYw4uVJCrwu2Qy69JOawZVCE c4F/4b0nnDuzeE18rD1C7aoJUu11ls+r7tFS25QEa4jnoaY9vCvOXfY3DjdQvFN4xtSK yvje0w6D7MfMi8urqglxpd7zmchesVw2x8cjHgHV4dvGjz2uBkQTILpgvWW2oMH1i1Ol IfqAV5jP3Pb4g8X1xejPKNvX/gpZbF9fXEj/ydgYONIHG57BwQKznSOI2V6juOUoNTVl UA5y2DsqWlk0ds3MIngx+YFKrOW30gqctAs3E1YLgiCi+pN/HRGuFI2AEI25OCHq7o9b r1pQ== X-Gm-Message-State: AA+aEWbCaVs7LQji/mEHjNZkwnlvxV/H0ukW0inJ/bZT3KKBjN02rPP9 8eNNsTXO4HaLs40vrvTifwoScQ== X-Google-Smtp-Source: AFSGD/V9mBCLEHHXkcGYNm0rahT9egQppPH96TAPIti6lGUo9BWSEaG1EOYXGMEOTvD1R95LyuoTyg== X-Received: by 2002:a2e:6f11:: with SMTP id k17-v6mr4446444ljc.94.1544917239903; Sat, 15 Dec 2018 15:40:39 -0800 (PST) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id v19sm1709880lfe.69.2018.12.15.15.40.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 15:40:38 -0800 (PST) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski , linuxarm@huawei.com, Linus Walleij Subject: [PATCH 0/7 v1] SPI CS using GPIO descriptors Date: Sun, 16 Dec 2018 00:38:16 +0100 Message-Id: <20181215233823.1042-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a first version of trying to pull GPIO descriptor handling of SPI chip selects into the SPI core. The core grows a bit, bit handles descriptors in addition to the already handled DT and static GPIO lines, and then I start converting over some drivers to show the utility of pulling this into the core. There are *many* drivers to convert. This should also cover the ACPI usecase by way of the completely generic GPIO descriptor handling code that simply picks the GPIO "cs" descriptors associated with the device. Linus Walleij (7): spi: Optionally use GPIO descriptors for CS GPIOs spi: ath79: Convert to use CS GPIO descriptors spi: atmel: Convert to use CS GPIO descriptors spi: cadence: Convert to use CS GPIO descriptors spi: clps711x: Convert to use CS GPIO descriptors spi: davinci: Convert to use CS GPIO descriptors spi: dw: Convert to use CS GPIO descriptors drivers/spi/spi-ath79.c | 42 +++++---------- drivers/spi/spi-atmel.c | 93 ++++++++++---------------------- drivers/spi/spi-cadence.c | 67 +---------------------- drivers/spi/spi-clps711x.c | 23 +------- drivers/spi/spi-davinci.c | 53 +++++-------------- drivers/spi/spi-dw-mmio.c | 22 -------- drivers/spi/spi-dw.c | 9 +--- drivers/spi/spi.c | 105 +++++++++++++++++++++++++++++++++---- include/linux/spi/spi.h | 23 ++++++-- 9 files changed, 173 insertions(+), 264 deletions(-)