From mboxrd@z Thu Jan 1 00:00:00 1970 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 1B22B27473 for ; Thu, 25 Apr 2024 06:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714025705; cv=none; b=Zw7Z2PnvA18jPRM9tSdpqo5aIG5FgodMPS96Gx9sAMrCtpF16HC02PayLQHVOjgmAdFSe/S8fZWK9zzNUXXgjRrxTTCiJGdlpmfyKsfvipoP4QxBzEbjluw90wYAlIpfSqTswnYYrXUVXtWZsMgMf56a4SmgPefWSDZ/N0oRFgk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714025705; c=relaxed/simple; bh=KsjKRFHHKQ+0GZOnUi9xLCWM4ubx9cXXQiLPw7we0eA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mXopc4gaHqVXIMMsLmkrI6KapI5pvFQ/83DNSLsIVqGtIQxdeOQwrvDtF6DIMbw3c39prg3j/ihSviM7ER5S1A2nlLQtfohZv3tWp21xRGFkn9PnNwziiaa5cdeMnyMZDDh0tPihEek/74KXqr/xlwOR4/bfvZxSjxYiSE7wopE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 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 1rzsNW-0005pe-V0; Thu, 25 Apr 2024 08:14:42 +0200 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 1rzsNT-00EDGW-EW; Thu, 25 Apr 2024 08:14:39 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rzsNT-008Mht-17; Thu, 25 Apr 2024 08:14:39 +0200 Date: Thu, 25 Apr 2024 08:14:39 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Xilin Wu , Konrad Dybcio Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Junhao Xie , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Bjorn Andersson , Tengfei Fan , Molly Sophia , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 02/10] pwm: Add SI-EN SN3112 PWM support Message-ID: References: <20240424-ayn-odin2-initial-v1-0-e0aa05c991fd@gmail.com> <20240424-ayn-odin2-initial-v1-2-e0aa05c991fd@gmail.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="rl24wix7isqmyofu" Content-Disposition: inline In-Reply-To: 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 --rl24wix7isqmyofu Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Wed, Apr 24, 2024 at 09:37:25PM +0200, Konrad Dybcio wrote: > On 4/24/24 17:29, Xilin Wu via B4 Relay wrote: > > + > > + /* use random value to apply changes */ > > + ret =3D sn3112_write_reg(priv, SN3112_REG_APPLY, 0x66); >=20 > "a random value"? sounds suspicious.. I smiled about that one, too, remembering https://xkcd.com/221/ > [...] > > +#if IS_ENABLED(CONFIG_GPIOLIB) > > + /* enable hardware shutdown pin */ > > + if (priv->sdb) > > + gpiod_set_value(priv->sdb, 1); > > +#endif > > + > > + /* power-off sn5112 power vdd */ > > + regulator_disable(priv->vdd); > > + > > + pwmchip_remove(chip); >=20 > devm_pwmchip_add? Note using devm_xyz only works if all requests before are also using devm. (There are a few exceptions, but these need proper thinking and extensive commenting.) Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --rl24wix7isqmyofu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYp9M4ACgkQj4D7WH0S /k5jTgf+JqJAnfN3fXmdz5yWJWeCDGj4DZTK3E0EJ2lu7asHWc+Pp6fM19DKN/F0 dsr14eDwjo1po1ptkFeRa04QeB7yeqMay3j0d5X4XUOm/SIHEI2Mn/ky5ZlVOwr7 ciorY8ICvuZ4YI/4306YGVmlbcndaA9ubGwykp0c9JYUqdSMWgwBGy4dVqHoKPmR RiM2SBTJAVd5Qw2LmSMMZ+uU25dWYCiM4eHrkbphTMhYItgqvTWkZhiTEdDVmU/p 2RqsoyKgfJKcMfW8eF31vZd7qkRjPErqQU76uzhW0Cm9nPDJERrXkkB+fGEzOcAh 6ros37wvCLEtFIp5fA2kOsh/PhCMeQ== =Hs3D -----END PGP SIGNATURE----- --rl24wix7isqmyofu--