Re: About gpio-regulator setting on DT

2014-01-30 Thread Mark Brown
On Wed, Jan 29, 2014 at 04:08:30PM -0800, Kuninori Morimoto wrote: > /* build initial state from gpio init data. */ > state = 0; > for (ptr = 0; ptr < drvdata->nr_gpios; ptr++) { > if (config->gpios[ptr].flags & GPIOF_OUT_INIT_HIGH) <== we need > this >stat

Re: About gpio-regulator setting on DT

2014-01-29 Thread Kuninori Morimoto
Hi Mark > The combination of the enable-active-high and enable-at-boot properties > ought be able to cause the driver to do the right thing, the flags do > this: > > if (config->enabled_at_boot) { > if (config->enable_high) > cfg.ena_gpio_flags |= GPIOF_

Re: About gpio-regulator setting on DT

2014-01-29 Thread Mark Brown
On Wed, Jan 29, 2014 at 04:16:03PM +, Ben Dooks wrote: > On 29/01/14 12:45, Mark Brown wrote: > >of_get_named_gpio() just looks up the GPIO number, it doesn't request > >the GPIO. > I think you've just run in to the same problem that we've found > with the GPIO regulator code for the vmmcq on

Re: About gpio-regulator setting on DT

2014-01-29 Thread Ben Dooks
On 29/01/14 12:45, Mark Brown wrote: On Wed, Jan 29, 2014 at 12:38:19AM -0800, Kuninori Morimoto wrote: How to set GPIOF_OUT_INIT_HIGH via DT ? Or, am I misunderstanding ? The combination of the enable-active-high and enable-at-boot properties ought be able to cause the driver to do the right

Re: About gpio-regulator setting on DT

2014-01-29 Thread Mark Brown
On Wed, Jan 29, 2014 at 12:38:19AM -0800, Kuninori Morimoto wrote: > How to set GPIOF_OUT_INIT_HIGH via DT ? > Or, am I misunderstanding ? The combination of the enable-active-high and enable-at-boot properties ought be able to cause the driver to do the right thing, the flags do this: i