[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1336040119-13200-1-git-send-email-jhovold@gmail.com>
Date: Thu, 3 May 2012 12:15:19 +0200
From: Johan Hovold <jhovold@...il.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@...ux.intel.com>,
Florian Tobias Schandinat <FlorianSchandinat@....de>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Richard Purdie <rpurdie@...ys.net>,
Johan Hovold <jhovold@...il.com>
Subject: Re: [PATCH 1/4] mfd: add LM3533 lighting-power core driver
[ Sorry for the resend -- Android/gmail apparently added HTML to my previous
attempt. ]
On Apr 26, 2012 2:41 PM, "Mark Brown" <broonie@...nsource.wolfsonmicro.com>
wrote:
> On Fri, Apr 20, 2012 at 05:30:23PM +0200, Johan Hovold wrote:
> > +static int __lm3533_read(struct lm3533 *lm3533, u8 reg, u8 *val)
> > +{
> > + int ret;
> > +
> > + ret = lm3533->read(lm3533, reg, val);
> > + if (ret < 0) {
>
> Looks like you could save a bunch of code by using regmap for the
> register I/O. This would also give you access to the cache and
> diagnostic infrastructure it has.
Using regmap only saves about ten lines for the actual io implementation,
but it does allow me to get rid of the custom debugfs interface. I'm not
enabling caching at this point but it'll probably come in handy later.
Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists