Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1728500rdd; Thu, 11 Jan 2024 07:38:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJW006NcM5fRTkJqL641tG6BlIdx/Q4C//K/X7BPYnkgaqc8bikkASBFtYmwwvNyX6Opq0 X-Received: by 2002:a17:902:8f94:b0:1d3:f285:57e0 with SMTP id z20-20020a1709028f9400b001d3f28557e0mr1155119plo.11.1704987480041; Thu, 11 Jan 2024 07:38:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704987480; cv=none; d=google.com; s=arc-20160816; b=lahXdpwYrN+MVE0rqdHhLU5M8pTh4VEGWmnrlBhdT1jRXFlPVuzMy4FXD4jx+k6iSh 4Dfn1mEBiBEL5rT80EkA4+OTF/UMe1ASaK6xRJcddGcaKXlHRJafGW5sF8k4Pbj1Oojb EL31/IvJusI/ad6yybOLJDN/q1Bl32pJy3pFXuPV82hPc2TKisTsz5/1v9buKDfeghOZ Sgj5Mhst0SmMZ8Hzn9GU0otA8MrPf0yfvaCLMgZR2uOfwjSvz5QZXQe+bmn04XdumJw+ vbhmtwOBodwbIZwxsOoai22Xmu9zlKYQ9JaFOA1vh/0pMRPUL59XGt+xaR0oW1Sa7mdO cWuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=zQEFJd7qOY7eaCBdTz2QW/9jwDFHfyYVMR1DPX1JG0M=; fh=Q5WYN2AfYBpeJR19bCejw4xiQYtc+nQP5C+FQXhrsM8=; b=DTj0Nfn3aizPH+fKXs0LiF3AAxEf5J0xVktuM63LOfD51Myf/LgvBtz1vwAY5spEVK XvgRzJtb8JRUwnAgiLGHkycAavu7C2Llr3d6BycYZcyXRjvFc9cMxoDzmsxfpyJrTV2s 9NyLkQfdQnPkUIHrb9prjy2EusHcyKy9ov9CKWRNB6YGFdzcIfcC+q3Ui2TCSyhsWEsG RtzuX9p0cg7vEt/5PcphhmV12NxdPVlPgx5f644cSi9s3ixHQPoF1IWo2H65qJUgiS+/ f7LWL5H/5j+rK281NOtTjTG9AlmKMS4E1qsvgOlFQU7C1tFC9zNy9yik6Zp9xobkNOXF rGPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=euRKmxl7; spf=pass (google.com: domain of linux-kernel+bounces-23801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ka14-20020a170903334e00b001d3c4df5004si1249310plb.151.2024.01.11.07.37.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 07:38:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=euRKmxl7; spf=pass (google.com: domain of linux-kernel+bounces-23801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23801-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1217BB24F26 for ; Thu, 11 Jan 2024 15:36:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFA104F206; Thu, 11 Jan 2024 15:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="euRKmxl7" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 D90AD4D128; Thu, 11 Jan 2024 15:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 1BAE0283938; Thu, 11 Jan 2024 16:35:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1704987344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zQEFJd7qOY7eaCBdTz2QW/9jwDFHfyYVMR1DPX1JG0M=; b=euRKmxl7MEjoUgD4vi4EhlK/9Jjqa0t8Gyywnwfzm5293nX+pIWE3JcLMxFuW5AZdLuYOE xWBjbs01inGk2WZX9i14PmGXHMgsp3Yjd3sYnw39ZKU1eyAQZ+TT9eG1eQnZFoSEhEBwVO zCX9/DN3NAF7JxIdANqjFwkZ7NqOHVw= Received: from localhost (unknown [213.235.133.110]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id DBEE4456760; Thu, 11 Jan 2024 16:35:43 +0100 (CET) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 11 Jan 2024 16:36:12 +0100 Message-Id: Cc: "Karel Balej" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Liam Girdwood" , "Mark Brown" , , , =?utf-8?q?Duje_Mihanovi=C4=87?= , <~postmarketos/upstreaming@lists.sr.ht>, Subject: Re: [RFC PATCH 1/5] mfd: 88pm88x: differences with respect to the PMIC RFC series To: "Lee Jones" From: "Karel Balej" References: <20231228100208.2932-1-karelb@gimli.ms.mff.cuni.cz> <20231228100208.2932-2-karelb@gimli.ms.mff.cuni.cz> <20240111105426.GA1678981@google.com> <20240111152549.GL1678981@google.com> In-Reply-To: <20240111152549.GL1678981@google.com> On Thu Jan 11, 2024 at 4:25 PM CET, Lee Jones wrote: [...] > > > > diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88= x.h > > > > index a34c57447827..9a335f6b9c07 100644 > > > > --- a/include/linux/mfd/88pm88x.h > > > > +++ b/include/linux/mfd/88pm88x.h > > > > @@ -49,6 +49,8 @@ struct pm88x_data { > > > > unsigned int whoami; > > > > struct reg_sequence *presets; > > > > unsigned int num_presets; > > > > + struct mfd_cell *devs; > > > > + unsigned int num_devs; > > > > > > Why are you adding extra abstraction? > >=20 > > Right, this is probably not necessary now since I'm only implementing > > support for one of the chips - it's just that I keep thinking about it > > as a driver for both of them and thus tend to write it a bit more > > abstractly. Shall I then drop this and also the `presets` member which > > is also chip-specific? > > Even if you were to support multiple devices, this strategy is unusual > and isn't likely to be accepted. May I please ask what the recommended strategy is then? `switch`ing on the chip ID? I have taken this approach because it seemed to produce a cleaner/more straightforward code in comparison to that. Or are you only talking about the chip cells/subdevices in particular? Thank you, K. B.