From patchwork Fri Feb 23 18:14:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 205609 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp760803dyb; Fri, 23 Feb 2024 10:16:27 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCUl055OOridfF3sIoem5KTPfg4qsIXEqgDgHrM1HWb9UHcc5MzOXTQioh5sMQ/byAFjl0gl/vE8BjI5lffR1CbK9yJo4g== X-Google-Smtp-Source: AGHT+IE8WBw8un7NNVj+oFNRo50BG9505It1+llU/LhCbmTG1fzhntOrbUMiOB5RAxXHqLXHnLnD X-Received: by 2002:a17:902:cece:b0:1da:1daa:e2bd with SMTP id d14-20020a170902cece00b001da1daae2bdmr817249plg.19.1708712187339; Fri, 23 Feb 2024 10:16:27 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712187; cv=pass; d=google.com; s=arc-20160816; b=cLOYD3X2d+Fpnub1JVOewK9kJfv1lyBrZlern6U4v+tilN3UQoGsXHavB4+qJz06Bn dfngWm22De4oc4J9/6Vh1Z157ORg7zigK9Ur6cMHWlvzYQKFuewppUqbIW97/leaU7Rr 6hAdoJKd7kidD0HETsTMSHSxml6cVelQ/YytG3KbSsWyfmLF7wCbrB+kCf7szE9leaGq zagUPCanINqE6K/bscVWQnFJoEfiQFNnfOK+fCf0peqkJCZNiyrGUlqXYGU+Hvpp/8za XuQNAVgqgP4xybAbjgbmWMdU5GZkqCGMo6tYg8h8Oh9HQyINJWshLB4z+SCJiJ7HsCuz beIA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vPdR1MvtktsAtCs1c7d+8gSeJSZYOv6Ob1/SOA8y6c8=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=uSYJElwh5Qy0bv3l9zlf41Qh1/2RSTHrZo1wA9SAJDKilKWARM3M54Y33Ubv79hNQP KX002NBLZSAIB3S6fH/HYq+1nXU/bDgih+qcZq8grrsD4BZQI5GOcw1KIqQrPLeVXmVA 7xa5HRBD17WppLB+jmNEkAMx1DIlGEbDA+t+PVzktdwtBpe95kt6Ik2oOe862fHgormk j0JPd6xQDZsqCloxiuQVdivx0Dc2Cbk9bAd2W40w87+LeIssNbXzyDDJ8ylM002Lrffh 5W6/y7dp87BW22Wo2fR0ifIpMItpFo8WeBlLdvw9N5sRd++B9yGSbe+frE5Jqso+Eyio TN5g==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=NVso89HF; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78954-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78954-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j1-20020a170902c08100b001dbede97219si9991298pld.251.2024.02.23.10.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:16:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78954-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=NVso89HF; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78954-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78954-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C8A3028A4EB for ; Fri, 23 Feb 2024 18:16:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F904145358; Fri, 23 Feb 2024 18:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="NVso89HF" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AECB813DBA8; Fri, 23 Feb 2024 18:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712114; cv=pass; b=L0nwGLNAfjia6oJARfy47b1O032y76M3GAuviuWUEDC3EYsfyTFSSPbB2AvJ3kJCM2XDA7fcpOlTYThqE628bx2upsBq1pF1PEkhADbfnjZnrtDIbFwUcgQF78+fa5UANG5XoSdIjpT3ypbDI8xz+6R8rXRjj4ffMkeY9HfLKao= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712114; c=relaxed/simple; bh=ohm1BuRwL5Vhi0zBQ+dOazp2gwS8tFvdQ1N8/JNAlQM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YkPrZY4DyzBeuxAtqJEms3IeKe285vMqh8gj9TV5UZkLOEmRxbBPQWFF3a4zcZe0TUPjMFQR68xT7coJvD/uj0ZYNEQ54Rg56FcZa+JTG+K+WGzhPdW7eZftemHK5PwCCaxqcTfTdw1gDTxBqT+KTetCknIgDVnh5XWQaTt/HdQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=NVso89HF; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8710n8zym3; Fri, 23 Feb 2024 20:15:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPdR1MvtktsAtCs1c7d+8gSeJSZYOv6Ob1/SOA8y6c8=; b=NVso89HFhmYxAQTs6SzwUfF9oiJnzLMvhDcWeAq8/1YsZrY/lWKd+23RloAOtVKQ3C3+Wq 9hQ7zO4TunUfg0aCOUUoliZG/9D6U1GJx0n85sGaEvfMk4oL08xM3D1RD1JlO007vT7Dv1 /X00tZusMiT/U9lB+eJ2wGtnW7H4tII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPdR1MvtktsAtCs1c7d+8gSeJSZYOv6Ob1/SOA8y6c8=; b=NxEM0iCWG34hq/UmByTWBnyjN9+FrrdWG/dk52OZ2MH84BsanTbnc+/dfc8XEOAe3dgdP5 E2ZZmVLbDw/iiRcUaXu2nRrccum/7TVyDuGuKhv8nMkq/79OjlYNOfE49Q/JESNrehPTiQ r25OJm18Wg+G87nnFdKRIlVH58cTxOE= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712103; a=rsa-sha256; cv=none; b=zQRsAG/vUV1GLeW6lWXAiLigaSokm2uQUwUZbI540AwmaKyNioiOuwgpEZKk3Jtf1Ksrha 2XB2IozW7ukcT9dCo4GrPO4JvLTRx/3cFFubn+5oV0qoXGCmRVcM+ThSIQ+qMMzIZ1n5PG EBAdGUpK8X8FRxsJKrY/Y/YvNyZRzsQ= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 1/5] ARM: OMAP: fix bogus MMC GPIO labels on Nokia N8x0 Date: Fri, 23 Feb 2024 20:14:35 +0200 Message-Id: <20240223181439.1099750-2-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791714590593782206 X-GMAIL-MSGID: 1791714590593782206 The GPIO bank width is 32 on OMAP2, so all labels are incorrect. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- arch/arm/mach-omap2/board-n8x0.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 31755a378c73..3e48f34016c1 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -144,8 +144,7 @@ static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = { .dev_id = "mmci-omap.0", .table = { /* Slot switch, GPIO 96 */ - GPIO_LOOKUP("gpio-80-111", 16, - "switch", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio-96-127", 0, "switch", GPIO_ACTIVE_HIGH), { } }, }; @@ -154,11 +153,9 @@ static struct gpiod_lookup_table nokia810_mmc_gpio_table = { .dev_id = "mmci-omap.0", .table = { /* Slot index 1, VSD power, GPIO 23 */ - GPIO_LOOKUP_IDX("gpio-16-31", 7, - "vsd", 1, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("gpio-0-31", 23, "vsd", 1, GPIO_ACTIVE_HIGH), /* Slot index 1, VIO power, GPIO 9 */ - GPIO_LOOKUP_IDX("gpio-0-15", 9, - "vio", 1, GPIO_ACTIVE_HIGH), + GPIO_LOOKUP_IDX("gpio-0-31", 9, "vio", 1, GPIO_ACTIVE_HIGH), { } }, }; From patchwork Fri Feb 23 18:14:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 205611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp761546dyb; Fri, 23 Feb 2024 10:17:36 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCWCdyQUX38+UanX5KE7rfPZhebo8jx4jcgIVPbg4L5tM+0E0u7/nd3Q6CGmH4XpYaP5UxEDrrkztVarultgUjMhfro8sw== X-Google-Smtp-Source: AGHT+IEFBl/8XLPy2yNrbVf4Jkm4drRnl0bEJ6XWFpuUiBV8+5Vn0V0Ibx6W9VLmP6KZphp3EgPj X-Received: by 2002:a17:903:41cb:b0:1db:fad5:26b0 with SMTP id u11-20020a17090341cb00b001dbfad526b0mr646455ple.55.1708712255868; Fri, 23 Feb 2024 10:17:35 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712255; cv=pass; d=google.com; s=arc-20160816; b=KtATOBI7tnpDv2Ilrqy9luGS99L0EwJUuCcqSrFb/qXmjzPG+4YWFxjXnO/fL8tdT4 BeAUBiHFxfVa2u5LQ7cv4nlIEV1hG+pGQk1P4nNbVS4Lo7jitA7fEZ1NQBOruZNlqlOp BjvrT2hEJoxosJCvpOnvI2qZuM6hQqmCTwq6jSGnSuTO8eOjrnQrzEacFXa70P7Q4c5q K2BtN1qZ04AOeEny5FDEhLp1mSCwqJpmMhaOiEDSGx7caJTtzYtFUbBP1yn3WwPX1aG1 fG1rFLDhCNXXwTQ6dh7zizT65LQsfJFONTvhY8ge1Nd+sHclCeshGm3R+q7gdc1GIhpZ WZ5w== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kT1h9facss0h5Q/m27As0W2i7G4ODNF3k2VDGvzk920=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=xJlIDJrs00FTjmIHNrQ+ODmGAF+EgkPzII6KbIvQMDJEEAxOy2ch1VMiYVRqwsr1HL OSzCeOzLkisYm63dewwe19ogghIubvZ4+Db4vAouvsV7zdld6rRGylrDix70esBGsH2/ r3PnRQqEsDJMSbIJCySdsyYHSNfMow5tTw+0Q2knn1KU+BnOMV15+vQqjKcTPwh9vSR+ p6wxdzRMzWP1Jhb1DRAF7bHketX2gfe1HvCyK+tX8l/g1g2TxMeEiAQE5yDu9mF00cu/ 7HDieRhrZFxdRyeS9m+cwMOM1eG5UFgxbCdOE38BsF+NqMOAUEYlDjTMaOYcDcpxbki4 zfwA==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=kV7Qq7QZ; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78956-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78956-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q15-20020a170902eb8f00b001dbc70ef010si12144051plg.362.2024.02.23.10.17.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78956-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=kV7Qq7QZ; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78956-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78956-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9100FB22B17 for ; Fri, 23 Feb 2024 18:16:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A93AB1468F0; Fri, 23 Feb 2024 18:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="kV7Qq7QZ" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEC8384FA6; Fri, 23 Feb 2024 18:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712114; cv=pass; b=qm2k5M8g8AmfH+VVnj3GdwSWoLQ9dJtcy+2x0MwnCUGvvPtzkn+ZFlvz+yAWxsrbGr3udcin3u8FcUTpJgTaaXDtajOMTpvxuusXvCTwvDPe4QX4RkFfZNSLp84a4qJDqaeXio/dYUenjdKzwL+mobCNjIys9eGLOmmjCzzh2y8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712114; c=relaxed/simple; bh=DVQT8mx6aHoQZtSl3ApWVIvMP4rDyr8mAYJaMsZ94xs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=itCZNvs1fL9uRjxtoAcFkzHe0sSYpJpPZw7UILN7ViOST49w1+bkYy5w3BMa+R5UpLk6gWlQljQLI01ZnzifGn8vhz/kNdkp61rt40e5zFx33TiGm0uCclTgvMWq+IdE4wWUx/ykF4tagFEyS3o3MMCT57CygYgg0UfaMk4Znak= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=kV7Qq7QZ; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8808HWzyxR; Fri, 23 Feb 2024 20:15:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kT1h9facss0h5Q/m27As0W2i7G4ODNF3k2VDGvzk920=; b=kV7Qq7QZKS6AYXDAOCO0cOOpnce7vauAImPKOsPXC3DQmsvmC0h6Ic7gWaRewQbVYel1S2 FhZf9dlxpaxYdYIh9mDwRjwWWKNZyB1qzL7kBpGG4xUHrxAKOgX7qLN02+x4a7rvlE64X/ 8MLteaHvIl1tpFUoSPkQsWbFowqCEvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kT1h9facss0h5Q/m27As0W2i7G4ODNF3k2VDGvzk920=; b=HIlUsDtGnF4l9ArAeFfLSepnCdnS0iNXtP+5CIUtqs1wC3uCuBdJ76fTvcy3dygLAzPmq+ IGuf4laYdCoxn6Le8KcQxZfUTl2aXc3EvhmU7ar/ycwzLvQWHZzrc5PjSixD10jxNLMeFx wnhoddnpCEwvRpvbmNgRS7C3qvyo3Go= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712104; a=rsa-sha256; cv=none; b=q8C8NR/mkD9ylUtUeuVeKNuupZxIBP7EHdN43if27vDmRn52hXFpzUZ06/s0KU6mWS1KQj abfDRlrclAbApZQkcQ2OkDHdUDRK7AgiVO7F2IxOSjnFd+FvVu7IAID5IldZZqJcuOCUOl 3M7fEQY3FjNX3vXKtU8cnmjSTWi8wyw= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 2/5] ARM: OMAP: fix N810 MMC gpiod table Date: Fri, 23 Feb 2024 20:14:36 +0200 Message-Id: <20240223181439.1099750-3-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791714662456790698 X-GMAIL-MSGID: 1791714662456790698 Trying to append a second table for the same dev_id doesn't seem to work. The second table is just silently ignored. As a result eMMC GPIOs are not present. Fix by using separate tables for N800 and N810. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- arch/arm/mach-omap2/board-n8x0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 3e48f34016c1..c933a91751e4 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -140,7 +140,7 @@ static int slot1_cover_open; static int slot2_cover_open; static struct device *mmc_device; -static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = { +static struct gpiod_lookup_table nokia800_mmc_gpio_table = { .dev_id = "mmci-omap.0", .table = { /* Slot switch, GPIO 96 */ @@ -152,6 +152,8 @@ static struct gpiod_lookup_table nokia8xx_mmc_gpio_table = { static struct gpiod_lookup_table nokia810_mmc_gpio_table = { .dev_id = "mmci-omap.0", .table = { + /* Slot switch, GPIO 96 */ + GPIO_LOOKUP("gpio-96-127", 0, "switch", GPIO_ACTIVE_HIGH), /* Slot index 1, VSD power, GPIO 23 */ GPIO_LOOKUP_IDX("gpio-0-31", 23, "vsd", 1, GPIO_ACTIVE_HIGH), /* Slot index 1, VIO power, GPIO 9 */ @@ -412,8 +414,6 @@ static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; static void __init n8x0_mmc_init(void) { - gpiod_add_lookup_table(&nokia8xx_mmc_gpio_table); - if (board_is_n810()) { mmc1_data.slots[0].name = "external"; @@ -426,6 +426,8 @@ static void __init n8x0_mmc_init(void) mmc1_data.slots[1].name = "internal"; mmc1_data.slots[1].ban_openended = 1; gpiod_add_lookup_table(&nokia810_mmc_gpio_table); + } else { + gpiod_add_lookup_table(&nokia800_mmc_gpio_table); } mmc1_data.nr_slots = 2; From patchwork Fri Feb 23 18:14:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 205607 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp760569dyb; Fri, 23 Feb 2024 10:16:09 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCXz+lmX0T/5V7J0Ds+HkGlpJjvBz939DlJ0KNJuFIj0XxdAwty43csqBeQocsqaRjw5O4TZx/LQ6/Cv+VeKPpppQT/1LA== X-Google-Smtp-Source: AGHT+IHvowPhY6JcVu2n+/1DBzFphIYfqmRKzOccHsdCT8dpWYyJet6RXOsHF20dMwy2p6KUh0hI X-Received: by 2002:a05:6808:2e9b:b0:3c0:3733:c250 with SMTP id gt27-20020a0568082e9b00b003c03733c250mr767042oib.20.1708712169002; Fri, 23 Feb 2024 10:16:09 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712168; cv=pass; d=google.com; s=arc-20160816; b=hHSBNv2qiLsC08vWty7i+iSiDAiDI5Wzs6mmOtsmHYEF+1OHuLhYa9EkjeBrtXyqUJ rcBHTxVuQ5bfPTGEGhTUS1gfZVr3TW2Huaom0GbulKeYgQEYmYUJUc5b9zQFE0pzi4yb /mL7ji6LLwuQ6EQYLP9Cjmm0vwicUOLtgqD2//NqxX1A2qR2phpZdQ/CS3jsQCJ/uYmE yZpW9Q1YbE3KxFxt/umvSzIVISkf6tf/G9J+x5FgpDBJ79y/lgEQPeChjQgPPjhSySoQ XubIZBFhv3Sb9bGrQjhr8XH9ybJ2VOt637hCKpEsJ2Ks7zxVZNB4o6uf4qEdIgnoavAy ZfbA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TgHYKl8nENz0zRcm1GC7MSy4sfSrbhDj/i7Fo3D2m+c=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=lxSKMdhMhdnkqGH6u/TTPfizqkdb65G6kMHsNj//UJXEF5wFkFdS32MZWJ/7FkyC4T fhHoM5S6rqZKh4TPvvnLXcibv3eh/vJIXYQO7apmEi/lzWJhiiXuHOyp2rC0rl2j+hoU 6Vs53q44rc06N0mXqwyJ6JcPdw9KuuKFawpYrI+74/1vd7Zz0Xs4rQAVoGigKX8qEKqv 1t36NwlRvZuiZj6RazHYdtJQZuRmZAUcqdDefHMGF/I1LxnpTKc7KkORHzeyTHZGR3G/ r9QGuGvvZkCmev1CoP9Ppcq+PjEI0b4d1DELcghb0uOuRkkU7NgBx+jRcPqk1/QWl+E1 E5Xg==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=mhm9fG2I; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78955-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78955-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x1-20020a05620a448100b00787bc15dfc8si581163qkp.179.2024.02.23.10.16.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:16:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78955-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=mhm9fG2I; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78955-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78955-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 43E141C20EDD for ; Fri, 23 Feb 2024 18:16:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4BAB5145B1B; Fri, 23 Feb 2024 18:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="mhm9fG2I" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04FE2140362; Fri, 23 Feb 2024 18:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712114; cv=pass; b=Gj56JcjHcl/dH/JPIqJKBNfDi6PJYIlt0qvX96u2vOowKlFao9kolaf7joQyU+7aX3Tc2TuYsebCA1HCTa2kdJMxpAvwDLqU8ws3tuFvzjoyhn545fmKlCABnVvrOA8ESVPHdiIuDnma/kQBc6NV2HoumWQg/DedVjVCCAs9BHY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712114; c=relaxed/simple; bh=9HRYRnXfj6+3p6mGWDv0/h3ASIdvtbtBeqAitQNheMg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rOpeE0SgE38ADe68/xpY6s8d05RMEzb2Sd0rBuwgd9rsX1rT+Gp0+reSgrGEeDTLo/FGJYzoujKO+WlxzEHbVnzWgr7x9DFNWNGNBxBQi/jeMLFTCzTuajc5BnZdBBqpDAUDfKuuqdjnnjt6p1Q7H+XeJG2TdHiihOpi6wRPzik= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=mhm9fG2I; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8847WBzyWT; Fri, 23 Feb 2024 20:15:04 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TgHYKl8nENz0zRcm1GC7MSy4sfSrbhDj/i7Fo3D2m+c=; b=mhm9fG2IuNW8DH94X2N/P0Dfw4dOPHGXvhIQIvqlTYTB3n6DNJ2BZ6GJc1w/J4RFSK8dxZ insFDKCeh/xXIKd32/+0NgfGD3rmFRsuWf5IbaQU95/OoJMikA8eQxkhvvseI8WVOUZ/gm ysYFG4OPoXU1nJFZm1loaTuMvUy8AgY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TgHYKl8nENz0zRcm1GC7MSy4sfSrbhDj/i7Fo3D2m+c=; b=rXrBNAPdjRL9OlYlelkn8jautSQcdYEGnyCYVe4R7fUn8UM3Z/jYlSTb1iKjkHOGEY1HVP ACpSEdXR3nppDl4ewHFLZeRCt5b+NFlGHsdWI7dbWe9msMREVJGMwevbmDYXTMeZ7YbsF3 af5yBeOBKnkJjB8nlPH5ixGvGXjIxV0= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712104; a=rsa-sha256; cv=none; b=Ahxz2dx8SaMjCL1c9kMHyJkveRGeC07+djb/HOFrcq+2oleDF+07QKYrEMVRA91jKEIc+C 5tXgL0Uj6wLWQE/UowfUD1vv2SzWPbebssh+/KriZ8Vkq+SQgmsrVYuv4ipxCTZblECFi2 mSgw0Mwbbq84+BrqH9lxaZgXAL94hFc= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 3/5] MMC: OMAP: fix broken slot switch lookup Date: Fri, 23 Feb 2024 20:14:37 +0200 Message-Id: <20240223181439.1099750-4-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791714571499403127 X-GMAIL-MSGID: 1791714571499403127 The lookup is done before host->dev is initialized. It will always just fail silently, and the MMC behaviour is totally unpredictable as the switch is left in an undefined state. Fix that. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- drivers/mmc/host/omap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 9fb8995b43a1..aa40e1a9dc29 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1384,13 +1384,6 @@ static int mmc_omap_probe(struct platform_device *pdev) if (IS_ERR(host->virt_base)) return PTR_ERR(host->virt_base); - host->slot_switch = gpiod_get_optional(host->dev, "switch", - GPIOD_OUT_LOW); - if (IS_ERR(host->slot_switch)) - return dev_err_probe(host->dev, PTR_ERR(host->slot_switch), - "error looking up slot switch GPIO\n"); - - INIT_WORK(&host->slot_release_work, mmc_omap_slot_release_work); INIT_WORK(&host->send_stop_work, mmc_omap_send_stop_work); @@ -1409,6 +1402,12 @@ static int mmc_omap_probe(struct platform_device *pdev) host->dev = &pdev->dev; platform_set_drvdata(pdev, host); + host->slot_switch = gpiod_get_optional(host->dev, "switch", + GPIOD_OUT_LOW); + if (IS_ERR(host->slot_switch)) + return dev_err_probe(host->dev, PTR_ERR(host->slot_switch), + "error looking up slot switch GPIO\n"); + host->id = pdev->id; host->irq = irq; host->phys_base = res->start; From patchwork Fri Feb 23 18:14:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 205608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp760758dyb; Fri, 23 Feb 2024 10:16:22 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCWldnnZ75Nj6SV2gXKwXhcO6sJEcrn3JowWhRM1VOI7UUyOfAeO4NbdJeIfhERZA0IamJKO9wuvaWB8WiJCQJAUsq7i0Q== X-Google-Smtp-Source: AGHT+IFW6n3xNNwHOfYmKNfVtZTGIFMtZMJCZX0kNCs9ILTf7q11cavNLftk9vtrqTCOs2aZkhO2 X-Received: by 2002:a17:906:3685:b0:a3f:98c1:3ed8 with SMTP id a5-20020a170906368500b00a3f98c13ed8mr322524ejc.29.1708712182711; Fri, 23 Feb 2024 10:16:22 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712182; cv=pass; d=google.com; s=arc-20160816; b=TLfKHMx088POvpTWiOv4XkhmtaikVQ/Q9UgvNjl5mo9KQEZXsJZHEQ5dq+wJQ3jzGs ymWpfn85O4jffzkAm6SDq7sOM94bPcJlbtis4/x4SI/2F+3ZM3hFD+KkKQEuL8FkvC6f whio72Jwz4XXt9IzWRq/ZB4FUtU7EZ2QPnaLwbGU7fk7GsfR5yYKzXa+bOeMba5Qo1nT RfioS1eizs1/RaxFIu+UmuMOW4HNlXiNarScjOpt9uCOt9SzP/G0LYtd3ggqmPK0Dz6F pPgt5W7P0F/SvgSeMymdq7gt/DvbecXmWIxpZr+vflTh+sf+jI7OZ/a0XYI9MFlk3Brg tzZQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sa5OLBki+wJAUWQKXeTEXqd/31Z9fCA2pAdQTW32zog=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=Bn1Q43lnp2HJLeY/8SgPpNdin90h7XBflHqeXnS7+dLvVbLrne7K54T7SuB5mlz/93 RjsA1qk74398qwhFusTi49V0LYFVoi8eaZDGH8kVpfwNrKAi1gWEHMBdQLIpsNwT6vG5 ZFcce4IYQPSrkMHyEeMmV5x/yp3mmoApQds9zw5SbNHog9K9H/lwrnRi/lAiy1iaFpkA c1zpZUmE00ULAbyAqLTmxeHcWAWVg2zNGf6eAtzEUCdF7iyFpUb9qwHJfakIohdungz9 nsvk15d75bneuLNS0nBXaYXNamnI9kmBK5BVYw6vaUFhkymaFcL7bPicbWjhoOyym+i1 +MTg==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=RpbAmOyl; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78957-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78957-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f10-20020a170906084a00b00a3e7636f513si5092412ejd.167.2024.02.23.10.16.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:16:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78957-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=RpbAmOyl; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78957-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78957-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 542DF1F28492 for ; Fri, 23 Feb 2024 18:16:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 821E4142625; Fri, 23 Feb 2024 18:15:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="RpbAmOyl" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0501F141987; Fri, 23 Feb 2024 18:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712115; cv=pass; b=ELH3YXjLbI84b9xJtr2UJWjwfK4JaenrU8zXUrQ+JjPNDhnn8JrVhaNksSfMCzC8cn/fH01TOYgnD46oayVapWtj8QyBKylcBBKj+g1SAYedIq/Tz+YJSldPQWbLJsOQERRbU4Pw8Ta/cpdiOEP8vz2EyRjd6+Jha1IMW4O4ueo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712115; c=relaxed/simple; bh=vW6K6F1wIHMJu+ei/OKI8GNIPUdGz3I6yFBJFhPrs9M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sV327S/kqXYA3tjvaU2oDi/J34kymp4u2qq8cEXKcOeuVw8aIFaK8sBWJMGEm+3wnQJx/pIXLUse3H86QhmAigvnLqEPIy7eIHI5vuyG8FGMOQLdHNxftcYT0MSaMppecIP0O1I2gFt+u9URf9RKE3mRA3LYKXrrfAmtIZl6fbM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=RpbAmOyl; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8910mTzyyn; Fri, 23 Feb 2024 20:15:05 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sa5OLBki+wJAUWQKXeTEXqd/31Z9fCA2pAdQTW32zog=; b=RpbAmOyllID+SUyTYoco8Irls8g2fHMWE8jkVCbUeqaYX5wx7hSje9ubBGLxkVA371EIE6 acYpWWGtHHAdTBpWQQeMw2b/ZeDhWHUAhFSqsFFGuytB65bYd+cF+YEvXQtYFY05jW0Z2u dbFdvvp68Mps7fPF9PibulJfY5Wt4iQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sa5OLBki+wJAUWQKXeTEXqd/31Z9fCA2pAdQTW32zog=; b=EhkKf2Wh74gtkvmuzMJg+l3mgx/ZQ2cETOGrZcnN0uWIjQAU/csUOMYgga4Ki2C6JL4FDk Bg4qmW7wmnOSO07mJCsjPkzsO7w6ee7tQaPJBco2ufZMjE7ZyKO3FEXWO1WG9Ga1sa2O9m 1r+/12Ako1j8PWjhox6nUui7MRIYdRc= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712105; a=rsa-sha256; cv=none; b=S6OuJ8hhRP2YFox1Qu3d1y0fXql9o5qo0pywxX8GVOnf0n1dNYH+vostpDzlF4I2v5vXI+ GsBbAZSGP8vjmE4MdOP7j+v5JSu7PytgiBR9hfHp62eFqw57IpaLcM3fSm0i5Q2qKgZgYk sKNLCK+4sRmzVfQtTNYYR3zGwdlsj8o= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 4/5] MMC: OMAP: fix deferred probe Date: Fri, 23 Feb 2024 20:14:38 +0200 Message-Id: <20240223181439.1099750-5-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791714585379695529 X-GMAIL-MSGID: 1791714585379695529 After a deferred probe, GPIO descriptor lookup will fail with EBUSY. Fix by using managed descriptors. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- drivers/mmc/host/omap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index aa40e1a9dc29..50408771ae01 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1259,18 +1259,18 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, int id) slot->pdata = &host->pdata->slots[id]; /* Check for some optional GPIO controls */ - slot->vsd = gpiod_get_index_optional(host->dev, "vsd", - id, GPIOD_OUT_LOW); + slot->vsd = devm_gpiod_get_index_optional(host->dev, "vsd", + id, GPIOD_OUT_LOW); if (IS_ERR(slot->vsd)) return dev_err_probe(host->dev, PTR_ERR(slot->vsd), "error looking up VSD GPIO\n"); - slot->vio = gpiod_get_index_optional(host->dev, "vio", - id, GPIOD_OUT_LOW); + slot->vio = devm_gpiod_get_index_optional(host->dev, "vio", + id, GPIOD_OUT_LOW); if (IS_ERR(slot->vio)) return dev_err_probe(host->dev, PTR_ERR(slot->vio), "error looking up VIO GPIO\n"); - slot->cover = gpiod_get_index_optional(host->dev, "cover", - id, GPIOD_IN); + slot->cover = devm_gpiod_get_index_optional(host->dev, "cover", + id, GPIOD_IN); if (IS_ERR(slot->cover)) return dev_err_probe(host->dev, PTR_ERR(slot->cover), "error looking up cover switch GPIO\n"); @@ -1402,8 +1402,8 @@ static int mmc_omap_probe(struct platform_device *pdev) host->dev = &pdev->dev; platform_set_drvdata(pdev, host); - host->slot_switch = gpiod_get_optional(host->dev, "switch", - GPIOD_OUT_LOW); + host->slot_switch = devm_gpiod_get_optional(host->dev, "switch", + GPIOD_OUT_LOW); if (IS_ERR(host->slot_switch)) return dev_err_probe(host->dev, PTR_ERR(host->slot_switch), "error looking up slot switch GPIO\n"); From patchwork Fri Feb 23 18:14:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 205610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp760836dyb; Fri, 23 Feb 2024 10:16:29 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCV8dMcrEkNi7ASDVHopDsfuuT+r4H5O1WlmJbJv5CfeK1ZMU9fd82h0tLFtOXLgNkib6B8+o5YmU6ifyFipx536wZHKlA== X-Google-Smtp-Source: AGHT+IEGgAWdvVIxafdfXlW/U7P+qxwnfJ3NIl94EvdLrOH2ZEaOLzIXz1RlO5+rcU0jqmp+W4c3 X-Received: by 2002:aa7:ccc9:0:b0:564:6b09:9305 with SMTP id y9-20020aa7ccc9000000b005646b099305mr395293edt.6.1708712189362; Fri, 23 Feb 2024 10:16:29 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712189; cv=pass; d=google.com; s=arc-20160816; b=XqAzSJQwqVZRqYmeeJ7I3gC1aHsazD/INc0K7lnYzs3/cu50GO7xSbRHxM06AfefC0 pZuNmBmjtFBNvcSbjH6T5cTntD6wsDSYGIlKPDLouKWUB8FYPR3HPtq2YBZiFhhMJfPd Nowa3qFH5JTTYOYue8kP8VLNsOnMMOJaYc1xI6+4vcRMhMzCwy1P/M6gGY9DCFy4Q2tx r4FxcluV40x+45nr5NIONP157JMEQcWgoo/faSIBn+EesKzTptP7OpLJXpwZQoqDiSk9 bPhCb+ys1sg58Q4wb7B5uG0AGWLqO51OZCEP0zmQ7dhqPlKR1FzeOyIUS23jkuR7Zxsr 7cSw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=S7wWfneG8wRyf2KX1pRWaaUVIRBRh/PwM028DaY3q+E=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=BPlVSz8BunvF9sdlY5B9o9VNi77+Z1wsPRuoZSZm2XVi6maxLxk2uwmNOnfpN6mUJ8 rDEoEHt8lnn9K//yv6YR28Y0ANWqcPVHq0gtkz9KmbQ+XJUQndEhCyToMa+KVUY/o5Mh cN5KLe6gqCBzMAF9LccYTrvlZyu+fCcSehDzbSU3LbwrbXS6k2WbdoU6VPwBe/YYmeQs 9uXnME4mYzZI548VcK+y/swsredOG2vF8hklX6YAB6NjSrJq1Ic1ZKwvwsTCm8X5CNck n23p0bosur34ib35Z86fdIyPqpDjPtnWDcHJlw2FPjEK4EsAALx6JUzKMvg9X/RbmP3y TWlA==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=a4W6EDFG; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78958-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78958-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g25-20020a50d5d9000000b0055ced896819si6328409edj.212.2024.02.23.10.16.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:16:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78958-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=a4W6EDFG; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78958-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78958-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 00FA21F28268 for ; Fri, 23 Feb 2024 18:16:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8D56146E76; Fri, 23 Feb 2024 18:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="a4W6EDFG" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C2841448C3; Fri, 23 Feb 2024 18:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712117; cv=pass; b=FYJVDkUYyW1G1usmL/55/4UyTozxK2vfGo2UcAT+gBHDUK/R7+dYZj3yiU8KtNC89mxRpMGerLfdKRhw5HXwvB2P/Y+yWadmFgw2xtXSh4VClqTFpqfwLTsPhxX4iQkhAnWDJx0CaA1dweDYdUS53gRYowY3rxS020qsJM0JFTE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712117; c=relaxed/simple; bh=WqCQnR+yf94SdIYZnyGag0TszxHaJ7hhPosA+SsHm8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=b0mjqXOP49HNpeUF4xUads7G5jG4x0dnunS5Ax88EqQH4wPEhVDrez1stSXCb83z8LUauk1Qpuve0Ded8oNn9TICGGULmDTWWaYU1wrqEHYT7eYhI5eqWZGkZSd9g62fAv3DeOctbr3SrS3XBNxs9tcCMXDOREJ6aeBh7F7Mypc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=a4W6EDFG; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8953Rqzyyw; Fri, 23 Feb 2024 20:15:05 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S7wWfneG8wRyf2KX1pRWaaUVIRBRh/PwM028DaY3q+E=; b=a4W6EDFGmKyOr2SdmLZSg3dUSlW+X4E/6GXl8FL39otWtcVoID++QKWaFFsR8uO+BcgPV4 qAa5WxjBCgUiKUuzLesfUOBlSiUFY/KG8QrFQkOfNYvbRvI5QhNTIJBoGkKG6Hk9GD6zcT rhaWpLPfiAjBeErQEk7W+xXyo+Gb/X8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S7wWfneG8wRyf2KX1pRWaaUVIRBRh/PwM028DaY3q+E=; b=LaxA6mjN49qayqu7alMxl1Kw/R+eFqEACpZYvYg60tz5JlhsWTWLJlrPahWh7CQZ4HCvS0 LmjuXISGbjVaCTizFsFT7yySbmkeOlLE7FwAUPeBVxBUd3iMEjdICtdGk51uG/s2rxzk6N 2hVnhxmQVQ60eMocWrohF+BYDT/IHmw= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712106; a=rsa-sha256; cv=none; b=wCIlShYVXNVTP/xsvjSlt22TjqT7r4xG+k3R3FAQCVm5tereqBPqgJdX74xqTw72DUm1tU mUhgdmBuHKxkNcgkN8jtTT5Fs6kUIn+q5mzkofrKonPWEh9BheVnTL5MJxV8X9Aj1qGyYg oN4HRT5G5F/6A0fl8/7ZnUC6RpPv9bw= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 5/5] MMC: OMAP: restore original power up/down steps Date: Fri, 23 Feb 2024 20:14:39 +0200 Message-Id: <20240223181439.1099750-6-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791714592556160062 X-GMAIL-MSGID: 1791714592556160062 Commit e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") moved Nokia N810 MMC power up/down from the board file into the MMC driver. The change removed some delays, and ordering without a valid reason. Restore power up/down to match the original code. This matters only on N810 where the 2nd GPIO is in use. Other boards will see an additional delay but that should be a lesser concern than omitting delays altogether. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- drivers/mmc/host/omap.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 50408771ae01..13fa8588e38c 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1119,10 +1119,25 @@ static void mmc_omap_set_power(struct mmc_omap_slot *slot, int power_on, host = slot->host; - if (slot->vsd) - gpiod_set_value(slot->vsd, power_on); - if (slot->vio) - gpiod_set_value(slot->vio, power_on); + if (power_on) { + if (slot->vsd) { + gpiod_set_value(slot->vsd, power_on); + msleep(1); + } + if (slot->vio) { + gpiod_set_value(slot->vio, power_on); + msleep(1); + } + } else { + if (slot->vio) { + gpiod_set_value(slot->vio, power_on); + msleep(50); + } + if (slot->vsd) { + gpiod_set_value(slot->vsd, power_on); + msleep(50); + } + } if (slot->pdata->set_power != NULL) slot->pdata->set_power(mmc_dev(slot->mmc), slot->id, power_on,