From patchwork Tue Dec 3 16:41:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 847674 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DB9F2BD1D for ; Tue, 3 Dec 2024 16:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733244111; cv=none; b=UdSdC2UiVL9QjNBF+Hsx9FHGYACyJ6zgzDlNQNc9+ZfKaSFQjdmVNMMonSg+XGiVfVqbdKSYllLHLwpYh6KKQx5kC8i8waiMZajsNGhTZ5q4aamg2nC+9SDZJ0Q0lNt9QFt902daChqw+oxFfDc8AiUHU2Nukt4AKYb2BMG9/GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733244111; c=relaxed/simple; bh=mi8ZKLBkRBFPTJhG12a+AsfcEAOw95iD8h4NMdD5Mqc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hqr71y5H9RiursoAYbapvcsWUBMRh2M3WtEGUmoADjuk829bvSqLKas8568hlvC8NPLPjPmqQPsR+zgpGYg+grfQNLhLEU9pqUvY3v6vOX6d86kd+R8ANU3B83nX7xyvPAa8ACxTgyNa9MN5Yid5dygZDkHvYW9SZPxIhC6gNuA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=p2/hedTi; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="p2/hedTi" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2ffb0bbe9c8so67086591fa.0 for ; Tue, 03 Dec 2024 08:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1733244108; x=1733848908; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=79YYTw4OLJH/nU0R7kGinztAGDupZuTEGxaRjZIufcY=; b=p2/hedTi8rDsVJJskes+AiopOS0/VYtQ/i/AOwxPp15OZ4tHLSCotBBY6j5K+PMxxa BPumUU1Ah+VfNIajsgwoUKR70qnLgkgbhMyNsiF3qgYB6JXCxzF4lFnDQ7M+5A7U2whI nWmBhlcYqkXAw4XRmhGoRloFENx+LsdPapjHoyfzcGSe7xXgDUaUW048vCd4OCeFEWm9 WF08kkx/A8bDGsLjzXvLosM02sLLiA/wLYBP1/Xk5xmJUijt1ewfW9Shw3lSOsZXKzBJ 7Dt5TWbJhMQASkWzY3RV/bFgLNefN8LZdmfjoDJ5qu17GD4Oi6J6Cxe6Il0O7IjQFZsJ 9/tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733244108; x=1733848908; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=79YYTw4OLJH/nU0R7kGinztAGDupZuTEGxaRjZIufcY=; b=HULbbBdCKl1/CikJxb7k0NmNOuxyVvZJgMcGgrwHvmElmv4YnqBWYfEIoeCBwGnLSd 2LkgycKPgWin8ugogvdWkf0QLOEgZ0NhX3yNQJTTKdMuh5Go3n4ytAoRERwPNjWV3sWA iKV4mE4Xhww+Ql1X2dYlInA7icwGtFisEEpqq8wfylckqZgOuVQS4mX5d5NHEBpvJQ2U 2pNWr1+QFEVocUvfgEBg4D5+ocICvt5z71Xs1SwA7sQLj8AXRPsafEJbseVVZmGGbAjK jdqppoU20PaOikzf8qndKrxuhpCc4QJ/SgK2wKWzjS30AJSAnXojp2neLau/dae2gQmL C8Lg== X-Gm-Message-State: AOJu0YzemqO/4E+BDIYIeZ76V0JZD8WSA40q6NgCJphJIqvQKgFq95Vd PkxwwBvaEYTxhYm09KGmIVTyxVAGxn+RdLdQo4aGCp1ZEI/YPgPCW32d2iCOmgA= X-Gm-Gg: ASbGncv7KSsQHzT8rXlyycqYgBGStqxfMon+j7pzQXEUxSNKEsyrJA+CW6oQPdPwuUy 18mcMdbe2Q9ASBsPPmdjKGokqw32072lhbULPQLCh8HtXmBKC7KIQnMhrpdtzwk/EWZqWQw7euV sYPPcjmMNVGAndJwASP+m1qlyAHdoMFciDg4hCRrRShQtU+Dvk8trAojeO3l1dHj1ThzV0vD4Xm JOSAst2zGr5rbv3sY0C32EZ+5dzLG7F4hEGuy09JKgZkY0QfUiatDVSO3dvXQ9eN2NexmZwupaF PLMeLoR6Su8+/g== X-Google-Smtp-Source: AGHT+IESQkBNm3NGGmpXD3R9iAv+O3VG3UIwtvPMrzNoDzrMyo0u4WNNVUXmqMJ3+hGaEOr2LUgDGw== X-Received: by 2002:a05:651c:2210:b0:2fa:cdd1:4f16 with SMTP id 38308e7fff4ca-30009be4929mr19048471fa.14.1733244108166; Tue, 03 Dec 2024 08:41:48 -0800 (PST) Received: from brgl-uxlite.home (217.97.33.231.ipv4.supernova.orange.pl. [217.97.33.231]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3000b262f32sm2482161fa.4.2024.12.03.08.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 08:41:47 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Alexander Sverdlin Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Date: Tue, 3 Dec 2024 17:41:42 +0100 Message-ID: <20241203164143.29852-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bartosz Golaszewski For better build coverage, allow building the gpio-omap driver with COMPILE_TEST Kconfig option enabled. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 56fee58e281e7..fb923ccd79028 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -530,7 +530,7 @@ config GPIO_OCTEON config GPIO_OMAP tristate "TI OMAP GPIO support" if ARCH_OMAP2PLUS || COMPILE_TEST default y if ARCH_OMAP - depends on ARM + depends on ARM || COMPILE_TEST select GENERIC_IRQ_CHIP select GPIOLIB_IRQCHIP help From patchwork Tue Dec 3 16:41:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 847099 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27DC41F8AC9 for ; Tue, 3 Dec 2024 16:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733244112; cv=none; b=dRmnpaclKpcU5vLJlrSgJI/uvoCBycnYI54ZO3ETGCF/Ng6UGBPWvUcBrWXmpBoIqvlBgad4eXHzdqK4HVVCfCgmrTkvCLb2rVK8ZfGEYYC23TjOSChvzG8y1kUNboVm5O3vKAnP0MNyZEsMvwTprvPnCJmF5pP2vcEE5IV4Fq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733244112; c=relaxed/simple; bh=79lvtbvvn5WeBGU2jOePEenHhsByMveWov7DNrhlJkI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FLEyg75a3uwu1wbpAQma0hUGEP4utq489MqOWESXV7MxPA63hJjh2dO0QAi0iyx/2RgMvmSR3+XwqZzRyYouyfuvK0Bk+viOGlwNLQBI2OAv89/awSyGUTg6jG+qJzXGF69jD15SjZYy2vSAXAXQn/NTiNehFegDNMvWHjuXtwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=dG8ZLu4m; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="dG8ZLu4m" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2ffc80318c9so60388221fa.2 for ; Tue, 03 Dec 2024 08:41:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1733244109; x=1733848909; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E78siUumg37DyNEcnTfFgRjM1O430FWuRK5MEMvIBtg=; b=dG8ZLu4mlAbl7q7lRFVpfPhuaUNxxUL6RZmeXxS36WjwAQkU0T2S8C5rxQX8uuV3eU U4IlCSIVtrSZkmK+eurG1t7Yfmt0AqQGfgOQIygNpfgue0K9LUkVWEbNHSrmgaHMdEpi 6TXT9KZqhTJpeW9OIxRI28Bu1uFMkpG+3c+Y8QWVioIDmnYryMqFiuAbBHdzu8eJOG5E Pq3GueN/iS0GC5slvsgxlHJI+Pzz2Qgkl0vkCHZMPZa76PbjBrNoRxkaf+zm62I81izO mrJ1dsBk69P7wQitQyuJ/A/iuX62oP6nSS3nBKGqbtABMaFBXtHsc08HXF6D+L3I9swu zSag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733244109; x=1733848909; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E78siUumg37DyNEcnTfFgRjM1O430FWuRK5MEMvIBtg=; b=VFaYxtbEKVx0juTg9Vh/uM+Sg0KzexDIMgNc5BfvCyOWb1POsO3H/fgigRiEjAvslI nEiXUTqT+Am/t4mpqASvVhil1fd1HQjyLh+ty71nMF5OfgZ5zsa0m5L7wV9BkLstdP8y 7kdrMPswYCzeEPPE9JxPY6AwjTbG71gPvP7+G7xvGdkMX8y8yqnrqVvRQ6sg+RFAfyHC 8FcfgOOgVPmkGGdrXPt3HwHZYgLnkqNNLABM6AQ3Ve7sbK4ILTVln1wfo0eB0GW4FlCB 2a5XuoP2IjWZ888hDiIG23nsD/P4s9rK4U2MpEA2nMfdnCN+0TCUHXr9lPt/w4fWSzFT zkdA== X-Gm-Message-State: AOJu0YxXaNKugCytYty8/zMypl54zmBLQUL6/S7N1ejTDM5JoxrSLnM1 wey2CQfUE4lO4QeHrpHCdb1O7VXM+K0hYcovef8wsbvMrlakgmM4vEo92XWWD94= X-Gm-Gg: ASbGncsRch/GoO9PCopy51QYyHidS57mtoY0Gw8s6kGSsbPhywGJjR+FkwFdBloSg/F J+uN6dwg/k8hlMq21pNfneKCDbIEPjDggxAKzpyq7Pv8aBflhFnNNWlbWLB2lUs/UEqwyqkB+rV 6ujmBLjloyUdPd/NbrG7dtAvBm2ahhZHWC/7nuVF1TopEyR52gY0l/NeHPFDaAvDpGJ1fLTogsw XXGCGFiH+RV3/griinJOyK1PqOjT7hvK/Nx9AB7/AgFmSTbxaXfzoTaBxVDH9/kxBxzbS+Qbvy4 tEVgC3MnP9FFow== X-Google-Smtp-Source: AGHT+IFx8bRQqNDnslqD1KoTl7xzEuIl2AL3peCZQQRxuOaindczpYRpHJlgrK/K9HMSqBDkd6UiiQ== X-Received: by 2002:a2e:8e95:0:b0:300:1558:7db5 with SMTP id 38308e7fff4ca-30015587ffemr4110501fa.27.1733244109275; Tue, 03 Dec 2024 08:41:49 -0800 (PST) Received: from brgl-uxlite.home (217.97.33.231.ipv4.supernova.orange.pl. [217.97.33.231]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3000b262f32sm2482161fa.4.2024.12.03.08.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 08:41:48 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Alexander Sverdlin Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/2] gpio: omap: save two lines by using devm_clk_get_prepared() Date: Tue, 3 Dec 2024 17:41:43 +0100 Message-ID: <20241203164143.29852-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241203164143.29852-1-brgl@bgdev.pl> References: <20241203164143.29852-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bartosz Golaszewski We can drop the else branch if we get the clock already prepared using the relevant helper. Signed-off-by: Bartosz Golaszewski Reviewed-by: Alexander Sverdlin --- drivers/gpio/gpio-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 54c4bfdccf568..57d299d5d0b16 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1449,13 +1449,11 @@ static int omap_gpio_probe(struct platform_device *pdev) } if (bank->dbck_flag) { - bank->dbck = devm_clk_get(dev, "dbclk"); + bank->dbck = devm_clk_get_prepared(dev, "dbclk"); if (IS_ERR(bank->dbck)) { dev_err(dev, "Could not get gpio dbck. Disable debounce\n"); bank->dbck_flag = false; - } else { - clk_prepare(bank->dbck); } }