1. 08 Jan, 2018 1 commit
  2. 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>
  3. 22 Aug, 2017 1 commit
  4. 14 Aug, 2017 1 commit
    • Gustavo A. R. Silva's avatar
      pinctrl: vt8500: wmt: constify gpio_chip structure · 3d9c2563
      Gustavo A. R. Silva authored
      This structure is only used to copy into other structure, so declare
      it as const.
      This issue was detected using Coccinelle and the following semantic patch:
      @r disable optional_qualifier@
      identifier i;
      position p;
      static struct gpio_chip i@p = { ... };
      identifier r.i;
      expression e;
      position p;
      e = i@p;
      position p != {r.p,ok.p};
      identifier r.i;
      struct gpio_chip e;
      @depends on !bad disable optional_qualifier@
      identifier r.i;
       struct gpio_chip i = { ... };
      In the following log you can see a significant difference in the code size
      and data segment, hence in the dec segment. This log is the output
      of the size command, before and after the code change:
         text    data     bss     dec     hex filename
         7754    2328       0   10082    2762 drivers/pinctrl/vt8500/pinctrl-wmt.o
         text    data     bss     dec     hex filename
         7472    2272       0    9744    2610 drivers/pinctrl/vt8500/pinctrl-wmt.o
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  5. 26 Jan, 2017 1 commit
  6. 15 Nov, 2016 1 commit
    • Paul Gortmaker's avatar
      pinctrl: vt8500: make bool drivers explicitly non-modular · 23d511f6
      Paul Gortmaker authored
      None of the Kconfigs for any of these drivers are tristate, meaning
      that they currently are not being built as a module by anyone.
      Lets remove the modular code that is essentially orphaned, so that
      when reading the drivers there is no doubt they are builtin-only.  All
      drivers get the exact same change, so they are handled in batch.
      Changes are (1) use builtin_platform_driver, (2) use init.h header
      (3) delete module_exit related code, (4) delete MODULE_DEVICE_TABLE,
      (5) delete MODULE_LICENCE/MODULE_AUTHOR and associated tags and (6)
      drop ".remove" code and prevent sysfs unbind attempts to call ".remove".
      Once this is done, the shared remove function in wmt.[ch] is no longer
      used and hence it is removed as well.
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      We also delete the MODULE_LICENSE etc. tags since all that information
      is already contained at the top of each file in the comments.
      Cc: Tony Prisk <linux@prisktech.co.nz>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  7. 21 Apr, 2016 1 commit
  8. 05 Jan, 2016 1 commit
  9. 19 Nov, 2015 1 commit
    • Linus Walleij's avatar
      gpio: change member .dev to .parent · 58383c78
      Linus Walleij authored
      The name .dev in a struct is normally reserved for a struct device
      that is let us say a superclass to the thing described by the struct.
      struct gpio_chip stands out by confusingly using a struct device *dev
      to point to the parent device (such as a platform_device) that
      represents the hardware. As we want to give gpio_chip:s real devices,
      this is not working. We need to rename this member to parent.
      This was done by two coccinelle scripts, I guess it is possible to
      combine them into one, but I don't know such stuff. They look like
      struct gpio_chip *var;
      struct gpio_chip var;
      struct bgpio_chip *var;
      Plus a few instances of bgpio that I couldn't figure out how
      to teach Coccinelle to rewrite.
      This patch hits all over the place, but I *strongly* prefer this
      solution to any piecemal approaches that just exercise patch
      mechanics all over the place. It mainly hits drivers/gpio and
      drivers/pinctrl which is my own backyard anyway.
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Rafał Miłecki <zajec5@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Alek Du <alek.du@intel.com>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: Lee Jones's avatarLee Jones <lee.jones@linaro.org>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      Acked-by: Hans-Christian Noren Egtvedt's avatarHans-Christian Egtvedt <egtvedt@samfundet.no>
      Acked-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  10. 16 Oct, 2015 1 commit
  11. 10 Jun, 2015 1 commit
  12. 27 Mar, 2015 1 commit
  13. 20 Oct, 2014 1 commit
  14. 04 Sep, 2014 1 commit
  15. 22 Jul, 2014 1 commit
  16. 11 Jul, 2014 1 commit
    • Fan Wu's avatar
      pinctrl: avoid duplicated calling enable_pinmux_setting for a pin · 2243a87d
      Fan Wu authored
      What the patch does:
      1. Call pinmux_disable_setting ahead of pinmux_enable_setting
        each time pinctrl_select_state is called
      2. Remove the HW disable operation in pinmux_disable_setting function.
      3. Remove the disable ops in struct pinmux_ops
      4. Remove all the disable ops users in current code base.
      1. Great thanks for the suggestion from Linus, Tony Lindgren and
         Stephen Warren and Everyone that shared comments on this patch.
      2. The patch also includes comment fixes from Stephen Warren.
      The reason why we do this:
      1. To avoid duplicated calling of the enable_setting operation
         without disabling operation inbetween which will let the pin
         descriptor desc->mux_usecount increase monotonously.
      2. The HW pin disable operation is not useful for any of the
         existing platforms.
         And this can be used to avoid the HW glitch after using the
         item #1 modification.
      In the following case, the issue can be reproduced:
      1. There is a driver that need to switch pin state dynamically,
         e.g. between "sleep" and "default" state
      2. The pin setting configuration in a DTS node may be like this:
        component a {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&a_grp_setting &c_grp_setting>;
      	pinctrl-1 = <&b_grp_setting &c_grp_setting>;
        The "c_grp_setting" config node is totally identical, maybe like
        following one:
        c_grp_setting: c_grp_setting {
      	pinctrl-single,pins = <GPIO48 AF6>;
      3. When switching the pin state in the following official pinctrl
      	pin = pinctrl_get();
      	state = pinctrl_lookup_state(wanted_state);
      Test Result:
      1. The switch is completed as expected, that is: the device's
         pin configuration is changed according to the description in the
         "wanted_state" group setting
      2. The "desc->mux_usecount" of the corresponding pins in "c_group"
         is increased without being decreased, because the "desc" is for
         each physical pin while the setting is for each setting node
         in the DTS.
         Thus, if the "c_grp_setting" in pinctrl-0 is not disabled ahead
         of enabling "c_grp_setting" in pinctrl-1, the desc->mux_usecount
         will keep increasing without any chance to be decreased.
      According to the comments in the original code, only the setting,
      in old state but not in new state, will be "disabled" (calling
      pinmux_disable_setting), which is correct logic but not intact. We
      still need consider case that the setting is in both old state
      and new state. We can do this in the following two ways:
      1. Avoid to "enable"(calling pinmux_enable_setting) the "same pin
         setting" repeatedly
      2. "Disable"(calling pinmux_disable_setting) the "same pin setting",
         actually two setting instances, ahead of enabling them.
      1. The solution #2 is better because it can avoid too much
      2. If we disable all of the settings in the old state and one of
         the setting(s) exist in the new state, the pins mux function
         change may happen when some SoC vendors defined the
         in their DTS file.
         old_setting => disabled_setting => new_setting.
      3. In the pinmux framework, when a pin state is switched, the
         setting in the old state should be marked as "disabled".
      1. To Remove the HW disabling operation to above the glitch mentioned
      2. Handle the issue mentioned above by disabling all of the settings
         in old state and then enable the all of the settings in new state.
      Signed-off-by: default avatarFan Wu <fwu@marvell.com>
      Acked-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarPatrice Chotard <patrice.chotard@st.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Acked-by: default avatarMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  17. 22 May, 2014 1 commit
  18. 03 Feb, 2014 1 commit
    • Tony Prisk's avatar
      pinctrl: vt8500: Change devicetree data parsing · f17248ed
      Tony Prisk authored
      Due to an assumption in the VT8500 pinctrl driver, the value passed
      from devicetree for 'wm,pull' was not explicitly translated before
      being passed to pinconf.
      Since v3.10, changes to 'enum pin_config_param', PIN_CONFIG_BIAS_PULL_(UP/DOWN)
      no longer map 1-to-1 with the expected values in devicetree.
      This patch adds a small translation between the devicetree values (0..2)
      and the enum pin_config_param equivalent values.
      Cc: <stable@vger.kernel.org> # v3.10+
      Signed-off-by: default avatarTony Prisk <linux@prisktech.co.nz>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  19. 04 Dec, 2013 1 commit
    • Linus Walleij's avatar
      gpio/pinctrl: make gpio_chip members typed boolean · 9fb1f39e
      Linus Walleij authored
      This switches the two members of struct gpio_chip that were
      defined as unsigned foo:1 to bool, because that is indeed what
      they are. Switch all users in the gpio and pinctrl subsystems
      to assign these values with true/false instead of 0/1. The
      users outside these subsystems will survive since true/false
      is 1/0, atleast we set some kind of more strict typing example.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  20. 28 Aug, 2013 1 commit
  21. 27 Jun, 2013 1 commit
  22. 16 Jun, 2013 1 commit
  23. 27 May, 2013 1 commit
  24. 14 May, 2013 1 commit
  25. 19 Apr, 2013 1 commit
  26. 04 Apr, 2013 1 commit