Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2383203ybb; Mon, 30 Mar 2020 05:14:36 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtNrOVgQU+m7l0vGkAtaDkrfiX2zc5GTyB0hCyVTdq/GDv0b9jAHqhQkLqC1qvcBZmUd80U X-Received: by 2002:a4a:8926:: with SMTP id f35mr7241717ooi.97.1585570476472; Mon, 30 Mar 2020 05:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585570476; cv=none; d=google.com; s=arc-20160816; b=Xtli9AF5e+Z6BBiW7B0Odcn50fUKurUv0bDdXAX/dCoktkd754SrIbHQ4cMRgyekE5 A0ycKlIMTr6JihehqBk9GBasB9mtVYNv/lX9LpcgTJm5VSD8tsVCj89xRouEfliYrGge 0gjbJl4iXeniZGB0l3z3Bh70FVYMIxAp+jkTSqPFgdrNFlBTR2lpgiqFviCdAQvyKvz5 MWY0oXFyCI3vLWsRO37lrUNuYnPQXNtXlK1+skZrdo3QTjwqMcYoN/5F3H4Y79gUKFqF 8zr6p7tTdggDN8uQxCzqZOmvFyDFIgYd17+8YkWvbwIDlgNKDDlajJ1oiCuxslv05vLy 0FOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=/WNHnqJr48B9UGKgZOiUmrkZCrV3XIE1znDFAU2j6Tg=; b=z/9IiyqNgOW5MV9yqe4IKkE6ufKwPviKUKYVT8QbTbZ28o9l02PCRrrNPljAFj7bWS LCRgEPUly7JvfG4ifE0neO8qeK4rNWEb5+gQ0iW6rbxesW85XDCuj5nfqQ8JvZrE5jfx 39lY5kFq8PC4OO1CddWRq+HdsAdhg+zzWWvRnbTYbPriullWomvANAXA1SXxR7098ET+ 8AarOtHUHFbIcQbbm4LA6kVQMpXKHz3Ub7liyrQzW2OmTAQozP6w0ANLWoxPni5R8agn fxV3pQpUvi6hifM3EAGLEIrv6xY8S2fljBQ3T8nNcRoKT9fn9k/0QPiDfzyGSWvnPm74 2UkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=OwrdblbD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m25si516918otq.210.2020.03.30.05.14.22; Mon, 30 Mar 2020 05:14:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=OwrdblbD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729867AbgC3Ls0 (ORCPT + 99 others); Mon, 30 Mar 2020 07:48:26 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:35107 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728764AbgC3Ls0 (ORCPT ); Mon, 30 Mar 2020 07:48:26 -0400 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id C5D9423D22; Mon, 30 Mar 2020 13:48:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1585568902; 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=/WNHnqJr48B9UGKgZOiUmrkZCrV3XIE1znDFAU2j6Tg=; b=OwrdblbDl1rXIFYSbMyycWAJ/UOrU4LJoT06Nn1G+IM+/E1naMieKRwBijsqcFco+PCiRB Y9hqzgjb4FFo1rpJ109DNWxxkRidjc/7K4mc0+Jc+KapaponxbXASGImRVwIqw8PeZnq27 cB865PGVvlh96zdgrv44Q1RrplOc2Tc= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 30 Mar 2020 13:48:21 +0200 From: Michael Walle To: Bartosz Golaszewski Cc: Linus Walleij , linux-gpio , linux-devicetree , LKML , linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, LINUXWATCHDOG , arm-soc , Rob Herring , Jean Delvare , Guenter Roeck , Lee Jones , Thierry Reding , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: Re: [PATCH 12/18] gpio: add support for the sl28cpld GPIO controller In-Reply-To: References: <20200317205017.28280-1-michael@walle.cc> <20200317205017.28280-13-michael@walle.cc> <9c310f2a11913d4d089ef1b07671be00@walle.cc> <22944c9b62aa69da418de7766b7741bd@walle.cc> <4d8d3bc26bdf73eb5c0e5851589fe085@walle.cc> Message-ID: <021f3add4b03b7a682832921a96ef85f@walle.cc> X-Sender: michael@walle.cc User-Agent: Roundcube Webmail/1.3.10 X-Spamd-Bar: + X-Spam-Level: * X-Rspamd-Server: web X-Spam-Status: No, score=1.40 X-Spam-Score: 1.40 X-Rspamd-Queue-Id: C5D9423D22 X-Spamd-Result: default: False [1.40 / 15.00]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[dt]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[]; RCPT_COUNT_TWELVE(0.00)[21]; NEURAL_HAM(-0.00)[-0.772]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[linaro.org,vger.kernel.org,lists.infradead.org,kernel.org,suse.com,roeck-us.net,gmail.com,pengutronix.de,linux-watchdog.org,nxp.com,linutronix.de,lakedaemon.net]; MID_RHS_MATCH_FROM(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Am 2020-03-30 13:21, schrieb Bartosz Golaszewski: > pt., 27 mar 2020 o 16:28 Michael Walle napisaƂ(a): >> >> Am 2020-03-27 11:20, schrieb Linus Walleij: >> > On Thu, Mar 26, 2020 at 9:06 PM Michael Walle wrote: >> >> Am 2020-03-25 12:50, schrieb Bartosz Golaszewski: >> > >> >> > In that case maybe you should use the disable_locking option in >> >> > regmap_config and provide your own callbacks that you can use in the >> >> > irqchip code too? >> >> >> >> But how would that solve problem (1). And keep in mind, that the >> >> reqmap_irqchip is actually used for the interrupt controller, which >> >> is not this gpio controller. >> >> >> >> Ie. the interrupt controller of the sl28cpld uses the regmap_irqchip >> >> and all interrupt phandles pointing to the interrupt controller will >> >> reference the toplevel node. Any phandles pointing to the gpio >> >> controller will reference the GPIO subnode. >> > >> > Ideally we would create something generic that has been on my >> > mind for some time, like a generic GPIO regmap irqchip now that >> > there are a few controllers like that. >> > >> > I don't know how feasible it is or how much work it would be. But >> > as with GPIO_GENERIC (for MMIO) it would be helpful since we >> > can then implement things like .set_multiple() and .get_multiple() >> > for everyone. >> >> For starters, would that be a drivers/gpio/gpio-regmap.c or a >> drivers/base/regmap/regmap-gpio.c? I would assume the first, >> because the stuff in drivers/base/regmap operates on a given >> regmap and we'd just be using one, correct? On the other hand >> there is also the reqmap-irq.c. But as pointed out before, it >> will add an interrupt controller to the regmap, not a device >> so to speak. >> >> -michael > > This has been on my TODO list for so long, but I've never been able to > find the time... I'd really appreciate any effort in that direction as > I believe it would allow us to slowly port a big part of the GPIO > expander drivers over to it and make large portions of our codebase > generic. I might have at least a first patch this week. So if you and Linus Walleij might have some time to help review and comment on that, it would be greatly appreciated. -michael > > Best regards, > Bartosz Golaszewski