Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp902224lqd; Wed, 24 Apr 2024 23:15:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWAPmCczoyvgwLu20Obsu1Mlhx7N0gHyRwR8hZLeY/LZTbzn0VkSJVHf2OgCELs/5u9iYWYy/e2+lYISoNUMd8uXNZqLcOR4VOaWGe+Q== X-Google-Smtp-Source: AGHT+IHY4fRVdS82PBJaDd675t5B666oF0C2ba0YF6E1lOsrDmN+uE9+E6rJmt6mjVcvGOnZ3byn X-Received: by 2002:a05:622a:1311:b0:43a:3516:4135 with SMTP id v17-20020a05622a131100b0043a35164135mr3481646qtk.14.1714025709774; Wed, 24 Apr 2024 23:15:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714025709; cv=pass; d=google.com; s=arc-20160816; b=PmNwmhbdW86Ujhyk6RoPdsTN1yc+on/Ui3D5RvaTXsPZFKPGv1YE8MqdA3hX8BHdI7 KfmOWp+M2pJH2viM93eTqOXExNVBRUHhkNdyP6BVvEZOuTLmbkqneP/gcaQ/d4OxLppG XspLElMeUNdZ3s8tkZbeyMAabAQQnbi63sRdHm2A7oMhBrm/oW1fCdkw1gLuefmRGmke qlpiX29UVXSYs9s3AoUFsVJsxlq0CucD7OcdSjscRWBbrPnv7Kj91bGBLa/LK85qsD+K WEb/jpkk4Bxt3i/jl3pbUDdugohPEYLu75DnNIo7Wkr2KQNA5C6k9zdA6fllIRQnAM+B lyaA== ARC-Message-Signature: i=2; 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=XBYEWcmHkz2Bavn/OmgjsXp/UQYAiTt/ep1KlP63gCw=; fh=bJcYjL9cQPSluvMQ/yN5o/K8jpkJjMs9z4RwPX8K6us=; b=qiWcJrP70C6qfdFGdGgfD3YJH96fsE28yp4lanEQDJOwFPfGn4W4o67vpRCZ06SEar wHUUXnSJ4bP+j7eidHQgRR2H1TWZYPKI0Rjf5m3axj5kj2vmlKExoH66rD+WparvM9hV h1OULeThMiSJ/SPLYY9lz460KoUkPECE045HoG8RsW96iA+p0XpnyIHBbZc99pUUB3EH aIz2BNtzjFa6eO/Yq4WQ5XItKKfsfhgxxV8F0RSxqaIkbxqiSF+JdMjo1kVlUdUVuHLi jUZJuT9XVxP+fReHbJsAnxJ2iz4UxkrnEyFU4bi0s0azPwkJ4abT2WSH4D2b4pypseta RoHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-158056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158056-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ex17-20020a05622a519100b0043a433a6d14si1019338qtb.578.2024.04.24.23.15.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 23:15:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-158056-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158056-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 45CDE1C21048 for ; Thu, 25 Apr 2024 06:15:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D21CC3FB96; Thu, 25 Apr 2024 06:15:05 +0000 (UTC) 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--