Merge branch 'next/drivers' into late/multiplatform
Multiple parts of next/drivers are prerequisites for the final exynos multiplatform changes, so let's pull in the entire branch. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -152,7 +152,7 @@ struct clk {
|
||||
}, \
|
||||
.reg = _reg, \
|
||||
.shift = _shift, \
|
||||
.width = _width, \
|
||||
.mask = BIT(_width) - 1, \
|
||||
.flags = _mux_flags, \
|
||||
.lock = _lock, \
|
||||
}; \
|
||||
|
||||
@@ -45,6 +45,14 @@ struct clk_hw;
|
||||
* undo any work done in the @prepare callback. Called with
|
||||
* prepare_lock held.
|
||||
*
|
||||
* @is_prepared: Queries the hardware to determine if the clock is prepared.
|
||||
* This function is allowed to sleep. Optional, if this op is not
|
||||
* set then the prepare count will be used.
|
||||
*
|
||||
* @unprepare_unused: Unprepare the clock atomically. Only called from
|
||||
* clk_disable_unused for prepare clocks with special needs.
|
||||
* Called with prepare mutex held. This function may sleep.
|
||||
*
|
||||
* @enable: Enable the clock atomically. This must not return until the
|
||||
* clock is generating a valid clock signal, usable by consumer
|
||||
* devices. Called with enable_lock held. This function must not
|
||||
@@ -108,6 +116,8 @@ struct clk_hw;
|
||||
struct clk_ops {
|
||||
int (*prepare)(struct clk_hw *hw);
|
||||
void (*unprepare)(struct clk_hw *hw);
|
||||
int (*is_prepared)(struct clk_hw *hw);
|
||||
void (*unprepare_unused)(struct clk_hw *hw);
|
||||
int (*enable)(struct clk_hw *hw);
|
||||
void (*disable)(struct clk_hw *hw);
|
||||
int (*is_enabled)(struct clk_hw *hw);
|
||||
@@ -287,8 +297,9 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name,
|
||||
struct clk_mux {
|
||||
struct clk_hw hw;
|
||||
void __iomem *reg;
|
||||
u32 *table;
|
||||
u32 mask;
|
||||
u8 shift;
|
||||
u8 width;
|
||||
u8 flags;
|
||||
spinlock_t *lock;
|
||||
};
|
||||
@@ -297,11 +308,17 @@ struct clk_mux {
|
||||
#define CLK_MUX_INDEX_BIT BIT(1)
|
||||
|
||||
extern const struct clk_ops clk_mux_ops;
|
||||
|
||||
struct clk *clk_register_mux(struct device *dev, const char *name,
|
||||
const char **parent_names, u8 num_parents, unsigned long flags,
|
||||
void __iomem *reg, u8 shift, u8 width,
|
||||
u8 clk_mux_flags, spinlock_t *lock);
|
||||
|
||||
struct clk *clk_register_mux_table(struct device *dev, const char *name,
|
||||
const char **parent_names, u8 num_parents, unsigned long flags,
|
||||
void __iomem *reg, u8 shift, u32 mask,
|
||||
u8 clk_mux_flags, u32 *table, spinlock_t *lock);
|
||||
|
||||
/**
|
||||
* struct clk_fixed_factor - fixed multiplier and divider clock
|
||||
*
|
||||
@@ -325,6 +342,37 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
|
||||
const char *parent_name, unsigned long flags,
|
||||
unsigned int mult, unsigned int div);
|
||||
|
||||
/***
|
||||
* struct clk_composite - aggregate clock of mux, divider and gate clocks
|
||||
*
|
||||
* @hw: handle between common and hardware-specific interfaces
|
||||
* @mux_hw: handle between composite and hardware-specifix mux clock
|
||||
* @div_hw: handle between composite and hardware-specifix divider clock
|
||||
* @gate_hw: handle between composite and hardware-specifix gate clock
|
||||
* @mux_ops: clock ops for mux
|
||||
* @div_ops: clock ops for divider
|
||||
* @gate_ops: clock ops for gate
|
||||
*/
|
||||
struct clk_composite {
|
||||
struct clk_hw hw;
|
||||
struct clk_ops ops;
|
||||
|
||||
struct clk_hw *mux_hw;
|
||||
struct clk_hw *div_hw;
|
||||
struct clk_hw *gate_hw;
|
||||
|
||||
const struct clk_ops *mux_ops;
|
||||
const struct clk_ops *div_ops;
|
||||
const struct clk_ops *gate_ops;
|
||||
};
|
||||
|
||||
struct clk *clk_register_composite(struct device *dev, const char *name,
|
||||
const char **parent_names, int num_parents,
|
||||
struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
|
||||
struct clk_hw *div_hw, const struct clk_ops *div_ops,
|
||||
struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
|
||||
unsigned long flags);
|
||||
|
||||
/**
|
||||
* clk_register - allocate a new clock, register it and return an opaque cookie
|
||||
* @dev: device that is registering this clock
|
||||
@@ -351,6 +399,7 @@ unsigned int __clk_get_enable_count(struct clk *clk);
|
||||
unsigned int __clk_get_prepare_count(struct clk *clk);
|
||||
unsigned long __clk_get_rate(struct clk *clk);
|
||||
unsigned long __clk_get_flags(struct clk *clk);
|
||||
bool __clk_is_prepared(struct clk *clk);
|
||||
bool __clk_is_enabled(struct clk *clk);
|
||||
struct clk *__clk_lookup(const char *name);
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2012 Maxime Ripard
|
||||
*
|
||||
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_CLK_SUNXI_H_
|
||||
#define __LINUX_CLK_SUNXI_H_
|
||||
|
||||
void __init sunxi_init_clocks(void);
|
||||
|
||||
#endif
|
||||
@@ -123,5 +123,6 @@ static inline void tegra_cpu_clock_resume(void)
|
||||
void tegra_periph_reset_deassert(struct clk *c);
|
||||
void tegra_periph_reset_assert(struct clk *c);
|
||||
void tegra_clocks_init(void);
|
||||
void tegra_clocks_apply_init_table(void);
|
||||
|
||||
#endif /* __LINUX_CLK_TEGRA_H_ */
|
||||
|
||||
@@ -332,15 +332,23 @@ extern int clocksource_mmio_init(void __iomem *, const char *,
|
||||
|
||||
extern int clocksource_i8253_init(void);
|
||||
|
||||
struct device_node;
|
||||
typedef void(*clocksource_of_init_fn)(struct device_node *);
|
||||
#ifdef CONFIG_CLKSRC_OF
|
||||
extern void clocksource_of_init(void);
|
||||
|
||||
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
|
||||
static const struct of_device_id __clksrc_of_table_##name \
|
||||
__used __section(__clksrc_of_table) \
|
||||
= { .compatible = compat, .data = fn };
|
||||
= { .compatible = compat, \
|
||||
.data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
|
||||
#else
|
||||
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn)
|
||||
static inline void clocksource_of_init(void) {}
|
||||
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
|
||||
static const struct of_device_id __clksrc_of_table_##name \
|
||||
__attribute__((unused)) \
|
||||
= { .compatible = compat, \
|
||||
.data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_CLOCKSOURCE_H */
|
||||
|
||||
@@ -235,6 +235,9 @@ extern struct device_node *of_find_node_with_property(
|
||||
extern struct property *of_find_property(const struct device_node *np,
|
||||
const char *name,
|
||||
int *lenp);
|
||||
extern int of_property_read_u32_index(const struct device_node *np,
|
||||
const char *propname,
|
||||
u32 index, u32 *out_value);
|
||||
extern int of_property_read_u8_array(const struct device_node *np,
|
||||
const char *propname, u8 *out_values, size_t sz);
|
||||
extern int of_property_read_u16_array(const struct device_node *np,
|
||||
@@ -394,6 +397,12 @@ static inline struct device_node *of_find_compatible_node(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int of_property_read_u32_index(const struct device_node *np,
|
||||
const char *propname, u32 index, u32 *out_value)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int of_property_read_u8_array(const struct device_node *np,
|
||||
const char *propname, u8 *out_values, size_t sz)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Renesas INTC External IRQ Pin Driver
|
||||
*
|
||||
* Copyright (C) 2013 Magnus Damm
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __IRQ_RENESAS_INTC_IRQPIN_H__
|
||||
#define __IRQ_RENESAS_INTC_IRQPIN_H__
|
||||
|
||||
struct renesas_intc_irqpin_config {
|
||||
unsigned int sense_bitfield_width;
|
||||
unsigned int irq_base;
|
||||
bool control_parent;
|
||||
};
|
||||
|
||||
#endif /* __IRQ_RENESAS_INTC_IRQPIN_H__ */
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Renesas IRQC Driver
|
||||
*
|
||||
* Copyright (C) 2013 Magnus Damm
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __IRQ_RENESAS_IRQC_H__
|
||||
#define __IRQ_RENESAS_IRQC_H__
|
||||
|
||||
struct renesas_irqc_config {
|
||||
unsigned int irq_base;
|
||||
};
|
||||
|
||||
#endif /* __IRQ_RENESAS_IRQC_H__ */
|
||||
@@ -0,0 +1,56 @@
|
||||
#ifndef __PLATFORM_DATA_SDHCI_S3C_H
|
||||
#define __PLATFORM_DATA_SDHCI_S3C_H
|
||||
|
||||
struct platform_device;
|
||||
|
||||
enum cd_types {
|
||||
S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
|
||||
S3C_SDHCI_CD_EXTERNAL, /* use external callback */
|
||||
S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
|
||||
S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
|
||||
S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
|
||||
* @max_width: The maximum number of data bits supported.
|
||||
* @host_caps: Standard MMC host capabilities bit field.
|
||||
* @host_caps2: The second standard MMC host capabilities bit field.
|
||||
* @cd_type: Type of Card Detection method (see cd_types enum above)
|
||||
* @ext_cd_init: Initialize external card detect subsystem. Called on
|
||||
* sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
|
||||
* notify_func argument is a callback to the sdhci-s3c driver
|
||||
* that triggers the card detection event. Callback arguments:
|
||||
* dev is pointer to platform device of the host controller,
|
||||
* state is new state of the card (0 - removed, 1 - inserted).
|
||||
* @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
|
||||
* sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
|
||||
* notify_func argument is the same callback as for ext_cd_init.
|
||||
* @ext_cd_gpio: gpio pin used for external CD line, valid only if
|
||||
* cd_type == S3C_SDHCI_CD_GPIO
|
||||
* @ext_cd_gpio_invert: invert values for external CD gpio line
|
||||
* @cfg_gpio: Configure the GPIO for a specific card bit-width
|
||||
*
|
||||
* Initialisation data specific to either the machine or the platform
|
||||
* for the device driver to use or call-back when configuring gpio or
|
||||
* card speed information.
|
||||
*/
|
||||
struct s3c_sdhci_platdata {
|
||||
unsigned int max_width;
|
||||
unsigned int host_caps;
|
||||
unsigned int host_caps2;
|
||||
unsigned int pm_caps;
|
||||
enum cd_types cd_type;
|
||||
|
||||
int ext_cd_gpio;
|
||||
bool ext_cd_gpio_invert;
|
||||
int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
|
||||
int state));
|
||||
int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
|
||||
int state));
|
||||
|
||||
void (*cfg_gpio)(struct platform_device *dev, int width);
|
||||
};
|
||||
|
||||
|
||||
#endif /* __PLATFORM_DATA_SDHCI_S3C_H */
|
||||
@@ -0,0 +1,51 @@
|
||||
#ifndef _LINUX_RESET_CONTROLLER_H_
|
||||
#define _LINUX_RESET_CONTROLLER_H_
|
||||
|
||||
#include <linux/list.h>
|
||||
|
||||
struct reset_controller_dev;
|
||||
|
||||
/**
|
||||
* struct reset_control_ops
|
||||
*
|
||||
* @reset: for self-deasserting resets, does all necessary
|
||||
* things to reset the device
|
||||
* @assert: manually assert the reset line, if supported
|
||||
* @deassert: manually deassert the reset line, if supported
|
||||
*/
|
||||
struct reset_control_ops {
|
||||
int (*reset)(struct reset_controller_dev *rcdev, unsigned long id);
|
||||
int (*assert)(struct reset_controller_dev *rcdev, unsigned long id);
|
||||
int (*deassert)(struct reset_controller_dev *rcdev, unsigned long id);
|
||||
};
|
||||
|
||||
struct module;
|
||||
struct device_node;
|
||||
|
||||
/**
|
||||
* struct reset_controller_dev - reset controller entity that might
|
||||
* provide multiple reset controls
|
||||
* @ops: a pointer to device specific struct reset_control_ops
|
||||
* @owner: kernel module of the reset controller driver
|
||||
* @list: internal list of reset controller devices
|
||||
* @of_node: corresponding device tree node as phandle target
|
||||
* @of_reset_n_cells: number of cells in reset line specifiers
|
||||
* @of_xlate: translation function to translate from specifier as found in the
|
||||
* device tree to id as given to the reset control ops
|
||||
* @nr_resets: number of reset controls in this reset controller device
|
||||
*/
|
||||
struct reset_controller_dev {
|
||||
struct reset_control_ops *ops;
|
||||
struct module *owner;
|
||||
struct list_head list;
|
||||
struct device_node *of_node;
|
||||
int of_reset_n_cells;
|
||||
int (*of_xlate)(struct reset_controller_dev *rcdev,
|
||||
const struct of_phandle_args *reset_spec);
|
||||
unsigned int nr_resets;
|
||||
};
|
||||
|
||||
int reset_controller_register(struct reset_controller_dev *rcdev);
|
||||
void reset_controller_unregister(struct reset_controller_dev *rcdev);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef _LINUX_RESET_H_
|
||||
#define _LINUX_RESET_H_
|
||||
|
||||
struct device;
|
||||
struct reset_control;
|
||||
|
||||
int reset_control_reset(struct reset_control *rstc);
|
||||
int reset_control_assert(struct reset_control *rstc);
|
||||
int reset_control_deassert(struct reset_control *rstc);
|
||||
|
||||
struct reset_control *reset_control_get(struct device *dev, const char *id);
|
||||
void reset_control_put(struct reset_control *rstc);
|
||||
struct reset_control *devm_reset_control_get(struct device *dev, const char *id);
|
||||
|
||||
int device_reset(struct device *dev);
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
struct nop_usb_xceiv_platform_data {
|
||||
enum usb_phy_type type;
|
||||
unsigned long clk_rate;
|
||||
|
||||
/* if set fails with -EPROBE_DEFER if can't get regulator */
|
||||
unsigned int needs_vcc:1;
|
||||
unsigned int needs_reset:1;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define ATMEL_LCDC_WIRING_BGR 0
|
||||
#define ATMEL_LCDC_WIRING_RGB 1
|
||||
|
||||
struct atmel_lcdfb_config;
|
||||
|
||||
/* LCD Controller info data structure, stored in device platform_data */
|
||||
struct atmel_lcdfb_info {
|
||||
@@ -61,7 +62,8 @@ struct atmel_lcdfb_info {
|
||||
void (*atmel_lcdfb_power_control)(int on);
|
||||
struct fb_monspecs *default_monspecs;
|
||||
u32 pseudo_palette[16];
|
||||
bool have_intensity_bit;
|
||||
|
||||
struct atmel_lcdfb_config *config;
|
||||
};
|
||||
|
||||
#define ATMEL_LCDC_DMABADDR1 0x00
|
||||
|
||||
Reference in New Issue
Block a user