mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
34800598b2
These are all specific to some driver. They are typically the platform side of a change in the drivers directory, such as adding a new driver or extending the interface to the platform. In cases where there is no maintainer for the driver, or the maintainer prefers to have the platform changes in the same branch as the driver changes, the patches to the drivers are included as well. A much smaller set of driver updates that depend on other branches getting merged first will be sent later. The new export of tegra_chip_uid conflicts with other changes in fuse.c. In rtc-sa1100.c, the global removal of IRQF_DISABLED conflicts with the cleanup of the interrupt handling of that driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIVAwUAT24/Y2CrR//JCVInAQLUdw//V4pKPuKempSe1kuD2MJfqldHwEVOlAUt of1IhLPAp8tpCscPDQ0yTy3ixquINg4jVnaDLL+E0quVbhLu6hlS2TYNKDEaVAAc cPUtVEUdja7Cfu4+bXX2vcWM/UyI6Ax7bsUUcwu4wFnEsjA6qOSu/jYY4jXDguHq ODGQSaSz0XQkfVBsWOlO8W/ejb0T3y+Ro3M/Vz5qJsMnZBR8R/i9aUYDFGiZ1GTn 3APHB7ALz6SS5/9SJS65PH16poBexcea5gyb3gnR1yt30kRmMTOAWrLC+JdyqFaO 7LHXW514+D1QbWV2gwNCWhQSLbgp9PWq/FXJtq4StW7tgNbDbj1d1Dc1GX+fvk2M bBih1yWoIVx6CZWFBQ7gsbqVHUZ/sW2fo76yb8K5dVPXx0fL5lEkv5Xwk3gxbqt5 lPE8+z+jiL5D+8RK1DZQu1PfxzaMwDZkJkVoGLCcdyM7FvnX3LIYf2bqbcp+zrQL lz9aht9C1k12R7feOX8emlluNd3eaKv/6jLrOasUP5wrJDam5hesSD5mLeTlAdxZ U8XJe4L24dFv15/yrMCzcyes5EmB3aS3nfb9TsSfq22IOKo2PCQLCnL6Z/rfM+1p mGu7BqdBnx3/8NkHdUrttMWjuPNh77MfPM6RO/E+TaBLHtwvKoLWJAHAYQNmt2xH IbGcyorBD5s= =pQ3X -----END PGP SIGNATURE----- Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull "ARM: driver specific updates" from Arnd Bergmann: "These are all specific to some driver. They are typically the platform side of a change in the drivers directory, such as adding a new driver or extending the interface to the platform. In cases where there is no maintainer for the driver, or the maintainer prefers to have the platform changes in the same branch as the driver changes, the patches to the drivers are included as well. A much smaller set of driver updates that depend on other branches getting merged first will be sent later. The new export of tegra_chip_uid conflicts with other changes in fuse.c. In rtc-sa1100.c, the global removal of IRQF_DISABLED conflicts with the cleanup of the interrupt handling of that driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de>" Fixed up aforementioned trivial conflicts. * tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (94 commits) ARM: SAMSUNG: change the name from s3c-sdhci to exynos4-sdhci mmc: sdhci-s3c: add platform data for the second capability ARM: SAMSUNG: support the second capability for samsung-soc ARM: EXYNOS: add support DMA for EXYNOS4X12 SoC ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1 ARM: EXYNOS: Enable MDMA driver regulator: Remove bq24022 regulator driver rtc: sa1100: add OF support pxa: magician/hx4700: Convert to gpio-regulator from bq24022 ARM: OMAP3+: SmartReflex: fix error handling ARM: OMAP3+: SmartReflex: fix the use of debugfs_create_* API ARM: OMAP3+: SmartReflex: micro-optimization for sanity check ARM: OMAP3+: SmartReflex: misc cleanups ARM: OMAP3+: SmartReflex: move late_initcall() closer to its argument ARM: OMAP3+: SmartReflex: add missing platform_set_drvdata() ARM: OMAP3+: hwmod: add SmartReflex IRQs ARM: OMAP3+: SmartReflex: clear ERRCONFIG_VPBOUNDINTST only on a need ARM: OMAP3+: SmartReflex: Fix status masking in ERRCONFIG register ARM: OMAP3+: SmartReflex: Add a shutdown hook ARM: OMAP3+: SmartReflex Class3: disable errorgen before disable VP ... Conflicts: arch/arm/mach-tegra/Makefile arch/arm/mach-tegra/fuse.c drivers/rtc/rtc-sa1100.c
117 lines
3.3 KiB
C
117 lines
3.3 KiB
C
/*
|
|
* Copyright (C) 2010 NVIDIA, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
* 02111-1307, USA
|
|
*/
|
|
#include <linux/i2c.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/gpio.h>
|
|
#include <linux/regulator/machine.h>
|
|
#include <linux/mfd/tps6586x.h>
|
|
|
|
#include <mach/irqs.h>
|
|
|
|
#include "board-harmony.h"
|
|
|
|
static struct regulator_consumer_supply tps658621_ldo0_supply[] = {
|
|
REGULATOR_SUPPLY("pex_clk", NULL),
|
|
};
|
|
|
|
static struct regulator_init_data ldo0_data = {
|
|
.constraints = {
|
|
.min_uV = 3300 * 1000,
|
|
.max_uV = 3300 * 1000,
|
|
.valid_modes_mask = (REGULATOR_MODE_NORMAL |
|
|
REGULATOR_MODE_STANDBY),
|
|
.valid_ops_mask = (REGULATOR_CHANGE_MODE |
|
|
REGULATOR_CHANGE_STATUS |
|
|
REGULATOR_CHANGE_VOLTAGE),
|
|
.apply_uV = 1,
|
|
},
|
|
.num_consumer_supplies = ARRAY_SIZE(tps658621_ldo0_supply),
|
|
.consumer_supplies = tps658621_ldo0_supply,
|
|
};
|
|
|
|
#define HARMONY_REGULATOR_INIT(_id, _minmv, _maxmv) \
|
|
static struct regulator_init_data _id##_data = { \
|
|
.constraints = { \
|
|
.min_uV = (_minmv)*1000, \
|
|
.max_uV = (_maxmv)*1000, \
|
|
.valid_modes_mask = (REGULATOR_MODE_NORMAL | \
|
|
REGULATOR_MODE_STANDBY), \
|
|
.valid_ops_mask = (REGULATOR_CHANGE_MODE | \
|
|
REGULATOR_CHANGE_STATUS | \
|
|
REGULATOR_CHANGE_VOLTAGE), \
|
|
}, \
|
|
}
|
|
|
|
HARMONY_REGULATOR_INIT(sm0, 725, 1500);
|
|
HARMONY_REGULATOR_INIT(sm1, 725, 1500);
|
|
HARMONY_REGULATOR_INIT(sm2, 3000, 4550);
|
|
HARMONY_REGULATOR_INIT(ldo1, 725, 1500);
|
|
HARMONY_REGULATOR_INIT(ldo2, 725, 1500);
|
|
HARMONY_REGULATOR_INIT(ldo3, 1250, 3300);
|
|
HARMONY_REGULATOR_INIT(ldo4, 1700, 2475);
|
|
HARMONY_REGULATOR_INIT(ldo5, 1250, 3300);
|
|
HARMONY_REGULATOR_INIT(ldo6, 1250, 3300);
|
|
HARMONY_REGULATOR_INIT(ldo7, 1250, 3300);
|
|
HARMONY_REGULATOR_INIT(ldo8, 1250, 3300);
|
|
HARMONY_REGULATOR_INIT(ldo9, 1250, 3300);
|
|
|
|
#define TPS_REG(_id, _data) \
|
|
{ \
|
|
.id = TPS6586X_ID_##_id, \
|
|
.name = "tps6586x-regulator", \
|
|
.platform_data = _data, \
|
|
}
|
|
|
|
static struct tps6586x_subdev_info tps_devs[] = {
|
|
TPS_REG(SM_0, &sm0_data),
|
|
TPS_REG(SM_1, &sm1_data),
|
|
TPS_REG(SM_2, &sm2_data),
|
|
TPS_REG(LDO_0, &ldo0_data),
|
|
TPS_REG(LDO_1, &ldo1_data),
|
|
TPS_REG(LDO_2, &ldo2_data),
|
|
TPS_REG(LDO_3, &ldo3_data),
|
|
TPS_REG(LDO_4, &ldo4_data),
|
|
TPS_REG(LDO_5, &ldo5_data),
|
|
TPS_REG(LDO_6, &ldo6_data),
|
|
TPS_REG(LDO_7, &ldo7_data),
|
|
TPS_REG(LDO_8, &ldo8_data),
|
|
TPS_REG(LDO_9, &ldo9_data),
|
|
};
|
|
|
|
static struct tps6586x_platform_data tps_platform = {
|
|
.irq_base = TEGRA_NR_IRQS,
|
|
.num_subdevs = ARRAY_SIZE(tps_devs),
|
|
.subdevs = tps_devs,
|
|
.gpio_base = HARMONY_GPIO_TPS6586X(0),
|
|
};
|
|
|
|
static struct i2c_board_info __initdata harmony_regulators[] = {
|
|
{
|
|
I2C_BOARD_INFO("tps6586x", 0x34),
|
|
.irq = INT_EXTERNAL_PMU,
|
|
.platform_data = &tps_platform,
|
|
},
|
|
};
|
|
|
|
int __init harmony_regulator_init(void)
|
|
{
|
|
i2c_register_board_info(3, harmony_regulators, 1);
|
|
|
|
return 0;
|
|
}
|