* Pinctrl driver for STMicroelectronics STi SoCs
*
* Copyright (C) 2017, STMicroelectronics - All Rights Reserved
- * Author(s): Patrice Chotard, <patrice.chotard@st.com> for STMicroelectronics.
+ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
*/
#include <common.h>
/* oe = 1, pu = 1, od = 1 */
#define BIDIR_PU (OE | PU | OD)
-struct sti_pinctrl_platdata {
+struct sti_pinctrl_plat {
struct regmap *regmap;
};
*/
void sti_alternate_select(struct udevice *dev, struct sti_pin_desc *pin_desc)
{
- struct sti_pinctrl_platdata *plat = dev_get_platdata(dev);
+ struct sti_pinctrl_plat *plat = dev_get_plat(dev);
unsigned long sysconf, *sysconfreg;
int alt = pin_desc->alt;
int bank = pin_desc->bank;
/* pin configuration */
void sti_pin_configure(struct udevice *dev, struct sti_pin_desc *pin_desc)
{
- struct sti_pinctrl_platdata *plat = dev_get_platdata(dev);
+ struct sti_pinctrl_plat *plat = dev_get_plat(dev);
int bit;
int oe = 0, pu = 0, od = 0;
unsigned long *sysconfreg;
static int sti_pinctrl_probe(struct udevice *dev)
{
- struct sti_pinctrl_platdata *plat = dev_get_platdata(dev);
+ struct sti_pinctrl_plat *plat = dev_get_plat(dev);
struct udevice *syscon;
int err;
.of_match = sti_pinctrl_ids,
.ops = &sti_pinctrl_ops,
.probe = sti_pinctrl_probe,
- .platdata_auto_alloc_size = sizeof(struct sti_pinctrl_platdata),
+ .plat_auto = sizeof(struct sti_pinctrl_plat),
.ops = &sti_pinctrl_ops,
};