From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932525Ab3FRPLm (ORCPT ); Tue, 18 Jun 2013 11:11:42 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:43389 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932457Ab3FRPLl (ORCPT ); Tue, 18 Jun 2013 11:11:41 -0400 Date: Tue, 18 Jun 2013 16:11:16 +0100 From: Russell King - ARM Linux To: Linus Walleij Cc: Sebastian Hesselbarth , Thomas Petazzoni , Grant Likely , Rob Herring , Rob Landley , Lior Amsalem , Andrew Lunn , Jason Cooper , Gregory CLEMENT , Ben Dooks , Stephen Warren , "devicetree-discuss@lists.ozlabs.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver Message-ID: <20130618151116.GZ2718@n2100.arm.linux.org.uk> References: <1344689809-6223-1-git-send-email-sebastian.hesselbarth@gmail.com> <1347550912-18021-1-git-send-email-sebastian.hesselbarth@gmail.com> <1347550912-18021-3-git-send-email-sebastian.hesselbarth@gmail.com> <20130618113606.GA26763@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 18, 2013 at 05:02:49PM +0200, Linus Walleij wrote: > Nowadays I would do the above with regmap_update_bits(). > > Mutual exclusion for read-modify-write of individual bits in a > register is one of those cases where doing a regmap over > a memory-mapped register range makes a lot of sense. > (drivers/mfd/syscon.c being a nice example) So, for that solution we need to have some kind of global regmap per register or somesuch. Then you run into regmap needing a struct device - well, with a shared register, which struct device do you use, or do you have to invent one? That sounds more heavy-weight than is really necessary.