From patchwork Mon Sep 30 09:11: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: 1990825 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=kh9BH74L; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=linux-gpio+bounces-10553-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XHFgP1NdGz1xsc for ; Mon, 30 Sep 2024 19:11:29 +1000 (AEST) 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 31F8A1C20383 for ; Mon, 30 Sep 2024 09:11:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1292D186E4A; Mon, 30 Sep 2024 09:11:22 +0000 (UTC) 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="kh9BH74L" X-Original-To: linux-gpio@vger.kernel.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.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 48100183CA7 for ; Mon, 30 Sep 2024 09:11:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727687481; cv=none; b=KGnRa+cv42hslqvnD/bItESKZceB6MqVP26mm1A7lh/18NUt91ONlHwqXTBaMH5W9EJfLfweZWjiBOaHlVPlQbtgT8NaAUpUBfhB6/7cKpcTPqXUSzzxRIDzdcwI4+7U2CQZqXhdKWOC8sevFNcV2+YepPMgmXlTxWNKXZsZIBg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727687481; c=relaxed/simple; bh=qDdYD6XtEzoE+bIvCc85PjknxnyK0Eqt2/xjj90H5dk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bVscTCjBzx5aPzTh9sI+aMWUVqvL4pPy0cpIJYnaPtDZnHPqSRflYUi5ouKqHCHnCS/mAwYtYM5Lbo8k+/9PZF1LVDPChya1fDT+NiSpbnwznD9xvG5A4SPtarIgRKO/1ggEzGPAiUdO1Pk0Dac1iDLpqgLm0CUKzUr0kQVrbww= 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=kh9BH74L; arc=none smtp.client-ip=209.85.128.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 Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42f56ad2afaso43200165e9.1 for ; Mon, 30 Sep 2024 02:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1727687477; x=1728292277; 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=c+AJ60vTnn4OfaHASmdMRI84bP+OXJuds8ClPyVwo7o=; b=kh9BH74LmMvj1ggri8qbrpl9WP6wsGmgDs01dFbaGQbC8avDQkOSmXOX6f5oOIq1PU mQWmbqeI+pfGuFl00iwh/NpdmVXy2Ek0tBaoxSOplR2BaSUxrHFZfi/0hmqwpOE0sQCF KN2giS4MdUVO/93HLG9tiImo5dsy0v8gx5sqNI4BK7IKwtyHGwQR5frcdscSJZGuApqA GywMcEhOlj4MW13fz1w0QXxhz1rnfCDG1KkzzGbQo9yhV0Czgc94pzLjWMGXtJ2xg/Qh ZHbCDTruU4VPN13XYvkSIOb0th2PreisZMaC+IcgqsgwGY2PS0qenhRFIbhW03jb1JIO +zDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727687477; x=1728292277; 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=c+AJ60vTnn4OfaHASmdMRI84bP+OXJuds8ClPyVwo7o=; b=OY+N+uIGgaEgtnj4wDTSqYRTZFdOJhB9ZjXF33a2tfGdN9fIa/YrezqrANhMFaV8Kk 2gHZHHsdvn7324R+oPB4YTbFA1wfE/eFeU5D1qOArzMW/OghBw5njoe9V6gkGQ6kR2QA b1pd4BLvgfr9K3ADPZKX/MN6J+Jzj49dn7NnQS4Xg37lK+XASvrS4SDDpacLC3m79Z1M JVTj2QKS+U6YwvVc7dEVMEP8nH8tyg1bhNfDVIijB3xt124DTZFsz85PPszH0+Syo6vE RoYR5fpUHd0WlU4pomSUC8rjST6upZ23JbHab27kbQ0gHPEcVvTVObXGSmiWqvyh0yto rCMg== X-Gm-Message-State: AOJu0YzaY7UxOtqYCV7/Po118KVeLTxbZqA4CKOFiOLeWs1mFJAFziBw DeyN2EEDuww6dkXGByQOyhJKU8zTFnAEWOBQzy7JeApnYb22QjocjMjhgMAP8Os= X-Google-Smtp-Source: AGHT+IEakmid4weMzgcB5hvS4fmSB9tjRPWOIxYXsK8WdO+Z/xh1QbooPSntbIPib3f58YLkywXBIA== X-Received: by 2002:a05:600c:198c:b0:426:6e9a:7a1e with SMTP id 5b1f17b1804b1-42f584a1d36mr104426815e9.35.1727687477578; Mon, 30 Sep 2024 02:11:17 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:8791:e3e5:a9ca:31a6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f57dec169sm97231595e9.21.2024.09.30.02.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 02:11:17 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 1/2] gpio: mvebu: allow building the module with COMPILE_TEST=y Date: Mon, 30 Sep 2024 11:11:10 +0200 Message-ID: <20240930091111.32010-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bartosz Golaszewski Make it possible to build the module when COMPILE_TEST is enabled for better build coverage. 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 d93cd4f722b4..98722e814e81 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -487,7 +487,7 @@ config GPIO_MT7621 config GPIO_MVEBU def_bool y - depends on PLAT_ORION || ARCH_MVEBU + depends on PLAT_ORION || ARCH_MVEBU || COMPILE_TEST depends on OF_GPIO select GENERIC_IRQ_CHIP select REGMAP_MMIO From patchwork Mon Sep 30 09:11:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 1990826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=a8kKzjjI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-gpio+bounces-10554-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XHFgX55KYz1xsc for ; Mon, 30 Sep 2024 19:11:36 +1000 (AEST) 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 194561F21B5C for ; Mon, 30 Sep 2024 09:11:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F5C8187FF7; Mon, 30 Sep 2024 09:11:22 +0000 (UTC) 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="a8kKzjjI" X-Original-To: linux-gpio@vger.kernel.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 F04A6186607 for ; Mon, 30 Sep 2024 09:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727687482; cv=none; b=UiEjrfuxDR7/570rs8+lcG8i8jwuG+rt1r/fsGEHu/JT76cnSMK3FTcTeJNYUVWTw5y3VieTM6TQ5lQqzG5WcFL8mxq+TyyaPEX6lU2MTAkW8Au+6TVL4GfQVQ7wK2z7dUxd5GMD2AOpVff0FbU5XD/hWmkGSg3tm4K4sX9vpYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727687482; c=relaxed/simple; bh=j9EAIuMKyTrCqRpm9ftCatgw8ZDHQY60UwldKloPxPU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lpbP90MzP1LzafOpVjX3GjGp6QEP05Gv+P5hpZq/EAPxLbetqt+QCe7upvGjjuSIb7Cxh86ImqWTkc0APzSEs+0lOMnwEHrbGDftAnr1l5bFuc4mcSQ8HZgD2LSZPDdxIWiCkUUmGWFQuOj6pAse6pIrERKU9lJfirlxPm8H3C8= 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=a8kKzjjI; arc=none smtp.client-ip=209.85.128.42 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 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42cbe624c59so32498275e9.3 for ; Mon, 30 Sep 2024 02:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1727687479; x=1728292279; 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=V8TgzjEbxQmEBqcqNz89bUaMH73B/lho563HHj9DR/A=; b=a8kKzjjI7fKQjo9EW+xZjsIhavRzIBuuh1InNdMLOHmtM+Jr0PwUuT8kgTHL7IZ8gn 4N5emYq6e26922zD09aWFvYXu/hzyTz3BH8o8n7JWjdeMpmGEPmfFU27tMZnBKlyvCpS AS66qQe+mj9zLZtULcIIFOlbcofW2N61QUj9LdfpdbF5Z0CsYKTr5ezVAswV2V5vh9X+ pSeBMPi9QBiznsMuOPZZzNmw8w467QR8o9wwfkM6XGN8MqaU4zjyZMHieWN1HxOWEofP MEdEHdv8kmQHaXqnjaRbJP4EqlukSziH7njZZtbI28s2EkYuGnjByBWov++TOk2K/t9d aGbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727687479; x=1728292279; 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=V8TgzjEbxQmEBqcqNz89bUaMH73B/lho563HHj9DR/A=; b=eGZ6MKorgIS1P0mNWPSFizRVXzy36vjP2fQT1uw8JTL+VVp/djislPbsdtah6bOyei X40OF1fe1VEpfjI9FmozS+7z7oH1isTMJ+w6n/GzxQyjN6n1/TLg23njA4rsiBM9OgDA 1OKdwd2z/JIBOXCqc+fayWhMkjazD2L2ZjqZmV91ZQajc1RW0/peINLrF1BwT8ZSYG1X uJ+y4yNurm4Uf+zIMF21Kr44Ta3He5tNGNlJTd4WW4FZ3lM6M+xFew0Mnq3SynsMsjPz +ND/8xmNeBpHc86tKAZGsyaFwOMMeTGcIe4xzgBDKgim3JvzcFwLBtwfdLmwxo0xZXCm t1iw== X-Gm-Message-State: AOJu0Yx4tYOrN2wJjAVY5m1pn2S1Aio0hSNLUeh2mWozU4JNqGwhzCbi 0xoWqpsHROVlL/obUheMC0+Ds19niAjqjy11QUV03N5OG4Zb1mdj7GJhWaehPJlaL3QkqBnpuD0 R X-Google-Smtp-Source: AGHT+IEYHlUOLizDws4a1V++OEulQgUTHwux4Adu9sDvknTQxwE7wgb6Uyq6xvXcmx3wSEs7BY9MXg== X-Received: by 2002:a05:600c:4f84:b0:42c:af06:71b with SMTP id 5b1f17b1804b1-42f6bec79b9mr10394105e9.28.1727687479348; Mon, 30 Sep 2024 02:11:19 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:8791:e3e5:a9ca:31a6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f57dec169sm97231595e9.21.2024.09.30.02.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 02:11:18 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/2] gpio: mvebu: use generic device properties Date: Mon, 30 Sep 2024 11:11:11 +0200 Message-ID: <20240930091111.32010-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240930091111.32010-1-brgl@bgdev.pl> References: <20240930091111.32010-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 OF-specific routines should not be used unless necessary. Generic device properties are preferred so switch to using them in the driver code. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-mvebu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index 8cfd3a89c018..5ffb332e9849 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -794,8 +794,8 @@ static int mvebu_pwm_probe(struct platform_device *pdev, u32 set; if (mvchip->soc_variant == MVEBU_GPIO_SOC_VARIANT_A8K) { - int ret = of_property_read_u32(dev->of_node, - "marvell,pwm-offset", &offset); + int ret = device_property_read_u32(dev, "marvell,pwm-offset", + &offset); if (ret < 0) return 0; } else { @@ -1106,7 +1106,7 @@ static int mvebu_gpio_probe_syscon(struct platform_device *pdev, if (IS_ERR(mvchip->regs)) return PTR_ERR(mvchip->regs); - if (of_property_read_u32(pdev->dev.of_node, "offset", &mvchip->offset)) + if (device_property_read_u32(&pdev->dev, "offset", &mvchip->offset)) return -EINVAL; return 0; @@ -1147,7 +1147,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mvchip); - if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) { + if (device_property_read_u32(&pdev->dev, "ngpios", &ngpios)) { dev_err(&pdev->dev, "Missing ngpios OF property\n"); return -ENODEV; }