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

3 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
     
  • PLATFORM_DEVID_AUTO can be used to have the platform core assign a
    unique ID instead of manually creating one with IDA. Do this in all
    applicable drivers.

    Link: http://lkml.kernel.org/r/20160531204313.20979-1-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
     

02 May, 2016

4 commits

  • Since many temperature sensors come "preconfigured" with a lower
    precision, people are stuck at that precision when running on a kernel
    based device (unlike the Dallas 1Wire library for e.g. Arduino, which
    supports writing the configuration/scratchpad). This patch adds write
    support for the scratchpad/precision registers via w1_slave sysfs.

    Signed-off-by: Ben Sen
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Ben Sen
     
  • If kstrtoint() returns -ERANGE then "tmp" is uninitialized.

    Signed-off-by: Dan Carpenter
    Acked-by: Evgeniy Polaykov
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • This commit enables the active pullup (APU bit) by default for
    the DS2482 1-Wire master.

    >From the DS2482 datasheet:
    "The APU bit controls whether an active pullup (controlled slew-rate
    transistor) or a passive pullup (Rwpu resistor) will be used to drive
    a 1-Wire line from low to high. When APU = 0, active pullup is disabled
    (resistor mode). Active Pullup should always be selected unless there is
    only a single slave on the 1-Wire line."

    According to the module author, Ben Gardner:
    "It doesn't look like active pullup would cause any hurt if there
    is only a single slave."
    And my tests with multiple and single slaves on 1-Wire bus
    confirms that.

    This active pullup can be manually disabled using the introduced
    module parameter:
    active_pullup = 0

    Signed-off-by: Greg Kroah-Hartman

    Mariusz Bialonczyk
     

12 Feb, 2016

1 commit


09 Feb, 2016

1 commit

  • hdq_usecount was set to zero after a successful read, so
    omap_hdq_put could not properly free resources which leads
    e.g. to increasing usecounts in lsmod output

    Signed-off-by: Andreas Kemnade
    Acked-by: Evgeniy Polyakov
    Reviewed-by: Vignesh R
    Signed-off-by: Greg Kroah-Hartman

    Andreas Kemnade
     

06 Nov, 2015

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    - new AXP20X USB Power driver
    - new Qualcomm SMBB driver
    - new TPS65217 Charger driver
    - BQ24257: add BQ24250/BQ24251 support
    - overhaul bq27x00 battery driver, rename to bq27xxx
    - misc fixes and cleanups

    * tag 'for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (54 commits)
    power: bq27xxx_battery: Remove unneeded dependency in Kconfig
    power: bq27xxx_battery: move irq handler to i2c section
    power: bq27xxx_battery: fix platform probe
    twl4030_charger: add missing iio dependency
    power_supply: charger-manager: add missing of_node_put
    Documentation: power: bq24257: Document exported sysfs entries
    power: bq24257: Add various device-specific sysfs properties
    power: bq24257: Allow input current limit sysfs access
    power: bq24257: Add input DPM voltage threshold setting support
    power: bq24257: Add over voltage protection setting support
    power: bq24257: Add SW-based approach for Power Good determination
    power: bq24257: Allow manual setting of input current limit
    power: bq24257: Add bit definition for temp sense enable
    power: bq24257: Add basic support for bq24250/bq24251
    dt: power: bq24257-charger: Cover additional devices
    power: bq24257: Simplify bq24257_power_supply_init()
    power: bq24257: Use managed power supply register
    power: bq24257: Streamline input current limit setup
    power: bq24257: Remove IRQ config through stat-gpios
    power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health()
    ...

    Linus Torvalds
     

18 Oct, 2015

1 commit

  • Let's stop using legacy platform driver hooks for power management and
    switch to using the standard dev_pm_ops-based hooks.

    Also, instead of guarding PM methods with #ifdef CONFIG_PM annotate them
    as __maybe_unused as it provides better compile coverage.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

05 Oct, 2015

2 commits

  • This patches makes following changes to omap_hdq driver
    - Enable 1-wire mode.
    - Implement w1_triplet callback to facilitate search rom
    procedure and auto detection of 1-wire slaves.
    - Proper enabling and disabling of interrupt.
    - Cleanups (formatting and return value checks).

    HDQ mode remains unchanged.

    Signed-off-by: Vignesh R
    Cc: Rob Herring
    Cc: Pawel Moll
    Cc: Mark Rutland
    Cc: Ian Campbell
    Cc: Kumar Gala
    Acked-by: Evgeniy Polyakov
    Cc: Jonathan Corbet
    CC: Tony Lindgren
    Cc: Vignesh R
    Cc: NeilBrown
    Cc: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Vignesh R
     
  • Currently, memsetting and kfreeing the device is bad behaviour. The
    device will have a reference count of 1 and hence can cause trouble
    because it has kfree'd. Proper way to handle a failed device_register is
    to call put_device right after it fails.

    Signed-off-by: Levente Kurusa
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Levente Kurusa
     

23 Sep, 2015

2 commits


02 Sep, 2015

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "The usual stuff from trivial tree for 4.3 (kerneldoc updates, printk()
    fixes, Documentation and MAINTAINERS updates)"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
    MAINTAINERS: update my e-mail address
    mod_devicetable: add space before */
    scsi: a100u2w: trivial typo in printk
    i2c: Fix typo in i2c-bfin-twi.c
    treewide: fix typos in comment blocks
    Doc: fix trivial typo in SubmittingPatches
    proportions: Spelling s/consitent/consistent/
    dm: Spelling s/consitent/consistent/
    aic7xxx: Fix typo in error message
    pcmcia: Fix typo in locking documentation
    scsi/arcmsr: Fix typos in error log
    drm/nouveau/gr: Fix typo in nv10.c
    [SCSI] Fix printk typos in drivers/scsi
    staging: comedi: Grammar s/Enable support a/Enable support for a/
    Btrfs: Spelling s/consitent/consistent/
    README: GTK+ is a acronym
    ASoC: omap: Fix typo in config option description
    mm: tlb.c: Fix error message
    ntfs: super.c: Fix error log
    fix typo in Documentation/SubmittingPatches
    ...

    Linus Torvalds
     

07 Aug, 2015

1 commit


06 Aug, 2015

2 commits

  • Use module_pci_driver for drivers whose init and exit functions
    only register and unregister, respectively.

    A simplified version of the Coccinelle semantic patch that performs
    this transformation is as follows:

    @a@
    identifier f, x;
    @@
    -static f(...) { return pci_register_driver(&x); }

    @b depends on a@
    identifier e, a.x;
    @@
    -static e(...) { pci_unregister_driver(&x); }

    @c depends on a && b@
    identifier a.f;
    declarer name module_init;
    @@
    -module_init(f);

    @d depends on a && b && c@
    identifier b.e, a.x;
    declarer name module_exit;
    declarer name module_pci_driver;
    @@
    -module_exit(e);
    +module_pci_driver(x);

    Signed-off-by: Vaishali Thakkar
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Vaishali Thakkar
     
  • i2c_driver does not need to set an owner because i2c_register_driver()
    will set it.

    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Krzysztof Kozlowski
     

13 Jun, 2015

2 commits

  • I noticed there was a problem here because Smatch complained:

    drivers/w1/slaves/w1_therm.c:416 w1_seq_show() warn:
    inconsistent returns 'mutex:&sl->master->mutex'.
    Locked on: line 416
    Unlocked on: line 413

    The problem is that we lock ->mutex but we unlock ->bus_mutex on error.
    David Fries says that ->bus_mutex is correct and ->mutex is incorrect.

    Fixes: d9411e57dc7f ('w1: Add support for DS28EA00 sequence to w1-therm')
    Signed-off-by: Dan Carpenter
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • The W1_42_FINISHED_BYTE is 0xFF so the cast means the condition is
    never true.

    Fixes: d9411e57dc7f ('w1: Add support for DS28EA00 sequence to w1-therm')
    Signed-off-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

01 Jun, 2015

1 commit


25 May, 2015

2 commits

  • This patch provides support for the DS28EA00 digital thermometer.

    The DS28EA00 provides an additional two pins for implementing a sequence
    detection algorithm. This feature allows you to determine the physical
    location of the chip in the 1-wire bus without needing pre-existing
    knowledge of the bus ordering. Support is provided through the sysfs
    w1_seq file. The file will contain a single line with an integer value
    representing the device index in the bus starting at 0.

    Signed-off-by: Matt Campbell
    Acked-by: Evgeniy Polyakov
    Signed-off-by: Greg Kroah-Hartman

    Matt Campbell
     
  • A temperature conversion can take 750 ms and when possible the
    w1_therm slave driver drops the bus_mutex to allow other bus
    operations, but that includes operations such as a periodic slave
    search, which can remove this slave when it is no longer detected.
    If that happens the sl->family_data will be freed and set to NULL
    causing w1_slave_show to crash when it wakes up.

    Signed-off-by: David Fries
    Reported-By: Thorsten Bschorr
    Tested-by: Thorsten Bschorr
    Acked-by: Evgeniy Polyakov
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    David Fries