[U-Boot] [PATCH v2] Add single register pin controller driver
Masahiro Yamada
yamada.masahiro at socionext.com
Sat Feb 18 12:59:11 UTC 2017
Hi.
2017-02-17 13:08 GMT+09:00 James <james at balean.com.au>:
> Hi All,
>
> I have been following this work. Masahiro, perhaps have another look at
> pinctrl_select_state_simple (drivers/pinctrl/pinctrl-uclass.c) as this
> could be where the confusion lies. This function calls set_state_simple
> operation with the pinctrl node as the first 'dev' parameter, and the
> former 'dev' as the second 'periph' parameter.
I know how this function works.
As you see "git blame drivers/pinctrl/pinctrl-uclass.c",
this part (and most of pinctrl uclass) was written by me.
(the idea of the _simple_ pinctrl driver is from Simon, though.)
I hope you and Felix will check other .set_state_simple() callbacks
of other pinctrl drivers.
See
ar933x_pinctrl_set_state_simple()
qca953x_pinctrl_set_state_simple()
pic32_pinctrl_set_state_simple()
rk3036_pinctrl_set_state_simple()
rk3288_pinctrl_set_state_simple()
rk3399_pinctrl_set_state_simple()
All of them parse the "interrupts" property of the argument "periph".
I hope you will understand the argument "periph" represents a peripheral device
(like UART, I2C, etc. that are associated with interrupt lines).
> My testing indicates that this patch results in the correct pinmux setup. I
> have added support for 8 and 16 bit register widths, and will contribute
> this to Felix.
For Felix's driver to work, the argument "periph" must be a pin
configuration node
(= child of pinctrl device node).
This comes from the "dev" argument of device_probe().
How can you probe the pin configuration device?
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list