linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/19] sh-pfc: Support pins with no associated GPIO port
@ 2013-07-15 23:39 Laurent Pinchart
  2013-07-15 23:53 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2013-07-15 23:39 UTC (permalink / raw)
  To: linux-sh

Hello,

Here's a patch series that cleans up and refactors to sh-pfc driver to add
support for pins with no associated GPIO port.

Most configurable pins in SuperH and SH Mobile devices can be used as a GPIO.
However, some of them have selectable functions but are not associated with a
GPIO. Those pins must be defined in the pinmux pins array but not registered
in the GPIOs ranges.

The series first cleans up the sh-pfc driver by removing unused features (01
to 05) and then gradually refactors the code (06 to 13) to add pin numbers to
the sh_pfc_pin structure (14 to 16). It finally computes pin ranges
automatically (18) and adds support for pins without a GPIO port (19).

The patches have been compiled for all supported SoCs and tested on the KZM9G
board (SH73A0) with a hack to add I2C4 pins that have no GPIO port. I'm
lacking hardware to test R8A7778 which would be a good test candidate.

The patches are based on v3.11-rc1.

Laurent Pinchart (19):
  sh-pfc: Remove unused input_pd and input_pu ranges
  sh-pfc: Remove unused PORT_DATA_* macros
  sh-pfc: Remove unused macro and enum entries
  sh-pfc: Remove unneeded const keywords
  sh-pfc: Remove unused GPIO_PORT_ALL macro
  sh-pfc: Don't overallocate memory for the GPIO chip pins array
  sh-pfc: Replace pinmux_enum_id typedef with u16
  sh-pfc: Rename gpio arguments to be consistent with the rest of the
    code
  sh-pfc: Consolidate PFC SoC data macros
  sh-pfc: Consolidate pin definition macros
  sh-pfc: sh7734: Use the common GP port style macros
  sh-pfc: shx3: Remove shx3_ prefix from static symbols
  sh-pfc: Don't duplicate argument to PINMUX_GPIO macro
  sh-pfc: Add port numbers to the CPU_ALL_PORT macro
  sh-pfc: Pass the pin number down to the port function macro
  sh-pfc: Add pin number to struct sh_pfc_pin
  sh-pfc: Rename struct sh_pfc nr_pins field to nr_gpio_pins
  sh-pfc: Compute pin ranges automatically
  sh-pfc: Support pins not associated with a GPIO port

 drivers/pinctrl/sh-pfc/core.c        |   99 ++-
 drivers/pinctrl/sh-pfc/core.h        |   10 +-
 drivers/pinctrl/sh-pfc/gpio.c        |   45 +-
 drivers/pinctrl/sh-pfc/pfc-r8a73a4.c |  157 ++---
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c |   47 +-
 drivers/pinctrl/sh-pfc/pfc-r8a7778.c |   55 +-
 drivers/pinctrl/sh-pfc/pfc-r8a7779.c |   63 +-
 drivers/pinctrl/sh-pfc/pfc-r8a7790.c |   59 +-
 drivers/pinctrl/sh-pfc/pfc-sh7203.c  |  202 ++++---
 drivers/pinctrl/sh-pfc/pfc-sh7264.c  |  246 ++++----
 drivers/pinctrl/sh-pfc/pfc-sh7269.c  |  285 +++++----
 drivers/pinctrl/sh-pfc/pfc-sh7372.c  |   53 +-
 drivers/pinctrl/sh-pfc/pfc-sh73a0.c  |  104 ++--
 drivers/pinctrl/sh-pfc/pfc-sh7720.c  |  701 +++++++++++-----------
 drivers/pinctrl/sh-pfc/pfc-sh7722.c  |  747 +++++++++++------------
 drivers/pinctrl/sh-pfc/pfc-sh7723.c  |  381 ++++++------
 drivers/pinctrl/sh-pfc/pfc-sh7724.c  | 1093 ++++++++++++++++------------------
 drivers/pinctrl/sh-pfc/pfc-sh7734.c  |   60 +-
 drivers/pinctrl/sh-pfc/pfc-sh7757.c  |  709 +++++++++++-----------
 drivers/pinctrl/sh-pfc/pfc-sh7785.c  |  700 +++++++++++-----------
 drivers/pinctrl/sh-pfc/pfc-sh7786.c  |  383 ++++++------
 drivers/pinctrl/sh-pfc/pfc-shx3.c    |  423 +++++++------
 drivers/pinctrl/sh-pfc/pinctrl.c     |   49 +-
 drivers/pinctrl/sh-pfc/sh_pfc.h      |  277 +++++----
 24 files changed, 3275 insertions(+), 3673 deletions(-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 00/19] sh-pfc: Support pins with no associated GPIO port
  2013-07-15 23:39 [PATCH 00/19] sh-pfc: Support pins with no associated GPIO port Laurent Pinchart
@ 2013-07-15 23:53 ` Laurent Pinchart
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2013-07-15 23:53 UTC (permalink / raw)
  To: linux-sh

On Tuesday 16 July 2013 01:39:48 Laurent Pinchart wrote:
> Hello,
> 
> Here's a patch series that cleans up and refactors to sh-pfc driver to add
> support for pins with no associated GPIO port.
> 
> Most configurable pins in SuperH and SH Mobile devices can be used as a
> GPIO. However, some of them have selectable functions but are not
> associated with a GPIO. Those pins must be defined in the pinmux pins array
> but not registered in the GPIOs ranges.
> 
> The series first cleans up the sh-pfc driver by removing unused features (01
> to 05) and then gradually refactors the code (06 to 13) to add pin numbers
> to the sh_pfc_pin structure (14 to 16). It finally computes pin ranges
> automatically (18) and adds support for pins without a GPIO port (19).
> 
> The patches have been compiled for all supported SoCs and tested on the
> KZM9G board (SH73A0) with a hack to add I2C4 pins that have no GPIO port.
> I'm lacking hardware to test R8A7778 which would be a good test candidate.
> 
> The patches are based on v3.11-rc1.
> 
> Laurent Pinchart (19):
>   sh-pfc: Remove unused input_pd and input_pu ranges

It seems like the first patch is too big for vger :-/ I'll split it and 
repost.

>   sh-pfc: Remove unused PORT_DATA_* macros
>   sh-pfc: Remove unused macro and enum entries
>   sh-pfc: Remove unneeded const keywords
>   sh-pfc: Remove unused GPIO_PORT_ALL macro
>   sh-pfc: Don't overallocate memory for the GPIO chip pins array
>   sh-pfc: Replace pinmux_enum_id typedef with u16
>   sh-pfc: Rename gpio arguments to be consistent with the rest of the
>     code
>   sh-pfc: Consolidate PFC SoC data macros
>   sh-pfc: Consolidate pin definition macros
>   sh-pfc: sh7734: Use the common GP port style macros
>   sh-pfc: shx3: Remove shx3_ prefix from static symbols
>   sh-pfc: Don't duplicate argument to PINMUX_GPIO macro
>   sh-pfc: Add port numbers to the CPU_ALL_PORT macro
>   sh-pfc: Pass the pin number down to the port function macro
>   sh-pfc: Add pin number to struct sh_pfc_pin
>   sh-pfc: Rename struct sh_pfc nr_pins field to nr_gpio_pins
>   sh-pfc: Compute pin ranges automatically
>   sh-pfc: Support pins not associated with a GPIO port
> 
>  drivers/pinctrl/sh-pfc/core.c        |   99 ++-
>  drivers/pinctrl/sh-pfc/core.h        |   10 +-
>  drivers/pinctrl/sh-pfc/gpio.c        |   45 +-
>  drivers/pinctrl/sh-pfc/pfc-r8a73a4.c |  157 ++---
>  drivers/pinctrl/sh-pfc/pfc-r8a7740.c |   47 +-
>  drivers/pinctrl/sh-pfc/pfc-r8a7778.c |   55 +-
>  drivers/pinctrl/sh-pfc/pfc-r8a7779.c |   63 +-
>  drivers/pinctrl/sh-pfc/pfc-r8a7790.c |   59 +-
>  drivers/pinctrl/sh-pfc/pfc-sh7203.c  |  202 ++++---
>  drivers/pinctrl/sh-pfc/pfc-sh7264.c  |  246 ++++----
>  drivers/pinctrl/sh-pfc/pfc-sh7269.c  |  285 +++++----
>  drivers/pinctrl/sh-pfc/pfc-sh7372.c  |   53 +-
>  drivers/pinctrl/sh-pfc/pfc-sh73a0.c  |  104 ++--
>  drivers/pinctrl/sh-pfc/pfc-sh7720.c  |  701 +++++++++++-----------
>  drivers/pinctrl/sh-pfc/pfc-sh7722.c  |  747 +++++++++++------------
>  drivers/pinctrl/sh-pfc/pfc-sh7723.c  |  381 ++++++------
>  drivers/pinctrl/sh-pfc/pfc-sh7724.c  | 1093 +++++++++++++++----------------
>  drivers/pinctrl/sh-pfc/pfc-sh7734.c  |   60 +-
>  drivers/pinctrl/sh-pfc/pfc-sh7757.c  |  709 +++++++++++-----------
>  drivers/pinctrl/sh-pfc/pfc-sh7785.c  |  700 +++++++++++-----------
>  drivers/pinctrl/sh-pfc/pfc-sh7786.c  |  383 ++++++------
>  drivers/pinctrl/sh-pfc/pfc-shx3.c    |  423 +++++++------
>  drivers/pinctrl/sh-pfc/pinctrl.c     |   49 +-
>  drivers/pinctrl/sh-pfc/sh_pfc.h      |  277 +++++----
>  24 files changed, 3275 insertions(+), 3673 deletions(-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-15 23:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 23:39 [PATCH 00/19] sh-pfc: Support pins with no associated GPIO port Laurent Pinchart
2013-07-15 23:53 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).