[PATCH 2/2] pxa/spitz: Add isl6271a voltage regulator
Marek Vasut
marek.vasut at gmail.com
Mon Jun 7 01:32:02 EDT 2010
Dne Po 7. června 2010 07:27:53 Marek Vasut napsal(a):
> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> ---
> arch/arm/mach-pxa/spitz.c | 32 ++++++++++++++++++++++++++++++++
> 1 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
> index c1048a3..5767ceb 100644
> --- a/arch/arm/mach-pxa/spitz.c
> +++ b/arch/arm/mach-pxa/spitz.c
> @@ -26,6 +26,7 @@
> #include <linux/spi/corgi_lcd.h>
> #include <linux/mtd/sharpsl.h>
> #include <linux/input/matrix_keypad.h>
> +#include <linux/regulator/machine.h>
>
> #include <asm/setup.h>
> #include <asm/mach-types.h>
> @@ -709,6 +710,34 @@ static struct platform_device sharpsl_rom_device = {
> .dev.platform_data = &sharpsl_rom_data,
> };
>
> +static struct regulator_consumer_supply isl6271a_consumers[] = {
> + {
> + .supply = "vcc_core",
> + }
> +};
> +
> +static struct regulator_init_data isl6271a_info[] = {
> + {
> + .constraints = {
> + .name = "vcc_core range",
> + .min_uV = 850000,
> + .max_uV = 1600000,
> + .always_on = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
> + },
> + .consumer_supplies = isl6271_consumers,
> + .num_consumer_supplies = ARRAY_SIZE(isl6271_consumers),
> + }
> +};
> +
> +static struct i2c_board_info spitz_pi2c_board_info[] = {
> + {
> + .type = "isl6271a",
> + .addr = 0x1b,
btw. also change this -- i2c_detect will tell you what address the chip have if
you don't know it yet.
> + .platform_data = &isl6271_info,
> + },
> +};
> +
> static struct platform_device *devices[] __initdata = {
> &spitzscoop_device,
> &spitzkbd_device,
> @@ -765,6 +794,9 @@ static void __init common_init(void)
> pxa_set_ficp_info(&spitz_ficp_platform_data);
> set_pxa_fb_info(&spitz_pxafb_info);
> pxa_set_i2c_info(NULL);
> +
> + pxa27x_set_i2c_power_info(NULL);
> + i2c_register_board_info(1, ARRAY_AND_SIZE(spitz_pi2c_board_info));
> }
>
> #if defined(CONFIG_MACH_AKITA) || defined(CONFIG_MACH_BORZOI)
More information about the linux-arm-kernel
mailing list