[U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-20 Thread James Balean
Hi All, 2017-02-10 13:35 GMT+09:00 Masahiro Yamada : > That's right. > Then, the "dev" in device_probe() represents > the peripheral, such as i2c. > > Not a pin-config node, like i2c0_pins. Masahiro, have a look at the call to set_state_simple from pinctrl_select_state_simple (in

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-20 Thread Masahiro Yamada
Hi. 2017-02-17 13:08 GMT+09:00 James : > 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 >

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-17 Thread James
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

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-09 Thread Masahiro Yamada
Hi Felix, 2017-02-09 18:47 GMT+09:00 Felix Brack : > >> device_probe() > > From 'pinctrl-uclass.c::device_probe()': > > --- > /* > * Process pinctrl for everything except the root device, and > * continue regardless of the result of pinctrl. Don't process pinctrl > * settings for

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-09 Thread Felix Brack
Hello Masahiro, On 08.02.2017 16:27, Masahiro Yamada wrote: > Hi. > > >>> 2017-02-07 22:30 GMT+09:00 Felix Brack : >>> + +static int single_set_state_simple(struct udevice *dev, + struct udevice *periph) +{ + const

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-08 Thread Masahiro Yamada
Hi. >> 2017-02-07 22:30 GMT+09:00 Felix Brack : >> >>> + >>> +static int single_set_state_simple(struct udevice *dev, >>> + struct udevice *periph) >>> +{ >>> + const void *fdt = gd->fdt_blob; >>> + const struct single_fdt_pin_cfg *prop;

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-08 Thread Felix Brack
Hello Masahiro, This is my understanding of the parameters 'dev' and 'perihp' passed to the function implementing set_state_simple(). On 08.02.2017 04:02, Masahiro Yamada wrote: > Hi. > > > > 2017-02-07 22:30 GMT+09:00 Felix Brack : > >> + >> +static int

Re: [U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-07 Thread Masahiro Yamada
Hi. 2017-02-07 22:30 GMT+09:00 Felix Brack : > + > +static int single_set_state_simple(struct udevice *dev, > + struct udevice *periph) > +{ > + const void *fdt = gd->fdt_blob; > + const struct single_fdt_pin_cfg *prop; > + int

[U-Boot] [PATCH v2] Add single register pin controller driver

2017-02-07 Thread Felix Brack
This patch adds a pin controller driver supporting devices using a single configuration register per pin. Signed-off-by: Felix Brack --- Changes in v2: - add a comment on function single_configure_pins() explaining the function and its parameters - use fdt_getprop() to simplify