Giulio Benetti | 6fd36dd | 2020-01-10 15:47:02 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2019 |
| 4 | * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com> |
| 5 | */ |
| 6 | |
Giulio Benetti | 6fd36dd | 2020-01-10 15:47:02 +0100 | [diff] [blame] | 7 | #include <dm.h> |
| 8 | #include <dm/pinctrl.h> |
| 9 | |
| 10 | #include "pinctrl-imx.h" |
| 11 | |
| 12 | static struct imx_pinctrl_soc_info imxrt_pinctrl_soc_info = { |
| 13 | .flags = ZERO_OFFSET_VALID, |
| 14 | }; |
| 15 | |
| 16 | static int imxrt_pinctrl_probe(struct udevice *dev) |
| 17 | { |
| 18 | struct imx_pinctrl_soc_info *info = |
| 19 | (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev); |
| 20 | |
| 21 | return imx_pinctrl_probe(dev, info); |
| 22 | } |
| 23 | |
| 24 | static const struct udevice_id imxrt_pinctrl_match[] = { |
| 25 | { .compatible = "fsl,imxrt-iomuxc", |
| 26 | .data = (ulong)&imxrt_pinctrl_soc_info }, |
| 27 | { /* sentinel */ } |
| 28 | }; |
| 29 | |
| 30 | U_BOOT_DRIVER(imxrt_pinctrl) = { |
| 31 | .name = "imxrt-pinctrl", |
| 32 | .id = UCLASS_PINCTRL, |
| 33 | .of_match = of_match_ptr(imxrt_pinctrl_match), |
| 34 | .probe = imxrt_pinctrl_probe, |
| 35 | .remove = imx_pinctrl_remove, |
Simon Glass | 8a2b47f | 2020-12-03 16:55:17 -0700 | [diff] [blame] | 36 | .priv_auto = sizeof(struct imx_pinctrl_priv), |
Giulio Benetti | 6fd36dd | 2020-01-10 15:47:02 +0100 | [diff] [blame] | 37 | .ops = &imx_pinctrl_ops, |
| 38 | .flags = DM_FLAG_PRE_RELOC, |
| 39 | }; |