From patchwork Wed Mar 3 14:22:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12113713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2908DC433DB for ; Wed, 3 Mar 2021 15:36:12 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 322FA64EC3 for ; Wed, 3 Mar 2021 15:36:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 322FA64EC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PgTX34txElLA3XEKtOx3GqXUkmGTA3ryf6Y+Dn9ucgw=; b=fXTl0Zj6CvnPOfGYLC9S1T+Wu 6Z5yGIsfY15EBQeiB8uwGbYsH/+UgAl2M2rmSK4ZNVzxZflVOgh77UGGhLv6H6m1OAMfI8CR3TBZB H8hQalXN5xs5q5PGBTtSeTZmFx+1E7LETpHftCtGKEDPweQYO2ZgFGp4JQ4Mwjnixi/RsMTDTzDve O9jxt6PWoLzHEWmalDGdxXuzDlGxIh3WIYXQXwgn9JVq4F/dznaM2aGNQDAFDP7pVlqpy70lufN+y ku4PFWZ3BvkwkjW1WmpR2Jrz1Zc3FRChyL+1e2qtpasJo9/CgYLkwmbwaq2AGGLyD9jIkxmv+DvXj xG2OXq2uw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHTVn-005P9i-VV; Wed, 03 Mar 2021 15:34:10 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSSW-0057hX-WD for linux-arm-kernel@desiato.infradead.org; Wed, 03 Mar 2021 14:26:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=3k/UlbIlaZqVA1OB09fPNikh0yRBoWCfl4QqOSDPCJA=; b=LMxSU+gE1fERD7AGKTyqhf7f+B kei8lsfXRIEhBN4n9uQXXKQMfSv2iXKaZDv4eqvzJKZRUVeAYGgvMheLrKIJYsvdciJoGLQ9xF5g1 wYLAM6CCUL/cLioRca253ZPdvZqce0sad+5qoRNUaJIMKrvJeoEtV0h+diNv7UqqJym1GOwUeQM7I h96hM+NQeI+nnV7uC52cEoeGvQwBd8oFDG+Sy3obhaTkbZdQuOe8IgWBubPdOB62r1Ub7n9as46qK YcERGTz80nyxKBckKZotqyyUMSOhPIGzRvV2crd/5vQ91d0N2Q4cEdHhJDS2ccpe9AwVYsRlkWh3X 6tOmoclQ==; Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSQI-002vxc-As for linux-arm-kernel@lists.infradead.org; Wed, 03 Mar 2021 14:24:26 +0000 Received: by mail-wr1-x42f.google.com with SMTP id a18so15676069wrc.13 for ; Wed, 03 Mar 2021 06:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3k/UlbIlaZqVA1OB09fPNikh0yRBoWCfl4QqOSDPCJA=; b=IyI8umlfIJrjrLecHQjrTsgqdv0RFBvsDSvlq5kMzE4PB+c7pt511XuqWCvlEQQc8v RrSXVMxY+zU3j+pcUBwoZBMlj6gaduk2QkgHMI6qZTQM4dhjgncYltfIOIfQOEQWw0GM 4IH7qwK1395oVYcqe/xdmm7AsH2GNbjkeFwMYO0fttmUUT/YFQZPvc2Ww9Lch4yD9HUZ 8O+ywIec7Ihluk6xIl00LF8LtDXNAlcO0wEZh5JVmmMDFvjmujIaiWQVXQky5hOOCBvg oMEBXvyoexWpCNz1FCzQdI3FsZI7bxKVFMCu1cbbZ+7o88GMJSSCeUicl0Unuy/QQqqt oTfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3k/UlbIlaZqVA1OB09fPNikh0yRBoWCfl4QqOSDPCJA=; b=jSq237b7NEonf8/YDH+6hiKr3MTKkurGsiX7q3T0w2DGGPsRZ3+ERo2ns/sO80LJw4 tplhi2X2IiUhIPWGRr5wqUKm2QFunWVGIlE+Z5/8DCDLcozPmYL+JYnJhLpQAg4KK+PS 3AvSTB8oBLeHgkBfRD/UiOM/ay21R0YGDezCMtHqm/Skwx/nN5pLKdwxqIUxSu0TIf56 9G8i0U7zu8asT0BnImsGL/uHTvXAkJy8N+w10zfOPPigHud34Uomq2zbowkC9Bg34Ber ygTj7oSLU1E9r04iXz7ygB1ZjXvIy4moBf0gfErDMikedfdsypPj0iU5RprW9oVN0q3h hk2w== X-Gm-Message-State: AOAM531pSWLdZ9HXk5L5GExaUL1EFqr3FooIGdUzjmjpPp4fvJ00eU6t fZ129usOw2dJifznYyJwiB0= X-Google-Smtp-Source: ABdhPJwWR/RXw7bSdoAVEod4SyUbLMqlB49UrOMNq0FbWkpnnnevxDlHdNSmaG9IRmucZH72TuEfwg== X-Received: by 2002:adf:f0cb:: with SMTP id x11mr25619040wro.206.1614781393043; Wed, 03 Mar 2021 06:23:13 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id b15sm7876219wmd.41.2021.03.03.06.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 06:23:12 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: Linus Walleij , Rob Herring , Michael Walle , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Jonas Gorski , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Necip Fazil Yildiran , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node Date: Wed, 3 Mar 2021 15:22:57 +0100 Message-Id: <20210303142310.6371-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210303142310.6371-1-noltari@gmail.com> References: <20210303142310.6371-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210303_142426_430309_8545976F X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is needed for properly registering gpio regmap as a child of a regmap pin controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Michael Walle --- v3: introduce patch needed for properly parsing gpio-ranges. drivers/gpio/gpio-regmap.c | 1 + include/linux/gpio/regmap.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c index 5412cb3b0b2a..752ccd780b7d 100644 --- a/drivers/gpio/gpio-regmap.c +++ b/drivers/gpio/gpio-regmap.c @@ -249,6 +249,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config chip = &gpio->gpio_chip; chip->parent = config->parent; + chip->of_node = config->of_node; chip->base = -1; chip->ngpio = config->ngpio; chip->names = config->names; diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h index ad76f3d0a6ba..f6e638e32d2a 100644 --- a/include/linux/gpio/regmap.h +++ b/include/linux/gpio/regmap.h @@ -4,6 +4,7 @@ #define _LINUX_GPIO_REGMAP_H struct device; +struct device_node; struct gpio_regmap; struct irq_domain; struct regmap; @@ -14,6 +15,7 @@ struct regmap; /** * struct gpio_regmap_config - Description of a generic regmap gpio_chip. * @parent: The parent device + * @of_node: The device node * @regmap: The regmap used to access the registers * given, the name of the device is used * @label: (Optional) Descriptive name for GPIO controller. @@ -56,6 +58,7 @@ struct regmap; */ struct gpio_regmap_config { struct device *parent; + struct device_node *of_node; struct regmap *regmap; const char *label;