From patchwork Mon Oct 24 20:52:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp706964wru; Mon, 24 Oct 2022 16:43:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7j6wxXvRec1lZS1R2gCjtOazX36S8Tif9CkW75LlFS2EA8dkb6UsaphnTiVPL0cqSoKEXR X-Received: by 2002:a17:902:a506:b0:186:8272:bb50 with SMTP id s6-20020a170902a50600b001868272bb50mr17936438plq.45.1666654991366; Mon, 24 Oct 2022 16:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666654991; cv=none; d=google.com; s=arc-20160816; b=iGlz6d1PsNgSN0wWsM3PTENDIcGUTZvz+efvjvRK0GzjVvdagjDMzHu257JUBnTSH/ R/LQ4gqEeEMmCWsqHSY0VmNyUkZdszkI5xKyDuB3flRJU1+ETZoH9k0oU08cvo8ISMY7 YTW0uRNU5t4sacxpFcLEwp3gJbsqm83hjlCXEQUoAlNjRfS4mqZiTIme6ktmQjSXLEaM 87Oo3wZcaAU+7KuPWbbpupTyXhvhT2f4qRWgTB8UraOEIM22uhuzn7gbN/YjgdJbeYaC CeHnta8QC/uL9KeZ+jLRkN+jwNwvb/xuRqVr5D5OKUl0P55ybeSI78E7KtkB3qs7nK5u CEXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xak1hhi2ZXgbcAJgD44C+AwcAkXWEuIXNRLIGjZ6/V8=; b=t8BS8b2y0/H0JfCKmx28Nmu7eXZKV7mavpdWrFwsx0mOWkQKJlQjY9O3e5B9qqkU3g ps+Y1akhd4pMqCFkBx3iwc7ah3X/RPnMJ0SlQqckYFmjeLkxNw2CeZDb+/MjZgBnsyYt +cdMgieWe6bt+CsbQ4f+6Spdo9WK19hnJ724q1GnV8UJLFbdxsl2ZHnuADv05oPCD9iN fxelwQgO10HZgxdVaIUGDcRKglTfeQdvQ0FSnPdpvDwTqOhM5WFBQJJEgMOZVJ5dIpjc PZin1wQMBOIm6eTutd83NKsZPXLdO6N30J1RF2McwiSYSPlSYzhFeOpgs/qh2PVjCFjh 7jEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=BT7X4ojF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a170902ecd200b00178b7f3b89esi1296076plh.352.2022.10.24.16.42.59; Mon, 24 Oct 2022 16:43:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=BT7X4ojF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231341AbiJXXbv (ORCPT + 99 others); Mon, 24 Oct 2022 19:31:51 -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_Kleine-K=C3=B6n?= =?utf-8?q?ig?= 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747614423940631836?= X-GMAIL-MSGID: =?utf-8?q?1747614423940631836?= 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önig --- 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 *pdev) return devm_pwmchip_add(dev, &jz4740->chip); } -static const struct soc_info __maybe_unused jz4740_soc_info = { +static const struct soc_info jz4740_soc_info = { .num_pwms = 8, }; -static const struct soc_info __maybe_unused jz4725b_soc_info = { +static const struct soc_info jz4725b_soc_info = { .num_pwms = 6, }; -static const struct soc_info __maybe_unused x1000_soc_info = { +static const struct soc_info x1000_soc_info = { .num_pwms = 5, }; -#ifdef CONFIG_OF static const struct of_device_id jz4740_pwm_dt_ids[] = { { .compatible = "ingenic,jz4740-pwm", .data = &jz4740_soc_info }, { .compatible = "ingenic,jz4725b-pwm", .data = &jz4725b_soc_info }, @@ -289,12 +288,11 @@ static const struct of_device_id jz4740_pwm_dt_ids[] = { {}, }; MODULE_DEVICE_TABLE(of, jz4740_pwm_dt_ids); -#endif static struct platform_driver jz4740_pwm_driver = { .driver = { .name = "jz4740-pwm", - .of_match_table = of_match_ptr(jz4740_pwm_dt_ids), + .of_match_table = jz4740_pwm_dt_ids, }, .probe = jz4740_pwm_probe, };