Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp975289pxb; Wed, 3 Mar 2021 23:10:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJytw2oaxbufVmNibdnSmcPVmoQE91HRHHmILhcpoGpe3fjz36KblydWUJHygNSTWS2GCSzX X-Received: by 2002:a17:906:b747:: with SMTP id fx7mr2792288ejb.474.1614841825159; Wed, 03 Mar 2021 23:10:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614841825; cv=none; d=google.com; s=arc-20160816; b=YlMhQcrCPLCkmJ9lm2tTNOVNgF3HWGiY081hOoowKG1HHb3y1bKYzo2TxFlkoUqw7N UOzkcr+CbXuinxfISEcPhwoimYP+2YdyjSgNt900mu15tNKtTMAwS2N91zBWPXOtISHT NpB8EzNoH4v9pvBNo0HMam/llAlh55IQCLiGD739ptP+QLNUwN0cembHDMW9LJpReXvn SNu3llbVn3lTTtXPBdjrITDS6qZIdREycaZSAzVNtTCRlpg7oFTsvcxpgVV4AMVbdN3Q 1sQqyU32K6FrUAXr8fMvv6kuodu4C/3fJ2/cgsnNGQCELDHJ8J+Q85lOPNZROPS0lDLD za3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=6eEV6lINxDy3bnV6PBJ9hbLC1cOGc3ZDkPwme/58AuM=; b=FqC2Hz8LQ0GZcPSA5WX7HUhSHn9kc61WKrqJZ9qAA7sA99RsQNsGKLo/wDW0WtU2XT iC97iIOwJ/iAZ0dvZGV4FoNSipI4LWWlIDRqylZejARa7TTrjP9BPa00Akn+jiwCGTKH ikp2lcHleYtG8OzdQyJb/P17fY7/4dwd3AKWF9EIkff/fB2/F3Z6JWOYo6pw6rdrssN0 NjPFaZPiKvcM1demHvnwOWAjVVQyvFXIduRXYhgPXN+484vV7kJznNve2DD/DNxGzovI 4dYNwOaXwovKxLkgp8AVhIsG+cLALy00fwUjITNfGP0jH7q8PWdOk6b3e/MV6d1GX9/j Lr1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=a4yWeqGC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr15si13729925ejb.275.2021.03.03.23.10.02; Wed, 03 Mar 2021 23:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=a4yWeqGC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2359734AbhCBWC6 (ORCPT + 99 others); Tue, 2 Mar 2021 17:02:58 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:56911 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1576788AbhCBT1O (ORCPT ); Tue, 2 Mar 2021 14:27:14 -0500 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 4D7412223E; Tue, 2 Mar 2021 20:24:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1614713078; 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=6eEV6lINxDy3bnV6PBJ9hbLC1cOGc3ZDkPwme/58AuM=; b=a4yWeqGCGS93HcgESPkmrCHKOH9jPDOyb/hRL9lBOmoC65Z8awsbWfxEPXgMQ/yFN/15Q9 sTN2iFHaLXpGtflJb6IsBZaJofSinwusHrTiICRzLOuMoisZ57EhKslpWlBzjnlqsykBMo 3kdbVoP6IGOxWaAGryo/tYN1/bqyp5E= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 02 Mar 2021 20:24:38 +0100 From: Michael Walle To: =?UTF-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: regmap: move struct gpio_regmap definition In-Reply-To: <4af4b519-84eb-3cb4-bb0e-9c5ac6204348@gmail.com> References: <20210302180601.12082-1-noltari@gmail.com> <4af4b519-84eb-3cb4-bb0e-9c5ac6204348@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <8f703cfde0245a280340f2c9c8a5359a@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Am 2021-03-02 19:14, schrieb Álvaro Fernández Rojas: > El 02/03/2021 a las 19:10, Michael Walle escribió: >> Am 2021-03-02 19:06, schrieb Álvaro Fernández Rojas: >>> struct gpio_regmap should be declared in gpio/regmap.h. >>> This way other drivers can access the structure data when registering >>> a gpio >>> regmap controller. >> >> The intention was really to keep this private to the gpio-regmap >> driver. Why do you need to access to the properties? > > I'm trying to add support for bcm63xx pin controllers, and Linus > suggested that I could use gpio regmap instead of adding duplicated > code. nice! > However, I need to access gpio_chip inside gpio_regmap to call > pinctrl_add_gpio_range() with gpio_chip.base. Can't we add something to gpio-regmap.c which will (1) either call pinctrl_add_gpio_range(), just (2) return the struct gpio_chip* or (3) even only gpio_chip.base? I don't know how many sense (1) make and how reusable that code would be for other drivers, though. Linus? -michael