Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp995732rdb; Wed, 24 Jan 2024 01:16:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFveT65X+A17p1jzqLuFc2LH0Lup+VSgi5Y460NTX9sWapaTlKcGJDPr2KF/Xb4Ur3R39lA X-Received: by 2002:a05:6e02:5ac:b0:361:ac91:2e51 with SMTP id k12-20020a056e0205ac00b00361ac912e51mr1437496ils.13.1706087772910; Wed, 24 Jan 2024 01:16:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706087772; cv=pass; d=google.com; s=arc-20160816; b=Nr20Nv3TQvEEJS8e8T1eVHvaUxbd0/m5oSExbALpXQ9NfS3atXD3YWh1PWuB5Audp1 KMmMLPgw0RUmN34EBMwmmb+G0nu79oh/puNDl1VASvF/dVh3usm4vjZ1Ry5ml2ivH7Xm 1LXH5Xf6nAdlxct9A3sgNh8IGwThEVnpkm7L5tZjwOC7PaVuloUBgtvYR4SpO0eVJmP/ 8/FJujjzm5JiHJa4V/npSjrihKttRRi82TVRTd4wn2YoCJqpFK81yGFtgVwHN09mWCTB 42dS9u7rv6dfiKMycSNPr/uo6nEpabn5O4izGGpxe8igP9qsz3eFWpu0e3eswvHqtvYs gFeg== 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=ZbeFWfMqBmXODESAwukrIPoFDrHKEc0uZI5I1dvJGsU=; fh=H3U0xlt7goOSAhUb4NN7kdWef7Oh5ZGxLLtPcSBLg6k=; b=KGzdfu5j1O7/WrVBpTHzFo8PaBQM3XfWpP6wPdTKimsNg6XegzInqluq1PouJe54rB AW7hQKnO/FbEFngj+q8Qz03fIyOkxrSVvFIchrCl4IV4Hbu+J+fZTG5WcJlzXwn0gO8o 0OQjmheroCpQLsWbSxaUcWLfGHgCZOGOBO8NGt74fYfBe2gY4XNmVnL+Ug9v1Z+lfJBd 6BSpgSKEm8WBBUGzKiUXGITUlw/WNJudN31g9M6bct2sNVAOArDFRRCeZpjDWRsp+nhm 1cJXVhYnZlsGI68NtaEyrVDG+cfSXYesGs4kF3xHWbIoHH3LQhXsIuKQXqz1Pp66lJg+ RnbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=Yc91Hgio; 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-36684-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36684-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 q2-20020a634302000000b005ce26be61c1si11297770pga.346.2024.01.24.01.16.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 01:16:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36684-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; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=Yc91Hgio; 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-36684-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36684-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 84E2A28C091 for ; Wed, 24 Jan 2024 09:16:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF50F17C64; Wed, 24 Jan 2024 09:16:03 +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="Yc91Hgio" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 47E2717BCA for ; Wed, 24 Jan 2024 09:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706087763; cv=none; b=Jl8ynnwdKBKU4hLjEW92HDVKXs6Z6k/lxhXWmsybB9SgIKtImGzR/F9ithr1GyiFaOSkCwN1q1ZRWr5bYVGmi5LD12B5ffrZgOx6bbOjo+tuyWg63xb7p4/iJuf2OhX4W06JIeHEhJjnXlBjZupbS7cvVc1qEeNIQ9FtBssNiuE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706087763; c=relaxed/simple; bh=QG5WlILsmM0gId87Rj/yfX0PouwUTYLt7B6wB7wQEMo=; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID: MIME-Version:Content-Type; b=VpBLdEb/patbIRvvwjWae3F7y4ctgvLb0Kosj56d47OVtqaLca+wFUeQ+nTIfWiQUvIMZCqAdSHEiAwDXdcjsF1KgoVOBFON67OMqg+rkTHd0ULhwsYwq4wMsGETPb2pKkUHDtkDhM++7NhqbbCFU2kl1o7Cj5jAJEqIFUkZ3NY= 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=Yc91Hgio; arc=none smtp.client-ip=209.85.221.42 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-wr1-f42.google.com with SMTP id ffacd0b85a97d-337d32cd9c1so4590591f8f.2 for ; Wed, 24 Jan 2024 01:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706087758; x=1706692558; 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=ZbeFWfMqBmXODESAwukrIPoFDrHKEc0uZI5I1dvJGsU=; b=Yc91HgiodveUPWMfGG/vG/otKv7SjGYrbZrcQe7T+ndw4Ld5vvp1Ui0us0A/IUzO57 Xrs2YaKgHjO5kN1r9K/yyp2+0y2W34GPxxUPJxm/RW1Kna7kZqYlYKJMLhOEuh/SZKCN iIX2c/Xg+1YS9Dx+ZxzBAzyvZwuzT4250awb8nZV8VliPXEAVAoebyHzThJ+DMQ6bYKz T+CR9suj4RYo9GPI7Ug4I2L+UM3r/ahN+ehRCQdSZTxBJtia0OqSB8gTWybxLE8ZLtRy NPTrEATbLqmw55QGWDqJDVhPEFQ7oiySRVv9CTJwonmgCr1P8jaSM++JpLfwTYoA6TWj EfxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706087758; x=1706692558; 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=ZbeFWfMqBmXODESAwukrIPoFDrHKEc0uZI5I1dvJGsU=; b=Tq6qESEDk8wQIRQNHFjfOWhzAGmtfQoyUcQX5i2jVDglOhvYQ34dBMMkGAJGBBzXXS 3cpvozx9ipRJIR0kgHaUwml3Fak1ihhSJb8IcKsjZYfDLvdPG6OSnAjuhIxENL5RZZJh iU3LLQLNA3HfkEW7etQnNomk1YA9BNF+eTMvI5jO+B2Pf3r5bn+/00/2JlM3X2fjMwOv zq6vnyaN01CQ9pefOiSwAQ1QuSGrIkqS4qnxxtY/a/o3ufUdsIsNB9ARqvYVxFDumVXX JotbN9m2pjwe9Hi6a2CshvmKdznNRwqjR+sbvB4MxV0OIp96Uj9MLNxMehAoq+PMT5Qo +xpg== X-Gm-Message-State: AOJu0YzeO2jqyuk0Rj4d0riOZ8qCL8HPQPFtQHrlaZESAAw0PR9Jrq1D cY0OtC3sxYnrYl+pOjK3JqPeF7hJzJ+IaZ9K65pRDPo5rmruOhQsZqgqaqVWn4E= X-Received: by 2002:a5d:554c:0:b0:337:c527:ad54 with SMTP id g12-20020a5d554c000000b00337c527ad54mr337926wrw.77.1706087758478; Wed, 24 Jan 2024 01:15:58 -0800 (PST) Received: from localhost ([2a01:e0a:3c5:5fb1:d8b6:17b6:386f:c67b]) by smtp.gmail.com with ESMTPSA id g18-20020adff3d2000000b00337f722e5ccsm13609525wrp.65.2024.01.24.01.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 01:15:58 -0800 (PST) References: <20231222111658.832167-1-jbrunet@baylibre.com> <20231222111658.832167-4-jbrunet@baylibre.com> <4kcbh4dezgpic2dpgdi2swtx2puqiq74w2tungmxipf4nznpn7@u4g4f3cimps4> 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 3/6] pwm: meson: generalize 4 inputs clock on meson8 pwm type Date: Wed, 24 Jan 2024 10:11:59 +0100 In-reply-to: <4kcbh4dezgpic2dpgdi2swtx2puqiq74w2tungmxipf4nznpn7@u4g4f3cimps4> Message-ID: <1jy1cfw0qa.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:08, Uwe Kleine-K=C3=B6nig wrote: > [[PGP Signed Part:Undecided]] > Hello Jerome, > > On Fri, Dec 22, 2023 at 12:16:51PM +0100, Jerome Brunet wrote: >> Meson8 pwm type always has 4 input clocks. Some inputs may be grounded, >> like in the AO domain of some SoCs. >>=20 >> Drop the parent number parameter and make this is constant. >> This is also done to make addition of generic meson8 compatible easier. >>=20 >> Signed-off-by: Jerome Brunet >> --- >> drivers/pwm/pwm-meson.c | 19 ++++++------------- >> 1 file changed, 6 insertions(+), 13 deletions(-) >>=20 >> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c >> index 2971bbf3b5e7..ef50c337f444 100644 >> --- a/drivers/pwm/pwm-meson.c >> +++ b/drivers/pwm/pwm-meson.c >> @@ -60,7 +60,7 @@ >> #define MISC_A_EN BIT(0) >>=20=20 >> #define MESON_NUM_PWMS 2 >> -#define MESON_MAX_MUX_PARENTS 4 >> +#define MESON_NUM_MUX_PARENTS 4 >>=20=20 >> static struct meson_pwm_channel_data { >> u8 reg_offset; >> @@ -98,7 +98,6 @@ struct meson_pwm_channel { >>=20=20 >> struct meson_pwm_data { >> const char * const *parent_names; > > I suggest to make this > > const char *parent_names[MESON_NUM_MUX_PARENTS]; Ok. > > to make it more explicit that really four entries are needed here. This > also makes is unnecessary to add the additional NULL entries to > pwm_gxbb_ao_parent_names and the other arrays. I would normally agree but I'd prefer to be explicit. There are some instance where the NULL is in the middle, this can't go away. I think it looks if some inputs are explicitly NULL while the other are implicit. Of course, it is just a preference. I can remove these if that is bothering you. > > Best regards > Uwe --=20 Jerome