From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v3 02/10] pwm: Allow chips to support multiple PWMs. Date: Thu, 23 Feb 2012 14:07:12 +0000 Message-ID: <201202231407.12981.arnd@arndb.de> References: <1329923841-32017-1-git-send-email-thierry.reding@avionic-design.de> <201202221634.45159.arnd@arndb.de> <20120223081235.GC8621@avionic-0098.mockup.avionic-design.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120223081235.GC8621-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thierry Reding Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sascha Hauer , Matthias Kaehlcke , Kurt Van Dijck , Rob Herring , Grant Likely , Colin Cross , Olof Johansson , Richard Purdie , Mark Brown , Mitch Bradley , Mike Frysinger , Eric Miao , Lars-Peter Clausen , Ryan Mallon List-Id: linux-tegra@vger.kernel.org On Thursday 23 February 2012, Thierry Reding wrote: > > Is this only used for the device tree functions? If so, I would recommend > > making it less generic and always search for a device node. > > It is currently only used to look up a struct pwm_chip for a given struct > device_node, yes. But I can see other uses for this. For instance this could > be useful if we ever want to provide an alternative way of requesting a PWM > on a per-chip basis. Nah, just keep it simple for now. If we need it later, we can still add something like this back, but for now it's just a source of confusion and possible bugs. > I was again basically looking at gpiolib for inspiration (maybe I should stop > doing that :-). Maybe gpiolib should be reworked to use seq_file's iterator > interface as well? Just in case anybody else turns to gpiolib for > inspiration. Good idea. Would you be able to send a patch for that, too? I would guess converting both at the same time would be easier for you than splitting the work between two people. ARnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 23 Feb 2012 14:07:12 +0000 Subject: [PATCH v3 02/10] pwm: Allow chips to support multiple PWMs. In-Reply-To: <20120223081235.GC8621@avionic-0098.mockup.avionic-design.de> References: <1329923841-32017-1-git-send-email-thierry.reding@avionic-design.de> <201202221634.45159.arnd@arndb.de> <20120223081235.GC8621@avionic-0098.mockup.avionic-design.de> Message-ID: <201202231407.12981.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thursday 23 February 2012, Thierry Reding wrote: > > Is this only used for the device tree functions? If so, I would recommend > > making it less generic and always search for a device node. > > It is currently only used to look up a struct pwm_chip for a given struct > device_node, yes. But I can see other uses for this. For instance this could > be useful if we ever want to provide an alternative way of requesting a PWM > on a per-chip basis. Nah, just keep it simple for now. If we need it later, we can still add something like this back, but for now it's just a source of confusion and possible bugs. > I was again basically looking at gpiolib for inspiration (maybe I should stop > doing that :-). Maybe gpiolib should be reworked to use seq_file's iterator > interface as well? Just in case anybody else turns to gpiolib for > inspiration. Good idea. Would you be able to send a patch for that, too? I would guess converting both at the same time would be easier for you than splitting the work between two people. ARnd