From patchwork Thu Dec 5 12:06:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 847722 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 DFE4A21772F for ; Thu, 5 Dec 2024 12:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733400382; cv=none; b=RyOdKy7mAr9GXF4YKMVDVWwikNRGOxfbQXKkW9eeskzsDqNVTAaZhlbY+hjfqMJCnVZNh7D2yslDOTk8Tvi1uanJxafHgZe6chJ+Sr6XOQ2GiyTycZpPD+Ar1HXGQ67G/VvxK92czi5idMSotEkqTUSN+EVw1+ujOJM7YPt2Rl4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733400382; c=relaxed/simple; bh=EHhGcMmIPZQlHvSzckeuvpUvnt/z4uItzGTV+aTrF4k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jysRl0irtUJNxsFcASeDHlHIHMqfNMUkmm49ZZ9mM8vlaHDPBVAeVt6oRmdiTL43+Bdm4e5+FpaGdGJmzmEywYYlElVeeVL0FhWAc9arx7hVWgNgCCFmdPROO3gRsKWuRw677ep7OwOozue95GQPURxyh9rM4z6J9VAv6KjMFMQ= 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=Q6zSpAwA; arc=none smtp.client-ip=209.85.221.45 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="Q6zSpAwA" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-385e1fcb0e1so432159f8f.2 for ; Thu, 05 Dec 2024 04:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1733400379; x=1734005179; 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=1IMlCojeP5q6YL2cpETJ1hIUJSlb4xwiIMaEqu2JuuU=; b=Q6zSpAwAVLkaZ0CB2Y8LfaPJymkU3+uj+LTIDJe0eqK0JB3k1oeLlxpEaELZ6sGeVn FwDQ5FmsHt61p7ENCDHyiKGYxnr1WDAMINMTJD0wJAQvPjbb2HCtx99dfjTN+7HIC/L6 PoEuvrXQH+xvJnV9r5fLTpkabaiNaMOcIStf5MpWjLOasmQSUPaMbts4Ouh2k/CPAjdX H3D1jhu9gVqeLkohSAA9pkFwHbb9bJCgsgtRU2B9mcBac9FtNXtQ25kHyxjeShQM3QcL PzWmsD2wnxjf7g3pHj9tym/T9QRljINXHloRNg5TqHQAyroq70HNMb7/GDSroklbZIuE Df6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733400379; x=1734005179; 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=1IMlCojeP5q6YL2cpETJ1hIUJSlb4xwiIMaEqu2JuuU=; b=A6dC8G6gI0C4TO42FM7lvWQ9ZVozrdXrFV7ZfXjn0CHukaIdSTJmISpMlTUKM5+OqL q7+MC9SNrqYV5lpRfCyr3l1qxhM5OIHwiaeefWF3ODG7mZ/0oNLU3RYHLAVCmfJLnddP yOOkpK48gZkKUe0VR25KJmhDWsu89UNgXWj9voVCqppTmY1JUa/ObTrY/xhWdevCPUZJ MvnzdDheTpO1IAilwAWQfdMzGqrXW6b51OjEJAwstPKYhRZaE54Gk2Wx1XBlGY4yjGCY /asIcWX7TznY+R5y4D7zGoYxnOtsD+wHBkN9+Io2dHz5iI0fjOIYe65sNlsF2fsW8Iui cTFg== X-Forwarded-Encrypted: i=1; AJvYcCWaIPGDtV6gqCgXIICmY6EjsXwyPyyqvOG5HajnJigMWhemkodoWbQv1TL9Cgg643otC2yCsIfoaex2@vger.kernel.org X-Gm-Message-State: AOJu0YxB/vXlE/7FeqP2qkFo0cAIrw+Gu0bM+FEfCS3KuplEMUlny+ZN PDcioC/35cVGQvTPogGFOGKsI0umRbaj3RtygPT9oUoJxMMk8TxU9zviKK6kp78= X-Gm-Gg: ASbGncuWv0GVmmg/xceJV5Djpoz1A5DySDU18D+2e4aa8TJ6ObY4GTtYFyijGHHV4iQ xYhdOqDKVH0Hdh6uyD3UYmUOX9aoU1I41EciOsLChH57tTBExNK5FdrPqo1snXzYman0Txifj4R AhXxQhkHWF5LbFg2dk/eHXcNkqGV3ZblFHoDagvvhuwxmOo+cRS7jcTrFcS/CJb1pOVMFgJDYOr mTu1bVYKmoO53XW5KOZBGDXkrzh8rLrJyEbf4YfmmnRwr+u X-Google-Smtp-Source: AGHT+IF+ZO5Y2Gp4nFlsAx+6No4w7F187R8MDxdYO39Sc8nWC0dgPyV0mOjPzWTk8+ryT1t9Q6houg== X-Received: by 2002:a05:6000:20ca:b0:385:fc32:1ec3 with SMTP id ffacd0b85a97d-38607ac4f0emr4407515f8f.20.1733400378815; Thu, 05 Dec 2024 04:06:18 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:b496:c2c8:33f:e860]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434da113508sm21934095e9.35.2024.12.05.04.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 04:06:18 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , Andrew Davis , 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 , Alexander Sverdlin Subject: [PATCH v2 1/2] gpio: omap: allow building the module with COMPILE_TEST=y Date: Thu, 5 Dec 2024 13:06:09 +0100 Message-ID: <20241205120610.40644-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-omap@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. While at it: simplify the dependencies and drop the dependency on ARM as it's already implied by ARCH_OMAP. Reviewed-by: Alexander Sverdlin Signed-off-by: Bartosz Golaszewski --- Changes in v2: - rework Kconfig dependencies drivers/gpio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 56fee58e281e7..d87b3d99f8f7a 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -528,9 +528,9 @@ config GPIO_OCTEON family of SOCs. config GPIO_OMAP - tristate "TI OMAP GPIO support" if ARCH_OMAP2PLUS || COMPILE_TEST + tristate "TI OMAP GPIO support" + depends on ARCH_OMAP || COMPILE_TEST default y if ARCH_OMAP - depends on ARM select GENERIC_IRQ_CHIP select GPIOLIB_IRQCHIP help From patchwork Thu Dec 5 12:06:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 847992 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 B370021773E for ; Thu, 5 Dec 2024 12:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733400383; cv=none; b=CYsSszmIvm26Y+2L2Uw2fKBi+RHabT2RpbMaQUiStJ30W+XSYYkaAKqQ7sLROdRv26gHOcme27sSrKTsC8qHVcJA/2Dkmri7l4XPiEIG0hQzLSvmKxhxd4sKFRJL6VcoD5w5ess30Ru7e+VSsndmzEWsna1w0w3j1UI61gqjOwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733400383; c=relaxed/simple; bh=Bn5nh3l4ebh5/olUofQ4qdBb2ptYnUXgTMoMswxG7Xk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rw39j5JMPPyEijgzQcISaa4Ty6fb2p0zzutV53+W9tbT+OokgXwlisWkLLXVsx4ZbIVccKWdfXNtsiwUOxabVcQN0wFdK+u7EMje35vowILlXhvjZEx528SA7Vk9bxSPG8K8VW6YtRCAWz2iW9M+BWQ0NRR2kh8dicicm3zGvN8= 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=r+XJP+7Q; arc=none smtp.client-ip=209.85.221.52 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="r+XJP+7Q" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-385eed29d17so725377f8f.0 for ; Thu, 05 Dec 2024 04:06:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1733400380; x=1734005180; 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=ZUEfRaEMpC37FH4e73tDnuIDcsomn+OI0n1MlB9szUo=; b=r+XJP+7QXzi2npInt0NWAwuYM2oUIaBnB6FjrkJYZvmRk31ygCtrV7k/BeeJUO4EfC rXixwztz7T7Y8nFZvY6d+RlzvAVtw/B8TIfyIk5KbkfHFf5uBdzr7zr+F88N8XiauQwJ RQioPk5T7pptwxQTQBn2blsxdiutb1oyffqqNgGhFwhpYmmdnwAllBZyMf9kt1U9OsS3 DS1E/oNP9WAdmDwwlgIeLi0m5PCpz4enbYlQpkepTWIbF36ApTD04Y100NbvqbzeRRpp LZcREr+70eRGJie6ToPLPM2VpbqnyetpuFThN7Vt6Cfmoax4qKr3hnQ5blcXR5s98kGk 7Vcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733400380; x=1734005180; 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=ZUEfRaEMpC37FH4e73tDnuIDcsomn+OI0n1MlB9szUo=; b=FYscXc++AhRUWnScFfp5cuEr/wGpMcVWWadrNiewLhKnQ8hOty5Zwz+VKPW6NmTktZ okqNHet6OWNUexb8f0hAQdt95oSFy/SGuRC8xoxAsKGcC/WxzcCuKjaVMy007Bhyq+Hk t1PNTggkyBtJHWPEy7bJtM4Je+shJ7jsSFsewzvYjqMUR9T45TbUTEg0CU6vuflaMFej UwbM4mS0o4cGrzjyE7KKOQtcEL/YsyDEedr1AJrqUbMqtoM/ODzwSk+fFZ7r736CqYlL sJe6Pwea0qt8V00nYWEWUSdAmn5FVfdDhHnsr4L49Xpa1dr58sJZrMKxARVFNV8B79+T WOYQ== X-Forwarded-Encrypted: i=1; AJvYcCWaXPoBgQkJolhhPw59ZVGV3TtB8jZ45GjE68I7QhoU7vGCxH5tr+yTX9RZAn6kxz8pqphQe3euJcT6@vger.kernel.org X-Gm-Message-State: AOJu0Yw/WrqKliIBr9axkloCL9DPiQW/86fFDamuADsMm9bDHKksSTGL jMJeKjm9E1f87m5l5LNL5MBQWP+qoPnQWD1LZLub0aMXuNhtyqir2ZI9/s1tP14= X-Gm-Gg: ASbGncuPMnV9qHZJiYGoWJwIMJiB1QPTncG0TfjVymDvb4Ccd/fjE3FpWQboaWcivC7 QRkWf0FeYiGCmizMrhnR0WwgAAghymLfvCRMLYxL9FzBotaojD/EN3PY7Thehk+M+qbzQFbZcGD MNPgmnAuPl09Md8wvCXfRksdtMdl83L4xH7NjvxRPSxpE2I0SSZlbqa2VGFvykY4AbjEFfbovn9 fUXQ27ruF/f2K4xIR0x580WN3A1mEcZsL3hX7Y5Pu7M1lME X-Google-Smtp-Source: AGHT+IF+ZQJT8y1BDmiiQQKVW9pOPfo74S02/fDg2OSwbblovWA/gnmYx8QoRpzq3stAqcTA8YOZ3A== X-Received: by 2002:a5d:5f45:0:b0:385:fa26:f0d8 with SMTP id ffacd0b85a97d-385fd3f20b9mr7586700f8f.8.1733400379667; Thu, 05 Dec 2024 04:06:19 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:b496:c2c8:33f:e860]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434da113508sm21934095e9.35.2024.12.05.04.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 04:06:19 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , Andrew Davis , 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 , Alexander Sverdlin Subject: [PATCH v2 2/2] gpio: omap: save two lines by using devm_clk_get_prepared() Date: Thu, 5 Dec 2024 13:06:10 +0100 Message-ID: <20241205120610.40644-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241205120610.40644-1-brgl@bgdev.pl> References: <20241205120610.40644-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-omap@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. Reviewed-by: Alexander Sverdlin Signed-off-by: Bartosz Golaszewski --- 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); } }