From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 13D56C3276C for ; Thu, 2 Jan 2020 09:04:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 E7E542084D for ; Thu, 2 Jan 2020 09:04:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7E542084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89C6489D40; Thu, 2 Jan 2020 09:04:51 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A66D89D40; Thu, 2 Jan 2020 09:04:50 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 01:04:49 -0800 X-IronPort-AV: E=Sophos;i="5.69,386,1571727600"; d="scan'208";a="214098037" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 01:04:45 -0800 From: Jani Nikula To: Linus Walleij , Hans de Goede In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20191216205122.1850923-1-hdegoede@redhat.com> <20191216205122.1850923-2-hdegoede@redhat.com> Date: Thu, 02 Jan 2020 11:04:43 +0200 Message-ID: <875zhuut3o.fsf@intel.com> MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH v2 1/5] pinctrl: Allow modules to use pinctrl_[un]register_mappings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx , "linux-kernel@vger.kernel.org" , "open list:DRM PANEL DRIVERS" , "open list:GPIO SUBSYSTEM" , Andy Shevchenko , Lee Jones Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 30 Dec 2019, Linus Walleij wrote: > On Mon, Dec 16, 2019 at 9:51 PM Hans de Goede wrote: > >> Currently only the drivers/pinctrl/devicetree.c code allows registering >> pinctrl-mappings which may later be unregistered, all other mappings >> are assumed to be permanent. >> >> Non-dt platforms may also want to register pinctrl mappings from code which >> is build as a module, which requires being able to unregister the mapping >> when the module is unloaded to avoid dangling pointers. >> >> To allow unregistering the mappings the devicetree code uses 2 internal >> functions: pinctrl_register_map and pinctrl_unregister_map. >> >> pinctrl_register_map allows the devicetree code to tell the core to >> not memdup the mappings as it retains ownership of them and >> pinctrl_unregister_map does the unregistering, note this only works >> when the mappings where not memdupped. >> >> The only code relying on the memdup/shallow-copy done by >> pinctrl_register_mappings is arch/arm/mach-u300/core.c this commit >> replaces the __initdata with const, so that the shallow-copy is no >> longer necessary. >> >> After that we can get rid of the internal pinctrl_unregister_map function >> and just use pinctrl_register_mappings directly everywhere. >> >> This commit also renames pinctrl_unregister_map to >> pinctrl_unregister_mappings so that its naming matches its >> pinctrl_register_mappings counter-part and exports it. >> >> Together these 2 changes will allow non-dt platform code to >> register pinctrl-mappings from modules without breaking things on >> module unload (as they can now unregister the mapping on unload). >> >> Signed-off-by: Hans de Goede > > This v2 works fine for me, I applied it to this immutable branch in the > pinctrl tree: > https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=ib-pinctrl-unreg-mappings > > And pulled that into the pinctrl "devel" branch for v5.6. > > Please pull this immutable branch into the Intel DRM tree and apply > the rest of the stuff on top! Thanks, pulled to drm-intel-next-queued. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx