Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7987904rdb; Thu, 4 Jan 2024 14:41:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVGVVTAlIQuS0nxpcigM1C6MhbA6RbNSfA/es+8oKFdHGkVI+NkKZKRQNvjKk68Xtjk3on X-Received: by 2002:a17:902:c40c:b0:1d4:3aa8:fa37 with SMTP id k12-20020a170902c40c00b001d43aa8fa37mr1799674plk.29.1704408066793; Thu, 04 Jan 2024 14:41:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704408066; cv=none; d=google.com; s=arc-20160816; b=VSNmlIzZO5bDnnP5xbTdGyKNPhg3EAraTkYiPI4zZK4AjIkUtoDU7/syvOt1E74fcd fOBT6YOpOExoZvVgq9pbmOq8n5aKzgLc8QbgzZ8vbqx3PDDYzHr3X7YAY0Owt4omyN7g WXF1rC1SWZ5IUqmlu003aVqOA+dK1HqjSwAmxMTOKuT0+HzAYbfts4K6Dn3DoZl36Hv0 eZP75znBRaSTCEfM9bmoN+TodS5LjqjQqLx4Ms9M9aND4V3pvoK4X8OpTH2gXyQMKqBe pi2zGdUeiAVyNyIiKtn97x3CHaz5qMFhqK89rclto7QXzL4cOJEAD1LiHL7tmqSZlOh9 UdXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=XkuE4z2OSdDIBy2HiSUbufyGgHXKkLvWmZYLaoCgSfA=; fh=bLSaacV+JNFxQmNbLDTGg8GHxFdkKXVwBNQB5K8M4gM=; b=ChHB1ae3RGxGPB2QDEzmAixhEmqf0HhUtL+8t3Nb3hZvUpRPJov/9NZkVLOSwuL9my WVHRnFJKGwIbovt+7f+Cu7NlWFm99TPadH6cWee8nWPdOCa/LwSCth5uMDQxr2TyONTu flwtoyVYwjRDjk6trgZDgsj2ycLcVQc2eBvNsqYq1w9O8sU87yzERnoAyb3EnWIInI7d +CksWyE+pWT2GdAcvULV4SLJo6btH7gsO3QCKxhge06+Wrc8WWvEWjCfPwr29iDm9P4o agXMSNvGm6HyeNzNAt5igd5v9xaC89/glZSm59T0u8PafaMWf8rVJC22+25cmGuBPjxS 5KNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-17297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17297-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h13-20020a170902f54d00b001d379d38cccsi203713plf.162.2024.01.04.14.41.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 14:41:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-17297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17297-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1A928283941 for ; Thu, 4 Jan 2024 22:41:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EFD32CCDA; Thu, 4 Jan 2024 22:41:02 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA6F72C864 for ; Thu, 4 Jan 2024 22:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rLWOR-0001yE-9T; Thu, 04 Jan 2024 23:40:51 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rLWOO-000SX9-Bn; Thu, 04 Jan 2024 23:40:48 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rLWOO-003eP0-0q; Thu, 04 Jan 2024 23:40:48 +0100 Date: Thu, 4 Jan 2024 23:40:48 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: William Qiu Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org, Emil Renner Berthing , Rob Herring , Thierry Reding , Philipp Zabel , Krzysztof Kozlowski , Conor Dooley , Hal Feng , Paul Walmsley , Palmer Dabbelt , Albert Ou Subject: Re: [PATCH v10 2/4] pwm: opencores: Add PWM driver support Message-ID: References: <20231222094548.54103-1-william.qiu@starfivetech.com> <20231222094548.54103-3-william.qiu@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e6p2envurvrpju5r" Content-Disposition: inline In-Reply-To: <20231222094548.54103-3-william.qiu@starfivetech.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --e6p2envurvrpju5r Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello again, On Fri, Dec 22, 2023 at 05:45:46PM +0800, William Qiu wrote: > +static const struct ocores_pwm_data jh7100_pwm_data =3D { > + .get_ch_base =3D starfive_jh71x0_get_ch_base, > +}; > + > +static const struct ocores_pwm_data jh7110_pwm_data =3D { > + .get_ch_base =3D starfive_jh71x0_get_ch_base, > +}; > + > +static const struct of_device_id ocores_pwm_of_match[] =3D { > + { .compatible =3D "opencores,pwm-v1" }, > + { .compatible =3D "starfive,jh7100-pwm", .data =3D &jh7100_pwm_data}, > + { .compatible =3D "starfive,jh7110-pwm", .data =3D &jh7110_pwm_data}, > + { /* sentinel */ } Looking at the binding compatible =3D "opencores,pwm-v1"; isn't a valid configuration. If that is indeed the case and you always have either starfive,jh7100-pwm or starfive,jh7110-pwm, you can drop the logic to only use starfive_jh71x0_get_ch_base conditionally. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --e6p2envurvrpju5r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmWXM+8ACgkQj4D7WH0S /k5eqwf7BKGgncVgVmHDNmQfHHTNNfkRf4UToW1IVJgCDbsLtDvbBFJbN5tzdhb+ cL/gFmPxhwJBZ2rRDGTa0/5EBBkCfwVdIQ8jj1wqJEyx0bQuvxUKdNIVCjYtmvFJ B0dSDdrYqvSQK3v5gHEYGfi1TOXWJ0P9LdIZxiIRAyF8eDfPVAHnvM3JhPxnkoX9 d0jC11XgWfuS/7PWg17j45Kr25+6WQD0gXxHTR+jFH3srzZPsgTjzoN1pUrMUUvU 9zfN8xZtRy9EZOQCDV5s9eP3PdaTJc3hNkkD4MzdD9ObrxGbfvqvzMtAOG2aEmMm BtgpzOX0+0zOrVcwSvAO5Tp7FW3mJg== =hIsf -----END PGP SIGNATURE----- --e6p2envurvrpju5r--