From nobody Wed Apr 8 09:50:26 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25B33C38A2D for ; Mon, 24 Oct 2022 23:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbiJXXbx (ORCPT ); Mon, 24 Oct 2022 19:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbiJXXbc (ORCPT ); Mon, 24 Oct 2022 19:31:32 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8CC68E7AE; Mon, 24 Oct 2022 14:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1666644742; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xak1hhi2ZXgbcAJgD44C+AwcAkXWEuIXNRLIGjZ6/V8=; b=BT7X4ojFfsnA/z0K4xQ9xt0xKjIe+Y3K9UTqeUi22nPxgECWzdT8xZj6o3SR86Aj5EFyQp mA3k4mYgDmL/0+hpBIM1GI1AEz0Bt2Trq6p/O5Z9ArFc1cHm13OatrZtQKO7Vo7rwBTckm PGfl/xO9c5iQmmHRmm54wy2LFaSfIdw= From: Paul Cercueil To: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: od@opendingux.net, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Paul Cercueil Subject: [PATCH 3/5] pwm: jz4740: Force dependency on Device Tree Date: Mon, 24 Oct 2022 21:52:11 +0100 Message-Id: <20221024205213.327001-4-paul@crapouillou.net> In-Reply-To: <20221024205213.327001-1-paul@crapouillou.net> References: <20221024205213.327001-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Ingenic SoCs all require CONFIG_OF, so there is no case where we want to use this driver without CONFIG_OF. Signed-off-by: Paul Cercueil Acked-by: Uwe Kleine-K=C3=B6nig --- drivers/pwm/Kconfig | 2 +- drivers/pwm/pwm-jz4740.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 60d13a949bc5..1fe420a45f91 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -283,7 +283,7 @@ config PWM_IQS620A config PWM_JZ4740 tristate "Ingenic JZ47xx PWM support" depends on MIPS || COMPILE_TEST - depends on COMMON_CLK + depends on COMMON_CLK && OF select MFD_SYSCON help Generic PWM framework driver for Ingenic JZ47xx based diff --git a/drivers/pwm/pwm-jz4740.c b/drivers/pwm/pwm-jz4740.c index 65462a0052af..c0afc0c316a8 100644 --- a/drivers/pwm/pwm-jz4740.c +++ b/drivers/pwm/pwm-jz4740.c @@ -269,19 +269,18 @@ static int jz4740_pwm_probe(struct platform_device *p= dev) return devm_pwmchip_add(dev, &jz4740->chip); } =20 -static const struct soc_info __maybe_unused jz4740_soc_info =3D { +static const struct soc_info jz4740_soc_info =3D { .num_pwms =3D 8, }; =20 -static const struct soc_info __maybe_unused jz4725b_soc_info =3D { +static const struct soc_info jz4725b_soc_info =3D { .num_pwms =3D 6, }; =20 -static const struct soc_info __maybe_unused x1000_soc_info =3D { +static const struct soc_info x1000_soc_info =3D { .num_pwms =3D 5, }; =20 -#ifdef CONFIG_OF static const struct of_device_id jz4740_pwm_dt_ids[] =3D { { .compatible =3D "ingenic,jz4740-pwm", .data =3D &jz4740_soc_info }, { .compatible =3D "ingenic,jz4725b-pwm", .data =3D &jz4725b_soc_info }, @@ -289,12 +288,11 @@ static const struct of_device_id jz4740_pwm_dt_ids[] = =3D { {}, }; MODULE_DEVICE_TABLE(of, jz4740_pwm_dt_ids); -#endif =20 static struct platform_driver jz4740_pwm_driver =3D { .driver =3D { .name =3D "jz4740-pwm", - .of_match_table =3D of_match_ptr(jz4740_pwm_dt_ids), + .of_match_table =3D jz4740_pwm_dt_ids, }, .probe =3D jz4740_pwm_probe, }; --=20 2.35.1