Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp819016rdb; Fri, 2 Feb 2024 05:12:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGm1CR8WYvtlLZVC0bvhYzgbMUg5lU+hg4y7KNO1HvlGotexCQLXuhVAOIr/V1bqiT0JF1Z X-Received: by 2002:a17:902:d50a:b0:1d9:14ac:239e with SMTP id b10-20020a170902d50a00b001d914ac239emr3126033plg.28.1706879525788; Fri, 02 Feb 2024 05:12:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706879525; cv=pass; d=google.com; s=arc-20160816; b=xihSchmoxw5smUnAejrk8BMKCh+sH1gJERb6j/Y/AagnGJM1QNrbDV/HnDJqm+HM8s oQxB2YyAMvH/qDxuNo1SPIBapZh2W5XRtuRAec2gZi39SNKxwkMUwtaWJ+pQQK2pyQyB 5ZAwrkgALnGwNWkv9x1IEBKlAdZZAYZ1mBQ2uIO0iGysBWXsPrITWRNNtYrDRK+yFFxz qRFTSY4L5gVYtDU7+KxmgV3PBRU+gX3eMymYGJADQ8Dt55ZsE7MnjiVupRaaFjjv0cSl rnni2yahGUq8Sa5hzh6heGhXdZVv1bMOVjkmOj9GTQ8WqvKpdf4tOt1mdsn+T9TtMinY +AMg== ARC-Message-Signature: i=2; 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=Vk6ebVfUP0DK1H8nYjPQE8hIkEuSNdLAy6sElffR3ok=; fh=0eRopo6KM+anDkmluKeZ3VVf0fQeGT23VGrIcbSspGs=; b=N4WdQDAn6np1jyNuaSKuvo9EnRsHCjyBIXiz+btUCzX3NbCvh3j0VTH2Wxo8cVduBk RKoTXPPMsETQQZVkBb2mIFOQupkOg35jC/cZbgYpCDu8CN1Oi/wUbsAC5QyQo2lRPN4Z VQvnAmWhxE8n4Kjvx6vGlcRBBQxUP7hBcnZkCLoD8Mw1zlnZPdfad3eL9rKJbp9YVtdU p6Em+kpsauahk/ay5TTo32YHfequwhYBPvKD6ab+GAXFvZ8yBqDkJkAknTlWXOTNuHaR MhqODOoI5hFLXcCnSo5IFAD9OTdEV2EZpEfXLBL7f1RLOZsklevQuFwA5ppjJbAGao05 BjRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=edLqh18U; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-49869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=1; AJvYcCW7XIq5uQl1qD+NmgH9MNd6B4jse2wK13rMGHUq0Gy0GWayeavXVoqiYjv85sdlBpgzeJ05A5rm4UXS36LibLfL3VRvzL+DO9NGewMAuQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f18-20020a170902e99200b001d928833f58si1651109plb.220.2024.02.02.05.12.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49869-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=edLqh18U; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-49869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49869-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 5FC33B29F08 for ; Fri, 2 Feb 2024 12:56:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD0F346A1; Fri, 2 Feb 2024 12:55:51 +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="edLqh18U" 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 A39FB15D2; Fri, 2 Feb 2024 12:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878550; cv=none; b=O7yqRAsWIy2Ir8hKvbuTOpND5ZEZGkdscm4YWSCR9OV+jIT2+EmXtzPfgtNcwyOexWSUG2C4bbaBwiAA1+rwK8ngAJTnDJXQlNtx1cECX+DVjlT7C4KXFyaafAwpDtqqYDsXbTp8tgw6niF8eRmKHG6Sh03Md/K/AgJbsaakUS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878550; c=relaxed/simple; bh=+TmtUtIfmZcdIbEuOgcCdi2sK+bzSVptb/iPlbxGHIg=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:To:From: References:In-Reply-To; b=RL+QXAiPE2QKx1ZWmw8ThmWuKjmugkCeR7/uS+6bfRMFeQz+3SDlcMJZms5ap/TNyEO3f3HCpcExs+4+GMmwFPjNX5+/G7d2TWpF98gp1aQkRbgOgWdlq0pm41Cx+yzV4Tz+ctx+iSyvd483IeOx016NrMCEn8y8kbTrbUyCFWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=edLqh18U; arc=none smtp.client-ip=195.113.20.16 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 C0E8B283DA8; Fri, 2 Feb 2024 13:55:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1706878542; 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=Vk6ebVfUP0DK1H8nYjPQE8hIkEuSNdLAy6sElffR3ok=; b=edLqh18Utjzl1LdX29V+5A3Xpy1mu+zS9Cjr0I7nC5D7VZkcP8c/Po1Aw4c6/EQT9UqRQK 5EK3JQp5RLXKt7ZZbsdacOYx9ft6eu7X9yjIJtXn9lBVa9NigZxKwWEkj+zvnZ0kKd4gap e7k007zRwHiSQD8Ybnib+aMzJuMR9zU= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (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 93ED14516B2; Fri, 2 Feb 2024 13:55:42 +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: Fri, 02 Feb 2024 13:55:42 +0100 Message-Id: Cc: "Karel Balej" , "Dmitry Torokhov" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , , , , =?utf-8?q?Duje_Mihanovi=C4=87?= , <~postmarketos/upstreaming@lists.sr.ht>, Subject: Re: [RFC PATCH 2/5] mfd: add 88pm88x driver To: "Lee Jones" From: "Karel Balej" References: <20231217131838.7569-1-karelb@gimli.ms.mff.cuni.cz> <20231217131838.7569-3-karelb@gimli.ms.mff.cuni.cz> <20240125122634.GE74950@google.com> <20240131110311.GI8551@google.com> <20240202124550.GE1379817@google.com> In-Reply-To: <20240202124550.GE1379817@google.com> Lee Jones, 2024-02-02T12:45:50+00:00: > On Thu, 01 Feb 2024, Karel Balej wrote: > > > Lee Jones, 2024-01-31T11:03:11+00:00: > > > On Sun, 28 Jan 2024, Karel Balej wrote: > > > > > > + /* GPIO1: DVC, GPIO0: input */ > > > > > > + REG_SEQ0(PM88X_REG_GPIO_CTRL1, 0x40), > > > > > > > > > > Shouldn't you set these up using Pintrl? > > > >=20 > > > > You mean to add a new MFD cell for the pins and write the respectiv= e > > > > driver? The downstream implementation has no such thing so I'm not = sure > > > > if I would be able to do that from scratch. > > > > > > This is not a Pinctrl driver. > > > > > > Isn't there a generic API you can use? > >=20 > > I'm sorry, I don't think I understand what you mean. > > Perhaps I misunderstand the code. It looks like this regmap patch hack > is configuring pins and a bunch of other things. Would that be a > correct assessment? Yes, that sounds correct. > If so, where do we draw the line here? Do we accept a 1000 line driver > which configures a large SoC with a bunch of bespoke register writes? I understand, I just don't know what you mean by "a generic API". I'm also not clear on whether what you have in mind is simply adding a dedicated driver for the pins as a new subdevice of this MFD. Thanks, K. B.