1. 01 5月, 2012 5 次提交
    • J
      dynamic_debug: deprecate ddebug_query, suggest dyndbg instead · f0b919d9
      Jim Cromie 提交于
      With ddebug_dyndbg_boot_params_cb() handling bare dyndbg params, we
      dont need ddebug_query param anymore.  Add a warning when processing
      ddebug_query= param that it is deprecated, and to change it to dyndbg=
      
      Add a deprecation notice for v3.8 to feature-removal-schedule.txt, and
      add a suggested deprecation period of 3 releases to the header.
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f0b919d9
    • J
      dynamic_debug: make dynamic-debug work for module initialization · b48420c1
      Jim Cromie 提交于
      This introduces a fake module param $module.dyndbg.  Its based upon
      Thomas Renninger's $module.ddebug boot-time debugging patch from
      https://lkml.org/lkml/2010/9/15/397
      
      The 'fake' module parameter is provided for all modules, whether or
      not they need it.  It is not explicitly added to each module, but is
      implemented in callbacks invoked from parse_args.
      
      For builtin modules, dynamic_debug_init() now directly calls
      parse_args(..., &ddebug_dyndbg_boot_params_cb), to process the params
      undeclared in the modules, just after the ddebug tables are processed.
      
      While its slightly weird to reprocess the boot params, parse_args() is
      already called repeatedly by do_initcall_levels().  More importantly,
      the dyndbg queries (given in ddebug_query or dyndbg params) cannot be
      activated until after the ddebug tables are ready, and reusing
      parse_args is cleaner than doing an ad-hoc parse.  This reparse would
      break options like inc_verbosity, but they probably should be params,
      like verbosity=3.
      
      ddebug_dyndbg_boot_params_cb() handles both bare dyndbg (aka:
      ddebug_query) and module-prefixed dyndbg params, and ignores all other
      parameters.  For example, the following will enable pr_debug()s in 4
      builtin modules, in the order given:
      
        dyndbg="module params +p; module aio +p" module.dyndbg=+p pci.dyndbg
      
      For loadable modules, parse_args() in load_module() calls
      ddebug_dyndbg_module_params_cb().  This handles bare dyndbg params as
      passed from modprobe, and errors on other unknown params.
      
      Note that modprobe reads /proc/cmdline, so "modprobe foo" grabs all
      foo.params, strips the "foo.", and passes these to the kernel.
      ddebug_dyndbg_module_params_cb() is again called for the unknown
      params; it handles dyndbg, and errors on others.  The "doing" arg
      added previously contains the module name.
      
      For non CONFIG_DYNAMIC_DEBUG builds, the stub function accepts
      and ignores $module.dyndbg params, other unknowns get -ENOENT.
      
      If no param value is given (as in pci.dyndbg example above), "+p" is
      assumed, which enables all pr_debug callsites in the module.
      
      The dyndbg fake parameter is not shown in /sys/module/*/parameters,
      thus it does not use any resources.  Changes to it are made via the
      control file.
      
      Also change pr_info in ddebug_exec_queries to vpr_info,
      no need to see it all the time.
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      CC: Thomas Renninger <trenn@suse.de>
      CC: Rusty Russell <rusty@rustcorp.com.au>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b48420c1
    • J
      params: add 3rd arg to option handler callback signature · 9fb48c74
      Jim Cromie 提交于
      Add a 3rd arg, named "doing", to unknown-options callbacks invoked
      from parse_args(). The arg is passed as:
      
        "Booting kernel" from start_kernel(),
        initcall_level_names[i] from do_initcall_level(),
        mod->name from load_module(), via parse_args(), parse_one()
      
      parse_args() already has the "name" parameter, which is renamed to
      "doing" to better reflect current uses 1,2 above.  parse_args() passes
      it to an altered parse_one(), which now passes it down into the
      unknown option handler callbacks.
      
      The mod->name will be needed to handle dyndbg for loadable modules,
      since params passed by modprobe are not qualified (they do not have a
      "$modname." prefix), and by the time the unknown-param callback is
      called, the module name is not otherwise available.
      
      Minor tweaks:
      
      Add param-name to parse_one's pr_debug(), current message doesnt
      identify the param being handled, add it.
      
      Add a pr_info to print current level and level_name of the initcall,
      and number of registered initcalls at that level.  This adds 7 lines
      to dmesg output, like:
      
         initlevel:6=device, 172 registered initcalls
      
      Drop "parameters" from initcall_level_names[], its unhelpful in the
      pr_info() added above.  This array is passed into parse_args() by
      do_initcall_level().
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9fb48c74
    • J
      dynamic_debug: fix leading spaces in dynamic_debug.h · 3faa2860
      Jim Cromie 提交于
      clean up some space-before-tabs problems.
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3faa2860
    • J
      dynamic_debug: replace if (verbose) pr_info with macro vpr_info · b8ccd5de
      Jim Cromie 提交于
      Use vpr_info to declutter code, reduce indenting, and change one
      additional pr_info call in ddebug_exec_queries.
      Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b8ccd5de
  2. 30 4月, 2012 2 次提交
  3. 26 4月, 2012 1 次提交
  4. 24 4月, 2012 3 次提交
  5. 21 4月, 2012 6 次提交
    • M
    • M
      Extcon: support mutually exclusive relation between cables. · bde68e60
      MyungJoo Ham 提交于
      There could be cables that t recannot be attaches simulatenously. Extcon
      device drivers may express such information via mutually_exclusive in
      struct extcon_dev.
      
      For example, for an extcon device with 16 cables (bits 0 to 15 are
      available), if mutually_exclusive = { 0x7, 0xC0, 0x81, 0 }, then, the
      following attachments are prohibitted.
      {0, 1}
      {0, 2}
      {1, 2}
      {6, 7}
      {0, 7}
      and every attachment set that are superset of one of the above.
      For the detail, please refer to linux/include/linux/extcon.h.
      
      The concept is suggested by NeilBrown <neilb@suse.de>
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      
      --
      Changes from V5:
      - Updated sysfs format
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bde68e60
    • M
      Extcon: support multiple states at a device. · 806d9dd7
      MyungJoo Ham 提交于
      One switch device (e.g., MUIC(MAX8997, MAX77686, ...), and some 30-pin
      devices) may have multiple cables attached. For example, one
      30-pin port may inhabit a USB cable, an HDMI cable, and a mic.
      Thus, one switch device requires multiple state bits each representing
      a type of cable.
      
      For such purpose, we use the 32bit state variable; thus, up to 32
      different type of cables may be defined for a switch device. The list of
      possible cables is defined by the array of cable names in the switch_dev
      struct given to the class.
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      
      --
      Changes from V7
      - Bugfixed in _call_per_cable() (incorrect nb) (Chanwoo Choi)
      - Compiler error in header for !CONFIG_EXTCON (Chanwoo Choi)
      
      Changes from V5
      - Sysfs style reformed: subdirectory per cable.
      - Updated standard cable names
      - Removed unnecessary printf
      - Bugfixes after testing
      
      Changes from V4
      - Bugfixes after more testing at Exynos4412 boards with userspace
        processses.
      
      Changes from V3
      - Bugfixes after more testing at Exynos4412 boards.
      
      Changes from V2
      - State can be stored by user
      - Documentation updated
      
      Changes from RFC
      - Switch is renamed to extcon
      - Added kerneldoc comments
      - Added APIs to support "standard" cable names
      - Added helper APIs to support notifier block registration with cable
        name.
      - Regrouped function list in the header file.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      806d9dd7
    • D
      Extcon: support notification based on the state changes. · 74c5d09b
      Donggeun Kim 提交于
      State changes of extcon devices have been notified via kobjet_uevent.
      This patch adds notifier interfaces in order to allow device drivers to
      get notified easily. Along with notifier interface,
      extcon_get_extcon_dev() function is added so that device drivers may
      discover a extcon_dev easily.
      Signed-off-by: NDonggeun Kim <dg77.kim@samsung.com>
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      
      --
      Changes from RFC
      - Renamed switch to extcon
      - Bugfix: extcon_dev_unregister()
      - Bugfix: "edev->dev" is "internal" data.
      - Added kerneldoc comments.
      - Reworded comments.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      74c5d09b
    • M
      Extcon: support generic GPIO extcon driver · be48308a
      MyungJoo Ham 提交于
      The generic GPIO extcon driver (an external connector device based on
      GPIO control) and imported from Android kernel.
      
      switch: switch class and GPIO drivers. (splitted)
      Author: Mike Lockwood <lockwood@android.com>
      
      switch: gpio: Don't call request_irq with interrupts disabled
      Author: Arve Hjønnevåg <arve@android.com>
      
      switch_gpio: Add missing #include <linux/interrupt.h>
      Author: Mike Lockwood <lockwood@android.com>
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      
      --
      Changed from v7:
      - Style updates mentioned by Stephen Boyd and Mark Brown
      Changed from v5:
      - Splitted at v5 from the main extcon patch.
      - Added debounce time for irq handlers.
      - Use request_any_context_irq instead of request_irq
      - User needs to specify irq flags for GPIO interrupts (was fixed to
      IRQF_TRIGGER_LOW before)
      - Use module_platform_driver().
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be48308a
    • M
      Extcon (external connector): import Android's switch class and modify. · de55d871
      MyungJoo Ham 提交于
      External connector class (extcon) is based on and an extension of
      Android kernel's switch class located at linux/drivers/switch/.
      
      This patch provides the before-extension switch class moved to the
      location where the extcon will be located (linux/drivers/extcon/) and
      updates to handle class properly.
      
      The before-extension class, switch class of Android kernel, commits
      imported are:
      
      switch: switch class and GPIO drivers. (splitted)
      Author: Mike Lockwood <lockwood@android.com>
      
      switch: Use device_create instead of device_create_drvdata.
      Author: Arve Hjønnevåg <arve@android.com>
      
      In this patch, upon the commits of Android kernel, we have added:
      - Relocated and renamed for extcon.
      - Comments, module name, and author information are updated
      - Code clean for successing patches
      - Bugfix: enabling write access without write functions
      - Class/device/sysfs create/remove handling
      - Added comments about uevents
      - Format changes for extcon_dev_register() to have a parent dev.
      Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      
      --
      Changes from v7
      - Compiler error fixed when it is compiled as a module.
      - Removed out-of-date Kconfig entry
      
      Changes from v6
      - Updated comment/strings
      - Revised "Android-compatible" mode.
         * Automatically activated if CONFIG_ANDROID && !CONFIG_ANDROID_SWITCH
         * Creates /sys/class/switch/*, which is a copy of /sys/class/extcon/*
      
      Changes from v5
      - Split the patch
      - Style fixes
      - "Android-compatible" mode is enabled by Kconfig option.
      
      Changes from v2
      - Updated name_show
      - Sysfs entries are handled by class itself.
      - Updated the method to add/remove devices for the class
      - Comments on uevent send
      - Able to become a module
      - Compatible with Android platform
      
      Changes from RFC
      - Renamed to extcon (external connector) from multistate switch
      - Added a seperated directory (drivers/extcon)
      - Added kerneldoc comments
      - Removed unused variables from extcon_gpio.c
      - Added ABI Documentation.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      de55d871
  6. 20 4月, 2012 2 次提交
  7. 19 4月, 2012 6 次提交
  8. 12 4月, 2012 2 次提交
  9. 10 4月, 2012 2 次提交
  10. 08 4月, 2012 5 次提交
  11. 07 4月, 2012 6 次提交