From patchwork Mon Sep 2 13:30:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13787307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1E1FCD13CF for ; Mon, 2 Sep 2024 13:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JeERiVN2oIkzAFy4MEh5DuiasAZ7ilk+Ri2ju8LIAwU=; b=pVpHnR8jxGA0AuGaY3GLgUiIQY zhMbroZ8bWmk+PcMoDf9e76NRAFgvFcltAp3vn+qUg0hLJd6dcdi/Bj/vV/O9AQ3rmXAwZyBy6ZvL BVjzyAuLRkV/2GV7/sPwi3Mzwawy1+GmNbL7AZbkuJSOI0rvniMGjSxG7nfEcXp4P2oWLd+7LnpV2 YLd4SksVtGI8HDttoiRqm1nTC4B+NzEDFCxdG3H7TkW7Vkcm5K4jkcY+u78Nm20hXLj53ADc8oaZP qt/9E1xfieN7rUucAKC60TPca32n83sUotG8uzv7eoewfxQJAjT9UmHXvMFMysjK4KWYhy18n0Wt6 bvNWCr+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl7Bm-0000000EVeY-02Fr; Mon, 02 Sep 2024 13:33:50 +0000 Received: from mgamail.intel.com ([198.175.65.13]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl7A2-0000000EV86-31No for linux-arm-kernel@lists.infradead.org; Mon, 02 Sep 2024 13:32:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725283923; x=1756819923; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f+HzvJdgV9PfmdoJ0kwbhBMaeKBv9YJV29ZR+z0+n+c=; b=EuGjUvO1Zq1nqB+iF7Qcz+QIN7F5AmbdNyNvMtHCcYKnpJOakRgCNOwR 16r2QyO2twtjG5BBiC38Q8663nPPYIRiv4Jviecz9In9hdpjug5KaFXN/ lUflovU371tBPiUUMfy5QAOOqv0eX6bTVJkJDrYmvaa3DR/TuMdFnNJOx Ga+kSnQziSTHO+i/8seb7ACSzdipuyCa5+yWaHi2jU+ydLGdPv2Vgml2H rnS8Q8hmp5nta1zeM7qFVpqUv22ZBsHWWaHneNH+oC2d1hBqywKPucxLH QpyImzzxzXuNtlBHpfeD8/vSbFjS3kZnXB9FQTW6RIa7Wr43A/PaHc0HF Q==; X-CSE-ConnectionGUID: a/Syg4OxR8a+51ueZPg+pA== X-CSE-MsgGUID: 5i9JNdBTSHW2y3TQqKYr2Q== X-IronPort-AV: E=McAfee;i="6700,10204,11183"; a="35022565" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="35022565" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 06:32:02 -0700 X-CSE-ConnectionGUID: 8M/PgchhQveOGHNJhOHeFw== X-CSE-MsgGUID: 6hIwSaeFQmqwfnCItnBdhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="65114778" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa007.jf.intel.com with ESMTP; 02 Sep 2024 06:31:59 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 669EC48D; Mon, 02 Sep 2024 16:31:58 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Maxime Coquelin , Alexandre Torgue Subject: [PATCH v1 4/5] gpio: stmpe: Make use of device properties Date: Mon, 2 Sep 2024 16:30:43 +0300 Message-ID: <20240902133148.2569486-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240902133148.2569486-1-andriy.shevchenko@linux.intel.com> References: <20240902133148.2569486-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240902_063202_821661_AFA8A742 X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/gpio/gpio-stmpe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index 7f2911c478ea..c1fb06925e09 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c @@ -11,8 +11,8 @@ #include #include #include -#include #include +#include #include #include @@ -465,7 +465,6 @@ static int stmpe_gpio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct stmpe *stmpe = dev_get_drvdata(dev->parent); - struct device_node *np = dev->of_node; struct stmpe_gpio *stmpe_gpio; int ret, irq; @@ -489,8 +488,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev) if (IS_ENABLED(CONFIG_DEBUG_FS)) stmpe_gpio->chip.dbg_show = stmpe_dbg_show; - of_property_read_u32(np, "st,norequest-mask", - &stmpe_gpio->norequest_mask); + device_property_read_u32(dev, "st,norequest-mask", &stmpe_gpio->norequest_mask); ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO); if (ret)