[U-Boot] [PATCH 1/2] x86: gpio: Make x86-pinctrl subnode of ich6-gpio

Simon Glass sjg at chromium.org
Fri Oct 9 13:18:45 CEST 2015


+Masahiro

Hi George,

On 8 October 2015 at 20:44, George McCollister
<george.mccollister at gmail.com> wrote:
> On Thu, Oct 8, 2015 at 12:43 PM, Simon Glass <sjg at chromium.org> wrote:
>> Hi George,
>>
>> On 7 October 2015 at 16:29, George McCollister
>> <george.mccollister at gmail.com> wrote:
>>> Instead of having x86-pinctrl work separately from ich6-gpio have it
>>> work underneath ich6-gpio. This removes redundant configuration and will
>>> allow the addition of shared bank settings in future commits.
>>>
>>> Signed-off-by: George McCollister <george.mccollister at gmail.com>
>>> ---
>>>  arch/x86/dts/minnowmax.dts                         |  96 +++++++++---------
>>>  arch/x86/include/asm/gpio.h                        |   1 -
>>>  board/intel/minnowmax/minnowmax.c                  |   9 +-
>>>  doc/device-tree-bindings/gpio/intel,ich6-gpio.txt  |  14 +++
>>>  .../gpio/intel,x86-pinctrl.txt                     |  17 ++--
>>>  drivers/gpio/intel_ich6_gpio.c                     | 107 ++++++++-------------
>>>  6 files changed, 118 insertions(+), 126 deletions(-)
>>>  create mode 100644 doc/device-tree-bindings/gpio/intel,ich6-gpio.txt
>>
>> Conceptually pinmux and GPIO are different concepts. What is the need
>> to make pinctrl a subset of GPIO? In some ways the opposite would make
>> more sense.
>>
>> Perhaps instead we should have a pinctrl driver?
>
> Yeah, I think you're right.
>
> I think the only things you'd want the pinctrl driver to touch would
> be mode-func, pull-assign and
> pull-strength.
>
> The gpio driver would unconditionally set do
> "ich6_gpio_set_function(dev, gpio_offset, 1);" if the gpio was setup
> and you'd just need a way of setting direction and output value in
> device tree.
>
> Is there already sane structure defined we could copy or should I
> invent something? This is pretty low on my priority list but I might
> be able to get around to it in my spare time if you think it's the way
> to go.

Well there is a driver model uclass for pinctrl - Masahiro has a full
implementation for Uniphier (patches on the list).

Regards,
Simon


More information about the U-Boot mailing list