Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1014666rdb; Wed, 24 Jan 2024 02:03:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/QJ2QbXUlgAFcTRdRRIG1qucxFcNkPysjyVKKXXSU+5vUbDVWgsfBA3Y9ylI8PQVjb7Gb X-Received: by 2002:ad4:5dc8:0:b0:685:55d:18b5 with SMTP id m8-20020ad45dc8000000b00685055d18b5mr3110086qvh.84.1706090639052; Wed, 24 Jan 2024 02:03:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706090639; cv=pass; d=google.com; s=arc-20160816; b=XRUkEeSCveeNVef7ZEz0+82Ixmkctz7z3XsZB9/oPMcRXvdurTbMwY8UGjeehLLUWc 9SGUf1E9C2WmhPNjQDbA6Db6HkOpRidl+aHSFZoNsaJKMLIhxqRH+1Opc5G/xG1Gv3q2 m+hIVXKVwOBF73zvWhKfiMLj7gn+umXBGrV+n/IiciTByW44jesHARGkeaX6JA0LMMep R3TwvoqrbbUUAX/hO4eL5N0Ly5o4gpApSufhs2A/qWNLxSl99vT2Mv3b4s+v7huYUIJY xcnUFp0h/KKLyQu5HERLumwq3VQ6vd+ebQBW+vSVsTTOHoY0QlN64CNp+aeNzlEJZtgp qsBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:dkim-signature; bh=ylAoGxhXjDFqaYPg56D086JPamwyHBJVeEcnnDZC84g=; fh=H3U0xlt7goOSAhUb4NN7kdWef7Oh5ZGxLLtPcSBLg6k=; b=v5150Z4aNvJpI4J5mmPVKaaeH1j92Ezt6af3ynXjnEUxXLQ+kwjBt3MoDaszScViml 4HG555oUCqBTZpNwwaGhW29yMbgYjlhsjjug/876v9j8yszEqP43j3tti8qEVno74/6J Ke+65Rv1YoD0ky9+5E5etk5aFBARJVN6tOE5kxqCwCr3xIfN1PM8wNVhznZtcM+d89F9 BgZ4RZUSVnxzMjmfqBTH02fRQCFHu8Jfg7DPgsg/ameog+7okR5IND4UntqpKdRzF1Eb r7sHUc7G30kvD9Y21UGQR5U3XZEuvWHb4cMUmiLZwegvhwZklVuNmkebLRDuzfl72gBU 50ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="JV/cXpqD"; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-36771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36771-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f14-20020a37ad0e000000b007839c2a65bdsi6828976qkm.328.2024.01.24.02.03.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 02:03:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="JV/cXpqD"; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-36771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36771-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 801701C22DFC for ; Wed, 24 Jan 2024 10:03:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3A4C18627; Wed, 24 Jan 2024 10:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="JV/cXpqD" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C114918EA5 for ; Wed, 24 Jan 2024 10:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706090629; cv=none; b=b4Grn5QTbUXy1gkV0sgvwoxARLnxTUD7V8tO6trbVW7TanlstIq3nggu26QWSGUyssR3yRiH7nH57WPVF2h8+KbKfb+X7tSC/F1L2WaN1qgS1Uxo0D9ds6Jrhgr/7YTznnsomsWYBVJylFM9lHNiSWBHuqTQhVOWvDx95G3eEww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706090629; c=relaxed/simple; bh=ZXjVtrptsshYOZMALm25l924Exv6V6VkuCmqSDIOzUg=; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID: MIME-Version:Content-Type; b=EWhbceEOjiXrwPCUFk0doFiNDpJU4XtWFHAxEpK/9xr6WCMDlBeXAmMk5ajLn5xN8jSAUS0o2uVIpF2qqgGhZmazqa8BonAFTSYkFqmUpoC+wFmWytU8RLQ9U4C1GolGdITrjwlspjmNMIQIKxFYJFxddXgA4beQN5VNfILQaVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=JV/cXpqD; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-40e87d07c07so66110245e9.1 for ; Wed, 24 Jan 2024 02:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706090625; x=1706695425; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=ylAoGxhXjDFqaYPg56D086JPamwyHBJVeEcnnDZC84g=; b=JV/cXpqDN0DoMrAy3nU5v8qSFLJHiel2VYe/wCQSC6he/zqqiFs3g1zmIFNT7w9Y4O bcZCj7mqwFcRN7pD4Rd81lJkR0PyvoX8ilWXLsfjOHcpQjUhmJlIefXycVv54XCzt+jP /qHgL8r6tJWLzaDoV6bFOCbCjW9/YcOm3j7fIGnJS39wpJh3npC8MYCG1I8ANLqdZ6wi 9eLGagoCevLNQeeIOQMR+V6OHwdmkmiVZh/N/n7t7RIbJ62Iq3Os2AxtyXZ93Xlsu4F3 2QC8uHzc5u2OTGbcPdkU88eeNHCUYNVXY5EIEpQ/M6ZrkX5Slfn3eV+R2zD6eUddVk4x mOYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706090625; x=1706695425; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ylAoGxhXjDFqaYPg56D086JPamwyHBJVeEcnnDZC84g=; b=iStnlfquViyOhw/Fs50BEe761an5ny6STTTdfUCQFWqQZSvp+68PhhoYWQXGx0O6Ks v27CCtBjEv5bi5VepZ/4rxsEC0dabTWGjUfBbTTQtl4RtQy+TCLgBuzd48Oeg5SeZYdF e/h/3qFrHU9Uaq0MLoPj8nAwUwt15e/2oxbS+s5hYHqxpPbOSHhkizQRdE70yUnJvs35 7vkRqoFgMH8UbU+uy7wmvTNg0fXXlW40/N3t8SxfMGg1PbkXD/0MD9ObNBriPmrYKfVW Fhp87cJzGFe38HLvropw+cueRPkWrhu4A2EqPHhyAJNFv7DZyEtCdAUC3XxF/fp9ujgO pmxg== X-Gm-Message-State: AOJu0YwIcc5vKZMungzHg7KNmXI1V+n5yJDX4rYukWMCAEGOau9gE1BN MNEJPbwAjYw09cjlQZFIUvn/pxYhruJl1ZTyN5srIXmPA+zwLBi8HmgOA+WggyQ= X-Received: by 2002:a05:600c:a44:b0:40e:6710:c147 with SMTP id c4-20020a05600c0a4400b0040e6710c147mr1079130wmq.98.1706090624943; Wed, 24 Jan 2024 02:03:44 -0800 (PST) Received: from localhost ([2a01:e0a:3c5:5fb1:d8b6:17b6:386f:c67b]) by smtp.gmail.com with ESMTPSA id g4-20020a05600c310400b0040e88d1422esm25142441wmo.31.2024.01.24.02.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 02:03:44 -0800 (PST) References: <20231222111658.832167-1-jbrunet@baylibre.com> <20231222111658.832167-6-jbrunet@baylibre.com> <1jttn3w0ja.fsf@starbuckisacylon.baylibre.com> User-agent: mu4e 1.10.8; emacs 29.1 From: Jerome Brunet To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: Jerome Brunet , Thierry Reding , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-pwm@vger.kernel.org, JunYi Zhao Subject: Re: [PATCH v4 5/6] pwm: meson: don't carry internal clock elements around Date: Wed, 24 Jan 2024 10:59:43 +0100 In-reply-to: Message-ID: <1jplxrvyin.fsf@starbuckisacylon.baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed 24 Jan 2024 at 10:48, Uwe Kleine-K=C3=B6nig wrote: > [[PGP Signed Part:Undecided]] > Hello Jerome, > > On Wed, Jan 24, 2024 at 10:16:17AM +0100, Jerome Brunet wrote: >> On Wed 24 Jan 2024 at 10:02, Uwe Kleine-K=C3=B6nig wrote: >> > On Fri, Dec 22, 2023 at 12:16:53PM +0100, Jerome Brunet wrote: >> >> @@ -442,6 +439,13 @@ static int meson_pwm_init_channels(struct device= *dev) >> >> struct meson_pwm_channel *channel =3D &meson->channels[i]; >> >> struct clk_parent_data div_parent =3D {}, gate_parent =3D {}; >> >> struct clk_init_data init =3D {}; >> >> + struct clk_divider *div; >> >> + struct clk_gate *gate; >> >> + struct clk_mux *mux; >> >> + >> >> + mux =3D devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL); >> >> + if (!mux) >> >> + return -ENOMEM; >> > >> > I don't like this change. While it doesn't increase the memory used, it >> > fragments the used memory and increases the overhead of memory >> > management and the number of devm allocations. >> > >> > Are these members of meson_pwm_channel in the way for anything later? >>=20 >> Not really. It is just not useful on the SoCs which do use it and not >> used at all starting from s4/a1. > > This remembers me about the old pwm-imx driver. This was essentially a > single file containing two drivers just because both types appeared on > imx machines. Later it was split into imx1 and imx27. > > I didn't look at the relevant differences between the existing driver > and the changes needed for s4, but please don't repeat this issue for > meson. Not sure this fear is justified, just saying ... Noted. Don't worry. s4 is indeed the same PWM block as before, just mux/div/gate migrated from the pwm IP to the main clk controller. That's all ... I know ;) Only the clock registration should change and simplify. > > Best regards > Uwe --=20 Jerome