12 Mar, 2014

1 commit

  • The per-SoC data structures for Tegra pinctrl stored some information
    in a redundant way. Specifically, the list of groups that each function
    could be muxed onto was stored once explicitly, and also as part of the
    definition of each group. Eliminate this redundancy, and calculate each
    function's list of valid groups at pinctrl probe time. This removes
    thousands of lines of code from the pinctrl driver and ~16K from the
    vmlinux binary size, and adds only about 500uS to the boot process (on
    Tegra30; newer SoCs will likely be faster still).

    Signed-off-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Stephen Warren
     

06 Feb, 2014

1 commit


28 Aug, 2013

2 commits

  • When setting pin configuration in the pinctrl framework, pin_config_set() or
    pin_config_group_set() is called in a loop to set one configuration at a time
    for the specified pin or group.

    This patch 1) removes the loop and 2) changes the API to pass the whole pin
    config array to the driver. It is now up to the driver to loop through the
    configs. This allows the driver to potentially combine configs and reduce the
    number of writes to pin config registers.

    All c files changed have been build-tested to verify the change compiles and
    that the corresponding .o is successfully generated.

    Signed-off-by: Sherman Yin
    Reviewed-by: Christian Daudt
    Reviewed-by: Matt Porter
    Tested-by: Stephen Warren
    Acked-by: Laurent Pinchart
    Signed-off-by: Linus Walleij

    Sherman Yin
     
  • Using the new devm_ioremap_resource() we can greatly simplify resource handling.

    Signed-off-by: Axel Lin
    Acked-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Axel Lin
     

23 Aug, 2013

1 commit

  • Pin control utility functions provides the function for creating
    map lists.

    In place of implementing APIs locally in Tegra pin control driver
    for creating map lists, use the utility functions. This reduces
    the code size and avoid duplication.

    Changes from V1:
    - Rebased change on top of V1.
    - Use pinctrl_utils_dt_free_map

    Signed-off-by: Laxman Dewangan
    Acked-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Laxman Dewangan
     

07 Mar, 2013

1 commit


18 Jan, 2013

1 commit

  • NVIDIA's Tegra114 added two more configuration parameter in pinmux i.e.
    rcv-sel and drive type.

    rcv-sel: Select between High and Normal VIL/VIH receivers.
    RCVR_SEL=1: High VIL/VIH
    RCVR_SEL=0: Normal VIL/VIH

    drv_type: Ouptput drive type:
    33-50 ohm driver: 0x1
    66-100ohm driver: 0x0

    Add support of these parameters to be configure from DTS file.

    Tegra20 and Tegra30 does not support this configuration and hence initialize their
    pinmux structure with reg = -1.

    Originally written by Pritesh Raithatha.
    Changes by ldewangan:
    - remove drvtype_width as it is always 2.
    - Better describe the change.

    Signed-off-by: Pritesh Raithatha
    Signed-off-by: Laxman Dewangan
    Reviewed-by: Stephen Warren
    Signed-off-by: Linus Walleij

    Pritesh Raithatha
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Linus Walleij
    Cc: Jean-Christophe Plagniol-Villard
    Cc: Stephen Warren
    Cc: Srinidhi Kasagar
    Cc: Barry Song
    Cc: Viresh Kumar
    Cc: Thomas Petazzoni
    Cc: Jason Cooper
    Cc: Sebastian Hesselbarth
    Cc: Andrew Lunn
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

12 Dec, 2012

1 commit

  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the large driver core updates for 3.8-rc1.

    The biggest thing here is the various __dev* marking removals. This
    is going to be a pain for the merge with different subsystem trees, I
    know, but all of the patches included here have been ACKed by their
    various subsystem maintainers, as they wanted them to go through here.

    If this is too much of a pain, I can pull all of them out of this tree
    and just send you one with the other fixes/updates and then, after
    3.8-rc1 is out, do the rest of the removals to ensure we catch them
    all, it's up to you. The merges should all be trivial, and Stephen
    has been doing them all in linux-next for a few weeks now quite
    easily.

    Other than the __dev* marking removals, there's nothing major here,
    some firmware loading updates and other minor things in the driver
    core.

    All of these have (much to Stephen's annoyance), been in linux-next
    for a while.

    Signed-off-by: Greg Kroah-Hartman "

    Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio
    update.

    * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits)
    modpost.c: Stop checking __dev* section mismatches
    init.h: Remove __dev* sections from the kernel
    acpi: remove use of __devinit
    PCI: Remove __dev* markings
    PCI: Always build setup-bus when PCI is enabled
    PCI: Move pci_uevent into pci-driver.c
    PCI: Remove CONFIG_HOTPLUG ifdefs
    unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs
    sh/PCI: Remove CONFIG_HOTPLUG ifdefs
    powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs
    mips/PCI: Remove CONFIG_HOTPLUG ifdefs
    microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs
    dma: remove use of __devinit
    dma: remove use of __devexit_p
    firewire: remove use of __devinitdata
    firewire: remove use of __devinit
    leds: remove use of __devexit
    leds: remove use of __devinit
    leds: remove use of __devexit_p
    mmc: remove use of __devexit
    ...

    Linus Torvalds
     

29 Nov, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: Jean-Christophe Plagniol-Villard
    Cc: Stephen Warren
    Cc: Viresh Kumar
    Acked-by: Linus Walleij
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

15 Nov, 2012

1 commit


12 Nov, 2012

1 commit

  • They are not referenced outside respective driver.

    Signed-off-by: Axel Lin
    Cc: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Simon Arlott
    Cc: John Crispin
    Cc: Shawn Guo
    Cc: Stephen Warren
    Acked-by: Dong Aisheng
    Signed-off-by: Linus Walleij

    Axel Lin
     

18 Oct, 2012

1 commit


15 Sep, 2012

1 commit


04 Jul, 2012

2 commits

  • pinctrl_register returns a pointer of struct type struct pinctrl_dev,
    if successfully registered to pinctrl subsystem, otherwise returns
    NULL, and there wont' be any pointers which are not dereferencible.

    They are not type of pointer addresses but are kind of error
    codes rather actual addresses, but are a kind of return
    codes of functions returning integer types.

    return -ENODEV if device registration fails.

    Acked-by: Stephen Warren
    Signed-off-by: Devendra Naga
    Signed-off-by: Linus Walleij

    Devendra Naga
     
  • The gpio ranges will be automatically removed when the pinctrl
    driver is unregistered.

    Acked-by: Stephen Warren
    Signed-off-by: Dong Aisheng
    Signed-off-by: Linus Walleij

    Dong Aisheng
     

26 Apr, 2012

1 commit


19 Apr, 2012

3 commits

  • * Only provide debugfs-relates ops when CONFIG_DEBUG_FS is enabled.
    * Implement pin_config_group_dbg_show op.
    * Implement pin_config_config_dbg_show op.

    Signed-off-by: Stephen Warren
    Acked-by: Linus Walleij

    Stephen Warren
     
  • Rather than having a single tegra-pinctrl driver that determines whether
    it's running on Tegra20 or Tegra30, instead have separate drivers for
    each that call into utility functions to implement the majority of the
    driver. This change is based on review feedback of the SPEAr pinctrl
    driver, which had originally copied to Tegra driver structure.

    This requires that the two drivers have unique names. Update a couple
    spots in arch/arm/mach-tegra for the name change.

    Signed-off-by: Stephen Warren
    Acked-by: Linus Walleij

    Stephen Warren
     
  • * Rename old pinmux and new pinctrl platform driver and DT match table
    entries, so the new driver gets instantiated.
    * Re-write board-pinmux.c, so that it uses pinctrl APIs to configura the
    pinmux.
    * Re-write board-*-pinmux.c so that the pinmux configuration tables are
    in pinctrl format.

    Ventana's pin mux table needed some edits on top of the basic format
    conversion, since some mux options that were previously marked as
    reserved are now valid in the new pinctrl driver. Attempting to use the
    old reserved names will result in a failure. Specifically, groups lpw0,
    lpw2, lsc1, lsck, and lsda were changed from function rsvd4 to displaya,
    and group pta was changed from function rsvd2 to hdmi.

    All boards' pin mux tables needed some edits on top of the based format
    conversion, since function i2c was split into i2c1 (first general I2C
    controller) and i2cp (power I2C controller) to better align function
    definitions with HW blocks.

    Due to the split of mux tables into pure mux and pull/tristate tables,
    many entries in the separate Seaboard/Ventana tables could be merged
    into the common table, since the entries differed only in the portion
    in one of the tables, not both.

    Most pin groups allow configuration of mux, tri-state, and pull. However,
    some don't allow pull configuration, which is instead configured by new
    groups that only allow pull configuration. This is a reflection of the
    true HW capabilities, which weren't fully represented by the old pinmux
    driver. This required adding new pull table entries for those new groups,
    and setting many other entries' pull configuration to
    TEGRA_PINCONFIG_DONT_SET.

    Signed-off-by: Stephen Warren
    Acked-by: Linus Walleij
    Acked-by: Olof Johansson

    Stephen Warren
     

18 Apr, 2012

2 commits

  • Implement pinctrl_ops dt_node_to_map() and dt_free_map(). These allow
    complete specification of the desired pinmux configuration using device
    tree.

    Signed-off-by: Stephen Warren
    Acked-by: Dong Aisheng
    Signed-off-by: Linus Walleij

    Stephen Warren
     
  • Most of the SoC drivers implement list_groups() and list_functions()
    routines for pinctrl and pinmux. These routines continue returning
    zero until the selector argument is greater than total count of
    available groups or functions.

    This patch replaces these list_*() routines with get_*_count()
    routines, which returns the number of available selection for SoC
    driver. pinctrl layer will use this value to check the range it can
    choose.

    This patch fixes all user drivers for this change. There are other
    routines in user drivers, which have checks to check validity of
    selector passed to them. It is also no more required and hence
    removed.

    Documentation updated as well.

    Acked-by: Stephen Warren
    Signed-off-by: Viresh Kumar
    [Folded in fix and fixed a minor merge artifact manually]
    Signed-off-by: Linus Walleij

    Viresh Kumar
     

06 Mar, 2012

1 commit

  • This adds a driver for the Tegra pinmux, and required parameterization
    data for Tegra20 and Tegra30.

    The driver is initially added with driver name and device tree compatible
    value that won't cause this driver to be used. A later change will switch
    the pinctrl driver to use the correct values, switch the old pinmux
    driver to be disabled, and update all code that uses the old pinmux APIs
    to use the new pinctrl APIs.

    Signed-off-by: Stephen Warren
    Acked-by: Olof Johansson
    [squashed "fix case of Tegra30's foo_groups[] arrays"]
    Signed-off-by: Linus Walleij

    Stephen Warren