mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'for-3.5/usb-ulpi' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/drivers
By Stephen Warren (30) and others via Stephen Warren * 'for-3.5/usb-ulpi' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (7 commits) ARM: dt: tegra: pinmux changes for USB ULPI ARM: tegra: add USB ULPI PHY reset GPIO to device tree ARM: tegra: don't hard-code USB ULPI PHY reset_gpio ARM: tegra: change pll_p_out4's rate to 24MHz ARM: tegra: fix pclk rate ARM: tegra: reparent sclk to pll_c_out1 ARM: tegra: Add pllc clock init table + depends/pinctrl/mergebase branch Pinctrl mergebase has a conflict in drivers/pinctrl/core.c that was resolved. Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
bd69e27304
65 changed files with 3441 additions and 3515 deletions
|
|
@ -259,6 +259,37 @@ extern void of_detach_node(struct device_node *);
|
|||
#endif
|
||||
|
||||
#define of_match_ptr(_ptr) (_ptr)
|
||||
|
||||
/*
|
||||
* struct property *prop;
|
||||
* const __be32 *p;
|
||||
* u32 u;
|
||||
*
|
||||
* of_property_for_each_u32(np, "propname", prop, p, u)
|
||||
* printk("U32 value: %x\n", u);
|
||||
*/
|
||||
const __be32 *of_prop_next_u32(struct property *prop, const __be32 *cur,
|
||||
u32 *pu);
|
||||
#define of_property_for_each_u32(np, propname, prop, p, u) \
|
||||
for (prop = of_find_property(np, propname, NULL), \
|
||||
p = of_prop_next_u32(prop, NULL, &u); \
|
||||
p; \
|
||||
p = of_prop_next_u32(prop, p, &u))
|
||||
|
||||
/*
|
||||
* struct property *prop;
|
||||
* const char *s;
|
||||
*
|
||||
* of_property_for_each_string(np, "propname", prop, s)
|
||||
* printk("String value: %s\n", s);
|
||||
*/
|
||||
const char *of_prop_next_string(struct property *prop, const char *cur);
|
||||
#define of_property_for_each_string(np, propname, prop, s) \
|
||||
for (prop = of_find_property(np, propname, NULL), \
|
||||
s = of_prop_next_string(prop, NULL); \
|
||||
s; \
|
||||
s = of_prop_next_string(prop, s))
|
||||
|
||||
#else /* CONFIG_OF */
|
||||
|
||||
static inline bool of_have_populated_dt(void)
|
||||
|
|
@ -349,6 +380,10 @@ static inline int of_machine_is_compatible(const char *compat)
|
|||
|
||||
#define of_match_ptr(_ptr) NULL
|
||||
#define of_match_node(_matches, _node) NULL
|
||||
#define of_property_for_each_u32(np, propname, prop, p, u) \
|
||||
while (0)
|
||||
#define of_property_for_each_string(np, propname, prop, s) \
|
||||
while (0)
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ extern struct pinctrl_state * __must_check pinctrl_lookup_state(
|
|||
const char *name);
|
||||
extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s);
|
||||
|
||||
extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev);
|
||||
extern void devm_pinctrl_put(struct pinctrl *p);
|
||||
|
||||
#else /* !CONFIG_PINCTRL */
|
||||
|
||||
static inline int pinctrl_request_gpio(unsigned gpio)
|
||||
|
|
@ -79,6 +82,15 @@ static inline int pinctrl_select_state(struct pinctrl *p,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline struct pinctrl * __must_check devm_pinctrl_get(struct device *dev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void devm_pinctrl_put(struct pinctrl *p)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PINCTRL */
|
||||
|
||||
static inline struct pinctrl * __must_check pinctrl_get_select(
|
||||
|
|
@ -113,6 +125,38 @@ static inline struct pinctrl * __must_check pinctrl_get_select_default(
|
|||
return pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
|
||||
}
|
||||
|
||||
static inline struct pinctrl * __must_check devm_pinctrl_get_select(
|
||||
struct device *dev, const char *name)
|
||||
{
|
||||
struct pinctrl *p;
|
||||
struct pinctrl_state *s;
|
||||
int ret;
|
||||
|
||||
p = devm_pinctrl_get(dev);
|
||||
if (IS_ERR(p))
|
||||
return p;
|
||||
|
||||
s = pinctrl_lookup_state(p, name);
|
||||
if (IS_ERR(s)) {
|
||||
devm_pinctrl_put(p);
|
||||
return ERR_PTR(PTR_ERR(s));
|
||||
}
|
||||
|
||||
ret = pinctrl_select_state(p, s);
|
||||
if (ret < 0) {
|
||||
devm_pinctrl_put(p);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static inline struct pinctrl * __must_check devm_pinctrl_get_select_default(
|
||||
struct device *dev)
|
||||
{
|
||||
return devm_pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PINCONF
|
||||
|
||||
extern int pin_config_get(const char *dev_name, const char *name,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ struct seq_file;
|
|||
* per-device info for a certain pin in debugfs
|
||||
* @pin_config_group_dbg_show: optional debugfs display hook that will provide
|
||||
* per-device info for a certain group in debugfs
|
||||
* @pin_config_config_dbg_show: optional debugfs display hook that will decode
|
||||
* and display a driver's pin configuration parameter
|
||||
*/
|
||||
struct pinconf_ops {
|
||||
#ifdef CONFIG_GENERIC_PINCONF
|
||||
|
|
@ -56,6 +58,9 @@ struct pinconf_ops {
|
|||
void (*pin_config_group_dbg_show) (struct pinctrl_dev *pctldev,
|
||||
struct seq_file *s,
|
||||
unsigned selector);
|
||||
void (*pin_config_config_dbg_show) (struct pinctrl_dev *pctldev,
|
||||
struct seq_file *s,
|
||||
unsigned long config);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,9 +21,11 @@
|
|||
|
||||
struct device;
|
||||
struct pinctrl_dev;
|
||||
struct pinctrl_map;
|
||||
struct pinmux_ops;
|
||||
struct pinconf_ops;
|
||||
struct gpio_chip;
|
||||
struct device_node;
|
||||
|
||||
/**
|
||||
* struct pinctrl_pin_desc - boards/machines provide information on their
|
||||
|
|
@ -64,9 +66,7 @@ struct pinctrl_gpio_range {
|
|||
/**
|
||||
* struct pinctrl_ops - global pin control operations, to be implemented by
|
||||
* pin controller drivers.
|
||||
* @list_groups: list the number of selectable named groups available
|
||||
* in this pinmux driver, the core will begin on 0 and call this
|
||||
* repeatedly as long as it returns >= 0 to enumerate the groups
|
||||
* @get_groups_count: Returns the count of total number of groups registered.
|
||||
* @get_group_name: return the group name of the pin group
|
||||
* @get_group_pins: return an array of pins corresponding to a certain
|
||||
* group selector @pins, and the size of the array in @num_pins
|
||||
|
|
@ -74,7 +74,7 @@ struct pinctrl_gpio_range {
|
|||
* info for a certain pin in debugfs
|
||||
*/
|
||||
struct pinctrl_ops {
|
||||
int (*list_groups) (struct pinctrl_dev *pctldev, unsigned selector);
|
||||
int (*get_groups_count) (struct pinctrl_dev *pctldev);
|
||||
const char *(*get_group_name) (struct pinctrl_dev *pctldev,
|
||||
unsigned selector);
|
||||
int (*get_group_pins) (struct pinctrl_dev *pctldev,
|
||||
|
|
@ -83,6 +83,11 @@ struct pinctrl_ops {
|
|||
unsigned *num_pins);
|
||||
void (*pin_dbg_show) (struct pinctrl_dev *pctldev, struct seq_file *s,
|
||||
unsigned offset);
|
||||
int (*dt_node_to_map) (struct pinctrl_dev *pctldev,
|
||||
struct device_node *np_config,
|
||||
struct pinctrl_map **map, unsigned *num_maps);
|
||||
void (*dt_free_map) (struct pinctrl_dev *pctldev,
|
||||
struct pinctrl_map *map, unsigned num_maps);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,9 +29,8 @@ struct pinctrl_dev;
|
|||
* is allowed to answer "no" by returning a negative error code
|
||||
* @free: the reverse function of the request() callback, frees a pin after
|
||||
* being requested
|
||||
* @list_functions: list the number of selectable named functions available
|
||||
* in this pinmux driver, the core will begin on 0 and call this
|
||||
* repeatedly as long as it returns >= 0 to enumerate mux settings
|
||||
* @get_functions_count: returns number of selectable named functions available
|
||||
* in this pinmux driver
|
||||
* @get_function_name: return the function name of the muxing selector,
|
||||
* called by the core to figure out which mux setting it shall map a
|
||||
* certain device to
|
||||
|
|
@ -62,7 +61,7 @@ struct pinctrl_dev;
|
|||
struct pinmux_ops {
|
||||
int (*request) (struct pinctrl_dev *pctldev, unsigned offset);
|
||||
int (*free) (struct pinctrl_dev *pctldev, unsigned offset);
|
||||
int (*list_functions) (struct pinctrl_dev *pctldev, unsigned selector);
|
||||
int (*get_functions_count) (struct pinctrl_dev *pctldev);
|
||||
const char *(*get_function_name) (struct pinctrl_dev *pctldev,
|
||||
unsigned selector);
|
||||
int (*get_function_groups) (struct pinctrl_dev *pctldev,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ struct tegra_ehci_platform_data {
|
|||
/* power down the phy on bus suspend */
|
||||
int power_down_on_bus_suspend;
|
||||
void *phy_config;
|
||||
int vbus_gpio;
|
||||
};
|
||||
|
||||
#endif /* _TEGRA_USB_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue