diff mbox

[3/3] BeagleBoard: add support for the twl4030-madc

Message ID 1313033272-16774-4-git-send-email-kyle@kylemanna.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kyle Manna Aug. 11, 2011, 3:27 a.m. UTC
Signed-off-by: Kyle Manna <kyle@kylemanna.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

Comments

Grazvydas Ignotas Aug. 11, 2011, 9:44 a.m. UTC | #1
You need to CC linux-arm-kernel too.

On Thu, Aug 11, 2011 at 6:27 AM, Kyle Manna <kyle@kylemanna.com> wrote:
> Signed-off-by: Kyle Manna <kyle@kylemanna.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 3ae16b4..a82d53b 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -362,11 +362,16 @@ static struct regulator_init_data beagle_vsim = {
>        .consumer_supplies      = beagle_vsim_supply,
>  };
>
> +static struct twl4030_madc_platform_data beagle_madc = {
> +       .irq_line       = 1,
> +};
> +
>  static struct twl4030_platform_data beagle_twldata = {
>        /* platform_data for children goes here */
>        .gpio           = &beagle_gpio_data,
>        .vmmc1          = &beagle_vmmc1,
>        .vsim           = &beagle_vsim,
> +       .madc           = &beagle_madc,
>  };

Basically all boards with twl4030 might want to have this, maybe add
this to twl-common.c instead to avoid code duplication?
Kyle Manna Aug. 12, 2011, 3:33 a.m. UTC | #2
These patches add basic functionality to the twl4030-madc driver to make
it work on the BeagleBoard xM.

Version 2 adds fixes per Grazvydas Ignotas and the check for NULL pointer patch.

Kyle Manna (4):
  mfd: twl4030-madc: copy the device pointer
  mfd: twl4030-madc: turn on the MADC clock
  mfd: twl4030-madc: check for NULL pointer
  arm: BeagleBoard: add support for the twl4030-madc

 arch/arm/mach-omap2/board-omap3beagle.c |    9 ++++++++-
 drivers/mfd/twl4030-madc.c              |   27 ++++++++++++++++++++++++++-
 include/linux/i2c/twl4030-madc.h        |    4 ++++
 3 files changed, 38 insertions(+), 2 deletions(-)
Samuel Ortiz Aug. 22, 2011, 1:55 p.m. UTC | #3
Hi Kyle,

On Thu, Aug 11, 2011 at 10:33:11PM -0500, Kyle Manna wrote:
> These patches add basic functionality to the twl4030-madc driver to make
> it work on the BeagleBoard xM.
> 
> Version 2 adds fixes per Grazvydas Ignotas and the check for NULL pointer patch.
> 
> Kyle Manna (4):
>   mfd: twl4030-madc: copy the device pointer
>   mfd: twl4030-madc: turn on the MADC clock
>   mfd: twl4030-madc: check for NULL pointer
>   arm: BeagleBoard: add support for the twl4030-madc
Tony, are you ok with the BeagleBoard changes ?
The MFD ones look fine to me, I'd like to apply them.

Cheers,
Samuel.
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 3ae16b4..a82d53b 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -362,11 +362,16 @@  static struct regulator_init_data beagle_vsim = {
 	.consumer_supplies	= beagle_vsim_supply,
 };
 
+static struct twl4030_madc_platform_data beagle_madc = {
+	.irq_line       = 1,
+};
+
 static struct twl4030_platform_data beagle_twldata = {
 	/* platform_data for children goes here */
 	.gpio		= &beagle_gpio_data,
 	.vmmc1		= &beagle_vmmc1,
 	.vsim		= &beagle_vsim,
+	.madc		= &beagle_madc,
 };
 
 static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
@@ -456,9 +461,15 @@  static void __init omap3_beagle_init_irq(void)
 	omap3_init_irq();
 }
 
+static struct platform_device madc_hwmon = {
+	.name		= "twl4030_madc_hwmon",
+	.id		= -1,
+};
+
 static struct platform_device *omap3_beagle_devices[] __initdata = {
 	&leds_gpio,
 	&keys_gpio,
+	&madc_hwmon,
 };
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {