Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept

2013-02-28 Thread Mark Brown
On Mon, Feb 18, 2013 at 06:50:39AM +, Kim, Milo wrote: > + pin->gpio = config->ena_gpio; > + pin->ena_gpio_invert = config->ena_gpio_invert; > + list_add(>list, _ena_gpio_list); We should really validate that the invert settings are consistent but it's not so important since this

Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept

2013-02-28 Thread Mark Brown
On Mon, Feb 18, 2013 at 06:50:39AM +, Kim, Milo wrote: + pin-gpio = config-ena_gpio; + pin-ena_gpio_invert = config-ena_gpio_invert; + list_add(pin-list, regulator_ena_gpio_list); We should really validate that the invert settings are consistent but it's not so important since

Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept

2013-02-18 Thread Axel Lin
> + if (pin->request_count <= 1) { > + pin->request_count = 0; > + gpio_free(pin->gpio); > + list_del(>list); > + kfree(pin); > + }

Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept

2013-02-18 Thread Axel Lin
+ if (pin-request_count = 1) { + pin-request_count = 0; + gpio_free(pin-gpio); + list_del(pin-list); + kfree(pin); + } else { +

[PATCH v3 1/4] regulator: core: support shared enable GPIO concept

2013-02-17 Thread Kim, Milo
A Regulator can be enabled by external GPIO pin. This is configurable in the regulator_config. At this moment, the GPIO can be owned by only one regulator device. In some devices, multiple regulators are enabled by shared one GPIO pin. This patch extends this limitation, enabling shared

[PATCH v3 1/4] regulator: core: support shared enable GPIO concept

2013-02-17 Thread Kim, Milo
A Regulator can be enabled by external GPIO pin. This is configurable in the regulator_config. At this moment, the GPIO can be owned by only one regulator device. In some devices, multiple regulators are enabled by shared one GPIO pin. This patch extends this limitation, enabling shared