lkml.org 
[lkml]   [2012]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: viperboard driver added
Hi Lars,

On Mon, Aug 27, 2012 at 03:08:38PM +0200, larsi@wh2.tu-dresden.de wrote:
> From: Lars Poeschel <poeschel@lemonage.de>
>
> First version of the driver for Nano River Tech's
> viperboard added.
> It supports i2c, adc, gpio a and gpio b. spi and pwm on
> the first gpio a pins is not supported yet.
>
> Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
> ---
> drivers/mfd/Kconfig | 17 +
> drivers/mfd/Makefile | 1 +
> drivers/mfd/viperboard.c | 1084 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 1102 insertions(+)
> create mode 100644 drivers/mfd/viperboard.c
So the MFD driver contains a GPIO one, and an i2c bus driver.
You should really split this code into at least 3 pieces: 1 for the GPIO
(drivers/gpio), another one for your i2c bus algorithm (drivers/i2c/busses)
and a last one for the actual MFD driver. Your Kconfig entries will define the
dependencies between them.
Then you can define your SoC subdevices as MFD cells and use the MFD APIs to
add them as platform devices.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/


\
 
 \ /
  Last update: 2012-09-19 19:01    [W:0.076 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site