forked from luck/tmp_suning_uos_patched
Merge branches 'clk/mxs' and 'imx/pinctrl/for-3.5' into mxs/dt/for-3.5
This commit is contained in:
commit
844d0b5a0b
|
@ -470,6 +470,7 @@ config ARCH_MXS
|
|||
select CLKSRC_MMIO
|
||||
select COMMON_CLK
|
||||
select HAVE_CLK_PREPARE
|
||||
select PINCTRL
|
||||
help
|
||||
Support for Freescale MXS-based family of processors
|
||||
|
||||
|
|
|
@ -842,6 +842,8 @@ config SOC_IMX6Q
|
|||
select HAVE_IMX_MMDC
|
||||
select HAVE_IMX_SRC
|
||||
select HAVE_SMP
|
||||
select PINCTRL
|
||||
select PINCTRL_IMX6Q
|
||||
select USE_OF
|
||||
|
||||
help
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/irqdomain.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <mach/common.h>
|
||||
|
@ -81,6 +82,8 @@ static void __init imx51_dt_init(void)
|
|||
|
||||
of_irq_init(imx51_irq_match);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
|
||||
node = of_find_matching_node(NULL, imx51_iomuxc_of_match);
|
||||
if (node) {
|
||||
of_id = of_match_node(imx51_iomuxc_of_match, node);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/irqdomain.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <mach/common.h>
|
||||
|
@ -88,6 +89,8 @@ static void __init imx53_dt_init(void)
|
|||
|
||||
of_irq_init(imx53_irq_match);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
|
||||
node = of_find_matching_node(NULL, imx53_iomuxc_of_match);
|
||||
if (node) {
|
||||
of_id = of_match_node(imx53_iomuxc_of_match, node);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/of_address.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/micrel_phy.h>
|
||||
#include <asm/smp_twd.h>
|
||||
|
@ -77,6 +78,12 @@ static int ksz9021rn_phy_fixup(struct phy_device *phydev)
|
|||
|
||||
static void __init imx6q_init_machine(void)
|
||||
{
|
||||
/*
|
||||
* This should be removed when all imx6q boards have pinctrl
|
||||
* states for devices defined in device tree.
|
||||
*/
|
||||
pinctrl_provide_dummies();
|
||||
|
||||
if (of_machine_is_compatible("fsl,imx6q-sabrelite"))
|
||||
phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
|
||||
ksz9021rn_phy_fixup);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
|
@ -58,4 +59,5 @@ void __init imx1_soc_init(void)
|
|||
MX1_GPIO_INT_PORTC, 0);
|
||||
mxc_register_gpio("imx1-gpio", 3, MX1_GPIO4_BASE_ADDR, SZ_256,
|
||||
MX1_GPIO_INT_PORTD, 0);
|
||||
pinctrl_provide_dummies();
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
@ -88,6 +89,7 @@ void __init imx21_soc_init(void)
|
|||
mxc_register_gpio("imx21-gpio", 4, MX21_GPIO5_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
|
||||
mxc_register_gpio("imx21-gpio", 5, MX21_GPIO6_BASE_ADDR, SZ_256, MX21_INT_GPIO, 0);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
imx_add_imx_dma();
|
||||
platform_device_register_simple("imx21-audmux", 0, imx21_audmux_res,
|
||||
ARRAY_SIZE(imx21_audmux_res));
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
@ -95,6 +96,7 @@ void __init imx25_soc_init(void)
|
|||
mxc_register_gpio("imx31-gpio", 2, MX25_GPIO3_BASE_ADDR, SZ_16K, MX25_INT_GPIO3, 0);
|
||||
mxc_register_gpio("imx31-gpio", 3, MX25_GPIO4_BASE_ADDR, SZ_16K, MX25_INT_GPIO4, 0);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
/* i.mx25 has the i.mx35 type sdma */
|
||||
imx_add_imx_sdma("imx35-sdma", MX25_SDMA_BASE_ADDR, MX25_INT_SDMA, &imx25_sdma_pdata);
|
||||
/* i.mx25 has the i.mx31 type audmux */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/devices-common.h>
|
||||
|
@ -89,6 +90,7 @@ void __init imx27_soc_init(void)
|
|||
mxc_register_gpio("imx21-gpio", 4, MX27_GPIO5_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
|
||||
mxc_register_gpio("imx21-gpio", 5, MX27_GPIO6_BASE_ADDR, SZ_256, MX27_INT_GPIO, 0);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
imx_add_imx_dma();
|
||||
/* imx27 has the imx21 type audmux */
|
||||
platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/system_misc.h>
|
||||
|
@ -267,6 +268,7 @@ void __init imx35_soc_init(void)
|
|||
mxc_register_gpio("imx31-gpio", 1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
|
||||
mxc_register_gpio("imx31-gpio", 2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
if (to_version == 1) {
|
||||
strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin",
|
||||
strlen(imx35_sdma_pdata.fw_name));
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
||||
#include <asm/system_misc.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
@ -223,6 +224,7 @@ void __init imx53_soc_init(void)
|
|||
mxc_register_gpio("imx31-gpio", 5, MX53_GPIO6_BASE_ADDR, SZ_16K, MX53_INT_GPIO6_LOW, MX53_INT_GPIO6_HIGH);
|
||||
mxc_register_gpio("imx31-gpio", 6, MX53_GPIO7_BASE_ADDR, SZ_16K, MX53_INT_GPIO7_LOW, MX53_INT_GPIO7_HIGH);
|
||||
|
||||
pinctrl_provide_dummies();
|
||||
/* i.mx53 has the i.mx35 type sdma */
|
||||
imx_add_imx_sdma("imx35-sdma", MX53_SDMA_BASE_ADDR, MX53_INT_SDMA, &imx53_sdma_pdata);
|
||||
|
||||
|
|
|
@ -9,11 +9,13 @@ config SOC_IMX23
|
|||
bool
|
||||
select CPU_ARM926T
|
||||
select HAVE_PWM
|
||||
select PINCTRL_IMX23
|
||||
|
||||
config SOC_IMX28
|
||||
bool
|
||||
select CPU_ARM926T
|
||||
select HAVE_PWM
|
||||
select PINCTRL_IMX28
|
||||
|
||||
comment "MXS platforms:"
|
||||
|
||||
|
|
|
@ -17,11 +17,13 @@ extern void mxs_timer_init(int);
|
|||
extern void mxs_restart(char, const char *);
|
||||
extern int mxs_saif_clkmux_select(unsigned int clkmux);
|
||||
|
||||
extern void mx23_soc_init(void);
|
||||
extern int mx23_register_gpios(void);
|
||||
extern int mx23_clocks_init(void);
|
||||
extern void mx23_map_io(void);
|
||||
extern void mx23_init_irq(void);
|
||||
|
||||
extern void mx28_soc_init(void);
|
||||
extern int mx28_register_gpios(void);
|
||||
extern int mx28_clocks_init(void);
|
||||
extern void mx28_map_io(void);
|
||||
|
|
|
@ -207,6 +207,8 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
|
|||
|
||||
static void __init apx4devkit_init(void)
|
||||
{
|
||||
mx28_soc_init();
|
||||
|
||||
mxs_iomux_setup_multiple_pads(apx4devkit_pads,
|
||||
ARRAY_SIZE(apx4devkit_pads));
|
||||
|
||||
|
|
|
@ -319,6 +319,8 @@ static struct mxs_mmc_platform_data m28evk_mmc_pdata[] __initdata = {
|
|||
|
||||
static void __init m28evk_init(void)
|
||||
{
|
||||
mx28_soc_init();
|
||||
|
||||
mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads));
|
||||
|
||||
mx28_add_duart();
|
||||
|
|
|
@ -141,6 +141,8 @@ static void __init mx23evk_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
mx23_soc_init();
|
||||
|
||||
mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
|
||||
|
||||
mx23_add_duart();
|
||||
|
|
|
@ -413,6 +413,8 @@ static void __init mx28evk_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
mx28_soc_init();
|
||||
|
||||
mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));
|
||||
|
||||
mx28_add_duart();
|
||||
|
|
|
@ -85,6 +85,8 @@ static void __init stmp378x_dvb_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
mx23_soc_init();
|
||||
|
||||
mxs_iomux_setup_multiple_pads(stmp378x_dvb_pads,
|
||||
ARRAY_SIZE(stmp378x_dvb_pads));
|
||||
|
||||
|
|
|
@ -146,6 +146,8 @@ static struct mxs_mmc_platform_data tx28_mmc0_pdata __initdata = {
|
|||
|
||||
static void __init tx28_stk5v3_init(void)
|
||||
{
|
||||
mx28_soc_init();
|
||||
|
||||
mxs_iomux_setup_multiple_pads(tx28_stk5v3_pads,
|
||||
ARRAY_SIZE(tx28_stk5v3_pads));
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pinctrl/machine.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
|
@ -61,3 +62,13 @@ void __init mx28_init_irq(void)
|
|||
{
|
||||
icoll_init_irq();
|
||||
}
|
||||
|
||||
void __init mx23_soc_init(void)
|
||||
{
|
||||
pinctrl_provide_dummies();
|
||||
}
|
||||
|
||||
void __init mx28_soc_init(void)
|
||||
{
|
||||
pinctrl_provide_dummies();
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_i2c.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/hardware.h>
|
||||
|
@ -470,6 +471,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
|
|||
struct imx_i2c_struct *i2c_imx;
|
||||
struct resource *res;
|
||||
struct imxi2c_platform_data *pdata = pdev->dev.platform_data;
|
||||
struct pinctrl *pinctrl;
|
||||
void __iomem *base;
|
||||
resource_size_t res_size;
|
||||
int irq, bitrate;
|
||||
|
@ -520,6 +522,12 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
|
|||
i2c_imx->base = base;
|
||||
i2c_imx->res = res;
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto fail3;
|
||||
}
|
||||
|
||||
/* Get I2C clock */
|
||||
i2c_imx->clk = clk_get(&pdev->dev, "i2c_clk");
|
||||
if (IS_ERR(i2c_imx->clk)) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
|
||||
|
@ -325,10 +326,15 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
|
|||
struct device *dev = &pdev->dev;
|
||||
struct mxs_i2c_dev *i2c;
|
||||
struct i2c_adapter *adap;
|
||||
struct pinctrl *pinctrl;
|
||||
struct resource *res;
|
||||
resource_size_t res_size;
|
||||
int err, irq;
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(dev);
|
||||
if (IS_ERR(pinctrl))
|
||||
return PTR_ERR(pinctrl);
|
||||
|
||||
i2c = devm_kzalloc(dev, sizeof(struct mxs_i2c_dev), GFP_KERNEL);
|
||||
if (!i2c)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/fsl/mxs-dma.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <mach/mxs.h>
|
||||
#include <mach/common.h>
|
||||
|
@ -682,6 +683,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
|
|||
struct mmc_host *mmc;
|
||||
struct resource *iores, *dmares, *r;
|
||||
struct mxs_mmc_platform_data *pdata;
|
||||
struct pinctrl *pinctrl;
|
||||
int ret = 0, irq_err, irq_dma;
|
||||
dma_cap_mask_t mask;
|
||||
|
||||
|
@ -719,6 +721,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
|
|||
host->irq = irq_err;
|
||||
host->sdio_irq_en = 0;
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto out_iounmap;
|
||||
}
|
||||
|
||||
host->clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(host->clk)) {
|
||||
ret = PTR_ERR(host->clk);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <mach/esdhc.h>
|
||||
#include "sdhci-pltfm.h"
|
||||
#include "sdhci-esdhc.h"
|
||||
|
@ -68,6 +69,7 @@ struct pltfm_imx_data {
|
|||
int flags;
|
||||
u32 scratchpad;
|
||||
enum imx_esdhc_type devtype;
|
||||
struct pinctrl *pinctrl;
|
||||
struct esdhc_platform_data boarddata;
|
||||
};
|
||||
|
||||
|
@ -467,6 +469,12 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
|||
clk_prepare_enable(clk);
|
||||
pltfm_host->clk = clk;
|
||||
|
||||
imx_data->pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(imx_data->pinctrl)) {
|
||||
err = PTR_ERR(imx_data->pinctrl);
|
||||
goto pin_err;
|
||||
}
|
||||
|
||||
host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
|
||||
|
||||
if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data))
|
||||
|
@ -558,6 +566,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
|||
gpio_free(boarddata->wp_gpio);
|
||||
no_card_detect_pin:
|
||||
no_board_data:
|
||||
pin_err:
|
||||
clk_disable_unprepare(pltfm_host->clk);
|
||||
clk_put(pltfm_host->clk);
|
||||
err_clk_get:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/mtd/gpmi-nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include "gpmi-nand.h"
|
||||
|
||||
/* add our owner bbt descriptor */
|
||||
|
@ -476,6 +477,7 @@ static int __devinit acquire_dma_channels(struct gpmi_nand_data *this)
|
|||
static int __devinit acquire_resources(struct gpmi_nand_data *this)
|
||||
{
|
||||
struct resources *res = &this->resources;
|
||||
struct pinctrl *pinctrl;
|
||||
int ret;
|
||||
|
||||
ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME);
|
||||
|
@ -494,6 +496,12 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this)
|
|||
if (ret)
|
||||
goto exit_dma_channels;
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto exit_pin;
|
||||
}
|
||||
|
||||
res->clock = clk_get(&this->pdev->dev, NULL);
|
||||
if (IS_ERR(res->clock)) {
|
||||
pr_err("can not get the clock\n");
|
||||
|
@ -503,6 +511,7 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this)
|
|||
return 0;
|
||||
|
||||
exit_clock:
|
||||
exit_pin:
|
||||
release_dma_channels(this);
|
||||
exit_dma_channels:
|
||||
release_bch_irq(this);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#define DRV_NAME "flexcan"
|
||||
|
||||
|
@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
|
|||
struct flexcan_priv *priv;
|
||||
struct resource *mem;
|
||||
struct clk *clk = NULL;
|
||||
struct pinctrl *pinctrl;
|
||||
void __iomem *base;
|
||||
resource_size_t mem_size;
|
||||
int err, irq;
|
||||
u32 clock_freq = 0;
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl))
|
||||
return PTR_ERR(pinctrl);
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
const u32 *clock_freq_p;
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_net.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
|
@ -1542,6 +1543,7 @@ fec_probe(struct platform_device *pdev)
|
|||
struct resource *r;
|
||||
const struct of_device_id *of_id;
|
||||
static int dev_id;
|
||||
struct pinctrl *pinctrl;
|
||||
|
||||
of_id = of_match_device(fec_dt_ids, &pdev->dev);
|
||||
if (of_id)
|
||||
|
@ -1609,6 +1611,12 @@ fec_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto failed_pin;
|
||||
}
|
||||
|
||||
fep->clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(fep->clk)) {
|
||||
ret = PTR_ERR(fep->clk);
|
||||
|
@ -1639,6 +1647,7 @@ fec_probe(struct platform_device *pdev)
|
|||
failed_init:
|
||||
clk_disable_unprepare(fep->clk);
|
||||
clk_put(fep->clk);
|
||||
failed_pin:
|
||||
failed_clk:
|
||||
for (i = 0; i < FEC_IRQ_NUM; i++) {
|
||||
irq = platform_get_irq(pdev, i);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <mach/spi.h>
|
||||
|
||||
|
@ -758,6 +759,7 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
|
|||
struct spi_master *master;
|
||||
struct spi_imx_data *spi_imx;
|
||||
struct resource *res;
|
||||
struct pinctrl *pinctrl;
|
||||
int i, ret, num_cs;
|
||||
|
||||
if (!np && !mxc_platform_info) {
|
||||
|
@ -845,6 +847,12 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
|
|||
goto out_iounmap;
|
||||
}
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto out_free_irq;
|
||||
}
|
||||
|
||||
spi_imx->clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(spi_imx->clk)) {
|
||||
dev_err(&pdev->dev, "unable to get clock\n");
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include <linux/scatterlist.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/sizes.h>
|
||||
|
@ -1916,6 +1917,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
|
|||
{
|
||||
struct uart_amba_port *uap;
|
||||
struct vendor_data *vendor = id->data;
|
||||
struct pinctrl *pinctrl;
|
||||
void __iomem *base;
|
||||
int i, ret;
|
||||
|
||||
|
@ -1940,6 +1942,12 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
|
|||
goto free;
|
||||
}
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&dev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto unmap;
|
||||
}
|
||||
|
||||
uap->clk = clk_get(&dev->dev, NULL);
|
||||
if (IS_ERR(uap->clk)) {
|
||||
ret = PTR_ERR(uap->clk);
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
@ -1464,6 +1465,7 @@ static int serial_imx_probe(struct platform_device *pdev)
|
|||
void __iomem *base;
|
||||
int ret = 0;
|
||||
struct resource *res;
|
||||
struct pinctrl *pinctrl;
|
||||
|
||||
sport = kzalloc(sizeof(*sport), GFP_KERNEL);
|
||||
if (!sport)
|
||||
|
@ -1503,6 +1505,12 @@ static int serial_imx_probe(struct platform_device *pdev)
|
|||
sport->timer.function = imx_timeout;
|
||||
sport->timer.data = (unsigned long)sport;
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto unmap;
|
||||
}
|
||||
|
||||
sport->clk = clk_get(&pdev->dev, "uart");
|
||||
if (IS_ERR(sport->clk)) {
|
||||
ret = PTR_ERR(sport->clk);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
|
@ -678,6 +679,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
|
|||
u32 version;
|
||||
int ret = 0;
|
||||
struct resource *r;
|
||||
struct pinctrl *pinctrl;
|
||||
|
||||
s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
|
||||
if (!s) {
|
||||
|
@ -685,6 +687,12 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
|
|||
goto out;
|
||||
}
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
s->clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(s->clk)) {
|
||||
ret = PTR_ERR(s->clk);
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <mach/mxsfb.h>
|
||||
|
||||
#define REG_SET 4
|
||||
|
@ -756,6 +757,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
|
|||
struct mxsfb_info *host;
|
||||
struct fb_info *fb_info;
|
||||
struct fb_modelist *modelist;
|
||||
struct pinctrl *pinctrl;
|
||||
int i, ret;
|
||||
|
||||
if (!pdata) {
|
||||
|
@ -793,6 +795,12 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
|
|||
|
||||
host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data];
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
goto error_getpin;
|
||||
}
|
||||
|
||||
host->clk = clk_get(&host->pdev->dev, NULL);
|
||||
if (IS_ERR(host->clk)) {
|
||||
ret = PTR_ERR(host->clk);
|
||||
|
@ -848,6 +856,7 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
|
|||
error_pseudo_pallette:
|
||||
clk_put(host->clk);
|
||||
error_getclock:
|
||||
error_getpin:
|
||||
iounmap(host->base);
|
||||
error_ioremap:
|
||||
framebuffer_release(fb_info);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/fsl/mxs-dma.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <sound/core.h>
|
||||
#include <sound/pcm.h>
|
||||
#include <sound/pcm_params.h>
|
||||
|
@ -625,6 +626,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
|
|||
struct resource *iores, *dmares;
|
||||
struct mxs_saif *saif;
|
||||
struct mxs_saif_platform_data *pdata;
|
||||
struct pinctrl *pinctrl;
|
||||
int ret = 0;
|
||||
|
||||
if (pdev->id >= ARRAY_SIZE(mxs_saif))
|
||||
|
@ -650,6 +652,12 @@ static int mxs_saif_probe(struct platform_device *pdev)
|
|||
saif->master_id = saif->id;
|
||||
}
|
||||
|
||||
pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
|
||||
if (IS_ERR(pinctrl)) {
|
||||
ret = PTR_ERR(pinctrl);
|
||||
return ret;
|
||||
}
|
||||
|
||||
saif->clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(saif->clk)) {
|
||||
ret = PTR_ERR(saif->clk);
|
||||
|
|
Loading…
Reference in New Issue
Block a user