03 Jul, 2018

1 commit


26 Jun, 2018

1 commit

  • commit 955bc61328dc0a297fb3baccd84e9d3aee501ed8 upstream.

    According to the API, you may only call clk_get_rate() after actually
    enabling it.

    Found by Linux Driver Verification project (linuxtesting.org).

    Fixes: a5fd9139f74c ("w1: add 1-wire master driver for i.MX27 / i.MX31")
    Signed-off-by: Stefan Potyra
    Acked-by: Evgeniy Polyakov
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Stefan Potyra
     

02 Nov, 2017

1 commit

  • 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
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Sep, 2017

1 commit

  • Pull power supply and reset changes from Sebastian Reichel:
    "New chip/feature support:
    - bq27xxx: support updating battery config from DT
    - bq24190: support loading battery charge info from DT
    - LTC2941: add LTC2942/LTC2944 support
    - max17042: add ACPI support
    - max1721x: new driver

    Misc:
    - Move bq27xxx w1 driver from w1 into power-supply subsystem
    - Introduce power_supply_set_input_current_limit_from_supplier
    - constify stuff
    - some minor fixes"

    * tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits)
    power: supply: bq27xxx: enable writing capacity values for bq27421
    power: supply: bq24190_charger: Get input_current_limit from our supplier
    power: supply: bq24190_charger: Export 5V boost converter as regulator
    power: supply: bq24190_charger: Add power_supply_battery_info support
    power: supply: bq24190_charger: Add property system-minimum-microvolt
    power: supply: bq24190_charger: Enable devicetree config
    dt-bindings: power: supply: Add docs for TI BQ24190 battery charger
    power: supply: bq27xxx: Remove duplicate chip data arrays
    power: supply: bq27xxx: Enable data memory update for certain chips
    power: supply: bq27xxx: Add chip IDs for previously shadowed chips
    power: supply: bq27xxx: Create single chip data table
    power: supply: bq24190_charger: Add ti,bq24192i to devicetree table
    power: supply: bq24190_charger: Add input_current_limit property
    power: supply: Add power_supply_set_input_current_limit_from_supplier helper
    power: supply: max17042_battery: Fix compiler warning
    power: supply: core: Delete two error messages for a failed memory allocation in power_supply_check_supplies()
    power: supply: make device_attribute const
    power: supply: max17042_battery: Fix ACPI interrupt issues
    power: supply: max17042_battery: Add support for ACPI enumeration
    power: supply: lp8788: Make several arrays static const * const
    ...

    Linus Torvalds
     

01 Sep, 2017

3 commits


28 Aug, 2017

10 commits


25 Jul, 2017

1 commit


17 Jul, 2017

2 commits

  • platform_get_irq() returns an error code, but the omap_hdq
    driver ignores it and always returns -ENXIO. This is not correct,
    and prevents -EPROBE_DEFER from being propagated properly.
    Notice that platform_get_irq() no longer returns 0 on error.

    Print error message and propagate the return value of
    platform_get_irq on failure.

    Signed-off-by: Gustavo A. R. Silva
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     
  • 1-Wire bus have very fast algorith for exchange with single slave
    device. Fix incorrect count of slave devices on connect second slave
    device. This case on slave device probe() step we need use generic
    (multislave) functions for read/write device.

    Signed-off-by: Alex A. Mihaylov
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Alex A. Mihaylov
     

09 Jun, 2017

1 commit

  • Like other subsystems we should be able to define slave devices outside
    of the w1 directory. To do this we move public facing interface
    definitions to include/linux/w1.h and rename the internal definition
    file to w1_internal.h.

    As w1_family.h and w1_int.h contained almost entirely public
    driver interface definitions we simply removed these files and
    moved the remaining definitions into w1_internal.h.

    With this we can now start to move slave devices out of w1/slaves and
    into the subsystem based on the function they implement, again like
    other drivers.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Sebastian Reichel
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Andrew F. Davis
     

26 May, 2017

1 commit

  • Structures and functions should be ordered such that forward declaration
    use is minimized.

    MODULE_* macros should immediately follow the structures and functions
    upon which they act.

    Remaining MODULE_* macros should be at the end of the file in
    alphabetical order.

    Signed-off-by: Andrew F. Davis
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Andrew F. Davis
     

09 Apr, 2017

2 commits


17 Mar, 2017

2 commits


02 Mar, 2017

1 commit


10 Feb, 2017

2 commits


25 Jan, 2017

5 commits

  • Remove filename from file, this is not done anymore as it doesn't
    add anything and usually is incorrect as filename change often.

    Also shorten the GPL to the more common address-less version and
    remove excess white-space.

    Signed-off-by: Andrew F. Davis
    Signed-off-by: Greg Kroah-Hartman

    Andrew F. Davis
     
  • Near the beginning of w1_attach_slave_device() we increment a w1 master
    reference count.
    Later, when we are going to exit this function without actually attaching
    a slave device (due to failure of __w1_attach_slave_device()) we need to
    decrement this reference count back.

    Signed-off-by: Maciej S. Szmigiero
    Cc: stable@vger.kernel.org
    Fixes: 9fcbbac5ded489 ("w1: process w1 netlink commands in w1_process thread")
    Cc: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Maciej S. Szmigiero
     
  • This adds a driver for a DS2405 1-wire single-channel addressable switch.
    The DS2405 can also work as a single-channel binary remote sensor.

    This driver supports two attributes: "state" and "output" which are the
    same attribute names as supported by existing DS2406, DS2408 and DS2413
    drivers.

    Signed-off-by: Maciej S. Szmigiero
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Maciej S. Szmigiero
     
  • ds2490 driver was doing USB transfers from / to buffers on a stack.
    This is not permitted and made the driver non-working with vmapped stacks.

    Since all these transfers are done under the same bus_mutex lock we can
    simply use shared buffers in a device private structure for two most common
    of them.

    While we are at it, let's also fix a comparison between int and size_t in
    ds9490r_search() which made the driver spin in this function if state
    register get requests were failing.

    Signed-off-by: Maciej S. Szmigiero
    Cc: stable
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Maciej S. Szmigiero
     
  • In case of error returned by '_omap_hdq_reset()', free resources as done
    elsewhere in this function.

    This patch slighly changes the semantic of the code. It now propagates the
    error code returned by '_omap_hdq_reset()' instead of returning -EINVAL
    unconditionally.

    Signed-off-by: Christophe JAILLET
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Christophe JAILLET
     

31 Aug, 2016

4 commits


03 Aug, 2016

2 commits

  • Commit e93762bbf681 ("w1: masters: omap_hdq: add support for 1-wire
    mode") added a statement to clear the hdq_irqstatus flags in
    hdq_read_byte().

    If the hdq reading process is scheduled slowly or interrupts are
    disabled for a while the hardware read activity might already be
    finished on entry of hdq_read_byte(). And hdq_isr() already has set the
    hdq_irqstatus to 0x6 (can be seen in debug mode) denoting that both, the
    TXCOMPLETE and RXCOMPLETE interrupts occurred in parallel.

    This means there is no need to wait and the hdq_read_byte() can just
    read the byte from the hdq controller.

    By resetting hdq_irqstatus to 0 the read process is forced to be always
    waiting again (because the if statement always succeeds) but the
    hardware will not issue another RXCOMPLETE interrupt. This results in a
    false timeout.

    After such a situation the hdq bus hangs.

    Link: http://lkml.kernel.org/r/b724765f87ad276a69625bc19806c8c8844c4590.1469513669.git.hns@goldelico.com
    Signed-off-by: H. Nikolaus Schaller
    Cc: Evgeniy Polyakov
    Cc: Greg Kroah-Hartman
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H. Nikolaus Schaller
     
  • The helper macro module_w1_family can be used in module drivers that
    only register a w1 driver in their module init functions. Add this
    macro and use it in all applicable drivers.

    Link: http://lkml.kernel.org/r/20160531204313.20979-2-afd@ti.com
    Signed-off-by: Andrew F. Davis
    Acked-by: Evgeniy Polyakov
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew F. Davis