From mboxrd@z Thu Jan 1 00:00:00 1970 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 CACDAC3DA7F for ; Sat, 10 Aug 2024 17:03:40 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p9otSq/G++MljTI6MYtIdwKTfQKcFEsWO6hxXKQDqeg=; b=FB1wOKs4rII88RX7+GnoeTI5Zm nalkl+ufOerVgXOI+YrnGP64fYuVmfwDTR0wx/tmyWZm1g3bUe9bPKq53kftgwC9kisM6Y5qNX+8J h2yWZNyrGDFcBG92UBQbS+IMyLssBAqIZXe/I2Ge/HLNUa2BZLARG9VzMYsENic5cSJVXKNjTVei7 OdR9JBRF5iJckofFxIaeDld3tmHH3CvTa1rBxOC6xrodRUw/pDssbeh4pcbFuw66TMS/u+w2yZli4 xGkIn4W2gbDIlV0F6vVbBIlyk+ZL3ZP5d3F5gI6TtT5+I6MRPONAkMwVJGgXzi0Y+OznBC2R9DtMn 6UWVB7rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1scpUz-0000000EN2v-1iYl; Sat, 10 Aug 2024 17:03:25 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1scpUO-0000000EN1F-3Ppd for linux-arm-kernel@lists.infradead.org; Sat, 10 Aug 2024 17:02:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 5A8B8CE092A; Sat, 10 Aug 2024 17:02:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFAF5C32781; Sat, 10 Aug 2024 17:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723309363; bh=mDQTTL0Iiqf0Z+l4V0xWPwMG4F9xVJeUOoTlBU4qFRI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bYCks6sjezumYBjC7nIuWJecjTLP/6vtR67eh0gvr6ruVA9yUpEebCqchEmhodIBi GaOSa2TGMDp5nNq6kHgc1viy3tdktgPmrI3VVZrXGAxAnvabvpJTXUXFT5nbtItCRz sl7sFF5cBKzc7NwlHmt1Nm1XH06YwkjdBSCtdSuTmszypF6U8Psd2ZvxBG/LR275fU jV+Iq23fbNk7MEk540iRuZw52db04WctX1qHcdorIrjOXKrlUDOGBMLZe39P/OUJYb DSrG0HCgI2/66QqpqziW3nFSstDX3ekdZ+dLGdnZGR9Uog/Itv5PWi+jIDf0TsOLWY 47dCa5BnCHrvg== Date: Sat, 10 Aug 2024 19:02:38 +0200 From: Lorenzo Bianconi To: Krzysztof Kozlowski Cc: linux-pwm@vger.kernel.org, ukleinek@kernel.org, lorenzo.bianconi83@gmail.com, krzk+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, upstream@airoha.com, angelogioacchino.delregno@collabora.com, benjamin.larsson@genexis.eu, conor+dt@kernel.org, ansuelsmth@gmail.com Subject: Re: [PATCH 2/2] pwm: airoha: Add support for EN7581 SoC Message-ID: References: <1f8905b0-aff6-4932-b936-191aa5529f0e@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VXtAOg5aaeAuFy7/" Content-Disposition: inline In-Reply-To: <1f8905b0-aff6-4932-b936-191aa5529f0e@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240810_100249_237532_FA8C4146 X-CRM114-Status: GOOD ( 23.76 ) 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 --VXtAOg5aaeAuFy7/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On 10/08/2024 06:48, Lorenzo Bianconi wrote: > > From: Benjamin Larsson > >=20 > > Introduce driver for PWM module available on EN7581 SoC. > >=20 > > Signed-off-by: Benjamin Larsson > > Co-developed-by: Lorenzo Bianconi > > Signed-off-by: Lorenzo Bianconi > > --- >=20 >=20 > ... >=20 > > + > > +static void airoha_pwm_config_flash_map(struct airoha_pwm *pc, > > + unsigned int hwpwm, int index) > > +{ > > + u32 addr, mask, val; > > + > > + if (hwpwm < PWM_NUM_GPIO) { > > + addr =3D REG_GPIO_FLASH_MAP(hwpwm / 8); > > + } else { > > + addr =3D REG_SIPO_FLASH_MAP(hwpwm / 8); > > + hwpwm -=3D PWM_NUM_GPIO; > > + } > > + > > + if (index < 0) { > > + /* Change of waveform takes effect immediately but >=20 > This and other comments should be not netdev-style but general Linux styl= e. ack, I will fix them in v2. >=20 > > + * disabling has some delay so to prevent glitching > > + * only the enable bit is touched when disabling > > + */ > > + airoha_pwm_flash_clear(pc, addr, GPIO_FLASH_EN(hwpwm % 8)); > > + return; >=20 > ... >=20 >=20 > > + > > +static const struct of_device_id airoha_pwm_of_match[] =3D { > > + { .compatible =3D "airoha,en7581-pwm" }, > > + { /* sentinel */ } > > +}; > > +MODULE_DEVICE_TABLE(of, airoha_pwm_of_match); > > + > > +static struct platform_driver airoha_pwm_driver =3D { > > + .driver =3D { > > + .name =3D "airoha-pwm", > > + .of_match_table =3D airoha_pwm_of_match, > > + }, > > + .probe =3D airoha_pwm_probe, > > +}; > > +module_platform_driver(airoha_pwm_driver); > > + > > +MODULE_ALIAS("platform:airoha-pwm"); >=20 > You should not need MODULE_ALIAS() in normal cases. If you need it, > usually it means your device ID table is wrong (e.g. misses either > entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute > for incomplete ID table. >=20 > Especially that it does not match compatible, so you cannot use excuse > module autoloading does not work for given OF node... ack, I will fix it in v2. Regards, Lorenzo >=20 >=20 > Best regards, > Krzysztof >=20 --VXtAOg5aaeAuFy7/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZredLAAKCRA6cBh0uS2t rEk4AP0eoyOjcR6w8+t/ov1LaRJlnHPLFWKynjHtxGsq/0aqQwD/UNpYf+i4orFa 3f0e2DGg17yh6Fd8YtjEHMmPc7QPbQ4= =M7tX -----END PGP SIGNATURE----- --VXtAOg5aaeAuFy7/--