[U-Boot] [RFC v3 PATCH 4/4] pinctrl: sandbox: add sandbox pinctrl driver
Masahiro Yamada
yamada.masahiro at socionext.com
Tue Aug 25 08:39:27 CEST 2015
2015-08-12 23:16 GMT+09:00 Simon Glass <sjg at chromium.org>:
>> + compatible = "sandbox,pinctrl";
>> +
>> + pinctrl_i2c0: i2c0 {
>> + groups = "i2c";
>> + function = "i2c";
>> + bias-pull-up;
>> + };
>> +
>> + pinctrl_serial0: uart0 {
>> + groups = "serial_a";
>> + function = "serial";
>> + };
>> + };
>> +
>> spi at 0 {
>> #address-cells = <1>;
>> #size-cells = <0>;
>> @@ -168,6 +185,8 @@
>> uart0: serial {
>> compatible = "sandbox,serial";
>> sandbox,text-colour = "cyan";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_serial0>;
>> };
>>
>
> Should also have some definitions in test.fdt and a test for pinctrl.
I have not checked test framework for sandbox.
This is still unsupported in v4.
>> usb at 0 {
>> diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
>> index 874a26b..85693f0 100644
>> --- a/configs/sandbox_defconfig
>> +++ b/configs/sandbox_defconfig
>> @@ -27,6 +27,11 @@ CONFIG_SANDBOX_SERIAL=y
>> CONFIG_TPM_TIS_SANDBOX=y
>> CONFIG_SYS_I2C_SANDBOX=y
>> CONFIG_SANDBOX_SPI=y
>> +CONFIG_PINCTRL=y
>> +CONFIG_PINCTRL_GENERIC=y
>> +CONFIG_PINMUX=y
>> +CONFIG_PINCONF=y
>> +CONFIG_PINCTRL_SANDBOX=y
>> CONFIG_SANDBOX_GPIO=y
>> CONFIG_DM_PMIC=y
>> CONFIG_DM_PMIC_SANDBOX=y
>> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
>> index eca83fe..c6229d9 100644
>> --- a/drivers/pinctrl/Kconfig
>> +++ b/drivers/pinctrl/Kconfig
>> @@ -45,6 +45,9 @@ config SPL_PINCONF
>>
>> if PINCTRL || SPL_PINCTRL
>>
>> +config PINCTRL_SANDBOX
>> + bool "Sandbox pinctrl driver"
>
> help - what does this support / do?
Added in v4.
>> +
>> endif
>>
>> endmenu
>> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
>> index a713c7d..35decf4 100644
>> --- a/drivers/pinctrl/Makefile
>> +++ b/drivers/pinctrl/Makefile
>> @@ -1,2 +1,4 @@
>> obj-y += pinctrl-uclass.o
>> obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC) += pinctrl-generic.o
>> +
>> +obj-$(CONFIG_PINCTRL_SANDBOX) += pinctrl-sandbox.o
>> diff --git a/drivers/pinctrl/pinctrl-sandbox.c b/drivers/pinctrl/pinctrl-sandbox.c
>> new file mode 100644
>> index 0000000..1f02bf2
>> --- /dev/null
>> +++ b/drivers/pinctrl/pinctrl-sandbox.c
>> @@ -0,0 +1,157 @@
>> +/*
>> + * SPDX-License-Identifier: GPL-2.0+
>
> (C)?
Added.
>> +
>> +static int sandbox_pinctrl_probe(struct udevice *dev)
>> +{
>> + return 0;
>> +}
>> +
>> +static int sandbox_pinctrl_remove(struct udevice *dev)
>> +{
>> + return 0;
>> +}
>
> Drop those two functions?
I thought I might want to add something in there in the future, but
I deleted for now.
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list