From patchwork Sat Aug 31 18:04:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 1156196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cCG3ij4H"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46LPQS1nf7z9sBp for ; Sun, 1 Sep 2019 04:05:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728495AbfHaSFT (ORCPT ); Sat, 31 Aug 2019 14:05:19 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36150 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728481AbfHaSFT (ORCPT ); Sat, 31 Aug 2019 14:05:19 -0400 Received: by mail-wm1-f66.google.com with SMTP id p13so10683640wmh.1; Sat, 31 Aug 2019 11:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cg1fwu+MPCpI46o99kUNkk3DzcQuLSSfn5/pLPnlQmk=; b=cCG3ij4HsfNRBMeQSagh82b3Q6Pdr6zuOM9F+AM3QFjejedmyBrhGd+AV9x2Gq2Hom NX5CXWPhXX8vsQz77lsPbU2JztNpVBgJvBi1xwrQ3aoNWZ67sHsGg9kxrxn+CGy+4VPp R6xXPhYHfEOGG2aUZJqXbIn8Xzhea1nnH8oKFnSDd0YZ0UE39VRtvL2ymuvSWx1RqwQ6 tFFaQhCbxa8n5iNNap36PlPAVUUJFn4A2cflOEqkVBV401AbpVy5CvBiyOFzUMyr2rRn ZVgO3E3qadGKak87yGbS1Hzlgj1Y+IijkhaTQs4W169pflSX1rtvKAXd/IKRX2PwpjRs PyJQ== 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=cg1fwu+MPCpI46o99kUNkk3DzcQuLSSfn5/pLPnlQmk=; b=gX4thH0l9eJxOxVhHkvpBaUkXzV8QpICRoqaHAjbGp4z7nw77g2Ak1qGuOR6KplvPn G2xt00P+0OJZ7wCsZjkVrHadhKz3GUJO4q+9I2DtOVafbRM+9xgmC2aPFeNTINhOQ/LZ bR8dKROhihaAd4S8NzCfPR/J5APMteIsnVL61FkUGSsyeAXpCGwzyD1/RaW8jEG367zt sTU6umGJ5tGdwMvbL0GWC3VzgPR2Gp4puHUVkm6cv85dgP1QZFLsys2gaop0HJV3YBhD MtlvEOETSH5l+wi822/ADD6q1+WhbONcP/UWbalBT5ebqNNKDHsMBCa1cnR+X0p1zVEs CcEg== X-Gm-Message-State: APjAAAUC12WjGw+oxa9hOkEkDNug7TeMKrzCsnxtfUvrAEikw3j6B6ch MZaFo3T2BJD0APsyO18KfxE= X-Google-Smtp-Source: APXvYqzaEIjD33uuFBMH28zOJch9FGQc20lyBYMjfo0iWKI8qyrhysZgJUwV0aYFwXnzbTGmPQZ2Fg== X-Received: by 2002:a7b:ca5a:: with SMTP id m26mr24394720wml.134.1567274716535; Sat, 31 Aug 2019 11:05:16 -0700 (PDT) Received: from giga-mm.localdomain ([195.245.49.151]) by smtp.gmail.com with ESMTPSA id 20sm10471642wmj.45.2019.08.31.11.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2019 11:05:15 -0700 (PDT) From: Alexander Sverdlin To: Linus Walleij , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-spi@vger.kernel.org Cc: Alexander Sverdlin , Hartley Sweeten , Russell King , Lukasz Majewski , stable@vger.kernel.org Subject: [PATCH] spi: ep93xx: Repair SPI CS lookup tables Date: Sat, 31 Aug 2019 20:04:02 +0200 Message-Id: <20190831180402.10008-1-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The actual device name of the SPI controller being registered on EP93xx is "spi0" (as seen by gpiod_find_lookup_table()). This patch fixes all relevant lookup tables and the following failure (seen on EDB9302): ep93xx-spi ep93xx-spi.0: failed to register SPI master ep93xx-spi: probe of ep93xx-spi.0 failed with error -22 Fixes: 1dfbf334f1236 ("spi: ep93xx: Convert to use CS GPIO descriptors") Cc: stable@vger.kernel.org Signed-off-by: Alexander Sverdlin Reviewed-by: Linus Walleij Reviewed-by: Lukasz Majewski --- arch/arm/mach-ep93xx/edb93xx.c | 2 +- arch/arm/mach-ep93xx/simone.c | 2 +- arch/arm/mach-ep93xx/ts72xx.c | 4 ++-- arch/arm/mach-ep93xx/vision_ep9307.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 1f0da76a39de..7b7280c21ee0 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c @@ -103,7 +103,7 @@ static struct spi_board_info edb93xx_spi_board_info[] __initdata = { }; static struct gpiod_lookup_table edb93xx_spi_cs_gpio_table = { - .dev_id = "ep93xx-spi.0", + .dev_id = "spi0", .table = { GPIO_LOOKUP("A", 6, "cs", GPIO_ACTIVE_LOW), { }, diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index e2658e22bba1..8a53b74dc4b2 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c @@ -73,7 +73,7 @@ static struct spi_board_info simone_spi_devices[] __initdata = { * v1.3 parts will still work, since the signal on SFRMOUT is automatic. */ static struct gpiod_lookup_table simone_spi_cs_gpio_table = { - .dev_id = "ep93xx-spi.0", + .dev_id = "spi0", .table = { GPIO_LOOKUP("A", 1, "cs", GPIO_ACTIVE_LOW), { }, diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 582e06e104fd..e0e1b11032f1 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -267,7 +267,7 @@ static struct spi_board_info bk3_spi_board_info[] __initdata = { * goes through CPLD */ static struct gpiod_lookup_table bk3_spi_cs_gpio_table = { - .dev_id = "ep93xx-spi.0", + .dev_id = "spi0", .table = { GPIO_LOOKUP("F", 3, "cs", GPIO_ACTIVE_LOW), { }, @@ -316,7 +316,7 @@ static struct spi_board_info ts72xx_spi_devices[] __initdata = { }; static struct gpiod_lookup_table ts72xx_spi_cs_gpio_table = { - .dev_id = "ep93xx-spi.0", + .dev_id = "spi0", .table = { /* DIO_17 */ GPIO_LOOKUP("F", 2, "cs", GPIO_ACTIVE_LOW), diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index a88a1d807b32..cbcba3136d74 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -242,7 +242,7 @@ static struct spi_board_info vision_spi_board_info[] __initdata = { }; static struct gpiod_lookup_table vision_spi_cs_gpio_table = { - .dev_id = "ep93xx-spi.0", + .dev_id = "spi0", .table = { GPIO_LOOKUP_IDX("A", 6, "cs", 0, GPIO_ACTIVE_LOW), GPIO_LOOKUP_IDX("A", 7, "cs", 1, GPIO_ACTIVE_LOW),