Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755045Ab2EYGzN (ORCPT ); Fri, 25 May 2012 02:55:13 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:34621 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753314Ab2EYGzL convert rfc822-to-8bit (ORCPT ); Fri, 25 May 2012 02:55:11 -0400 MIME-Version: 1.0 In-Reply-To: <20120524161720.GT3710@pengutronix.de> References: <1337593269-2497-1-git-send-email-u.kleine-koenig@pengutronix.de> <1337628827-14484-1-git-send-email-u.kleine-koenig@pengutronix.de> <20120524161720.GT3710@pengutronix.de> Date: Fri, 25 May 2012 08:55:09 +0200 Message-ID: Subject: Re: [PATCH v3] leds: Add MAX6956 driver From: Linus Walleij To: =?ISO-8859-1?Q?Uwe_Kleine=2DK=F6nig?= Cc: Bryan Wu , Richard Purdie , kernel@pengutronix.de, linux-kernel@vger.kernel.org, Grant Likely , Linus Walleij , Mark Brown , Andrew Morton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 35 On Thu, May 24, 2012 at 6:17 PM, Uwe Kleine-K?nig wrote: > On Mon, May 21, 2012 at 11:30:28PM +0200, Linus Walleij wrote: >> The MFD driver decide using platform data whether each >> line should be used for a LED or GPIO. >> >> Is there some problem with this design pattern? > > I thought about that, too, but I think it's overkill to create an mfd > driver. I have this driver: drivers/mfd/tps6105x.c drivers/regulator/tps6105x-regulator.c It's not much code either but it has this nice split. Discussing this in the past with Mark Brown we have often come to the conclusion that having the MFD abstraction for multifunctional chips is rather nice. But it's partly a question of aesthetics and I'm not a perfectionist, there are indeed many examples to the contrary. But this is what I would have done... BTW: you need to include Andrew Morton in the postings since he's merging most LED code these days. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/