1. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      How this work was done:
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
      All documentation files were explicitly excluded.
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
         For non */uapi/* files that summary was:
         SPDX license identifier                            # files
         GPL-2.0                                              11139
         and resulted in the first patch in this series.
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                        930
         and resulted in the second patch in this series.
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
         and that resulted in the third patch in this series.
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  2. 17 Jul, 2017 1 commit
  3. 06 Apr, 2017 1 commit
  4. 09 Jan, 2017 1 commit
  5. 13 Sep, 2016 1 commit
  6. 30 Jun, 2016 1 commit
    • Arnd Bergmann's avatar
      extcon: link devres into core module · af61f961
      Arnd Bergmann authored
      Splitting the resource-managed functions into a separate module
      means that the extcon core now fails to build because the internal
      "extcon_dev_allocate" symbol is not exported:
      ERROR: extcon_dev_allocate [drivers/extcon/devres.ko] undefined!
      My guess is that the intention was not to have two separate
      modules (which could be fixed by adding an export, plus the
      normal MODULE_AUTHOR/MODULE_LICENSE/... fields), but have two
      source files in the same module.
      This fixes the Makefile accordingly, making the name of the
      module extcon_core.ko, which is created from building both
      extcon.c and devres.c.
      Fixes: b225d00f ("extcon: Split out the resource-managed functions from extcon core")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
  7. 27 Jun, 2016 1 commit
  8. 21 Dec, 2015 1 commit
    • Sergei Shtylyov's avatar
      extcon: add Maxim MAX3355 driver · 08a0a4f9
      Sergei Shtylyov authored
      Maxim Integrated MAX3355E chip integrates a charge pump and comparators to
      enable a system with an integrated USB OTG dual-role transceiver to
      function as an USB OTG dual-role device. In addition to sensing/controlling
      Vbus, the chip also passes thru the ID signal from the USB OTG connector.
      On some Renesas boards, this signal is just fed into the SoC thru a GPIO
      pin -- there's no real OTG controller, only host and gadget USB controllers
      sharing the same USB bus; however, we'd like to allow host or gadget
      drivers to be loaded depending on the cable type, hence the need for the
      MAX3355 extcon driver. The Vbus status signals are also wired to GPIOs
      (however, we aren't currently interested in them), the OFFVBUS# signal is
      controlled by the host controllers, there's also the SHDN# signal wired to
      a GPIO, it should be driven high for the normal operation.
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Acked-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      [cw00.choi: Add the GPIOLIB dependency]
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
  9. 19 May, 2015 1 commit
  10. 07 Mar, 2015 1 commit
  11. 24 Feb, 2015 2 commits
  12. 22 Sep, 2014 1 commit
  13. 23 Jul, 2014 1 commit
    • Chanwoo Choi's avatar
      extcon: sm5502: Add support new SM5502 extcon device driver · 914b881f
      Chanwoo Choi authored
      This patch add new SM5502 MUIC(Micro-USB Interface Controller) device by using
      EXTCON subsystem. The extcon-sm5502 driver is capable of identifying the type
      of the external power source and attached accessory. An external power sources,
      such as Deticated Charger or a standard USB port, are able to charge the battery
      in the smart phone via the connector.
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
  14. 16 Jun, 2014 1 commit
  15. 19 Mar, 2014 1 commit
  16. 07 Jan, 2014 1 commit
  17. 04 Aug, 2013 1 commit
  18. 17 Jun, 2013 1 commit
  19. 05 Sep, 2012 1 commit
    • anish kumar's avatar
      extcon: adc_jack: adc-jack driver to support 3.5 pi or simliar devices · 19939860
      anish kumar authored
      External connector devices that decides connection information based on
      ADC values may use adc-jack device driver. The user simply needs to
      provide a table of adc range and connection states. Then, extcon
      framework will automatically notify others.
      Changes in V1:
      added Lars-Peter Clausen suggested changes:
      Using macros to get rid of boiler plate code such as devm_kzalloc
      and module_platform_driver.Other changes suggested are related to
      coding guidelines.
      Changes in V2:
      Removed some unnecessary checks and changed the way we are un-regitering
      extcon and freeing the irq while removing.
      Changes in V3:
      Renamed the files to comply with extcon naming.
      Changes in V4:
      Added the cancel_work_sync during removing of driver.
      Changes in V5:
      Added the dependency of IIO in Kconfig.
      Changes in V6:
      Some nitpicks related to naming.
      Changes in this version:
      V6 patch version patch broke the build:
      ERROR: "extcon_cable_name" [drivers/extcon/extcon-adc-jack.ko] undefined!
      Fixed it in this version.
      Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
      Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avataranish kumar <anish.singh@samsung.com>
      Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  20. 16 Aug, 2012 3 commits
  21. 17 Jul, 2012 1 commit
  22. 26 Jun, 2012 1 commit
  23. 09 May, 2012 1 commit
  24. 20 Apr, 2012 2 commits
    • MyungJoo Ham's avatar
      Extcon: support generic GPIO extcon driver · be48308a
      MyungJoo Ham authored
      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: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: default avatarMark 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • MyungJoo Ham's avatar
      Extcon (external connector): import Android's switch class and modify. · de55d871
      MyungJoo Ham authored
      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: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: default avatarMark 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>