30 Jan, 2020

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc/whatever driver changes for 5.6-rc1

    Included in here are loads of things from a variety of different
    driver subsystems:
    - soundwire updates
    - binder updates
    - nvmem updates
    - firmware drivers updates
    - extcon driver updates
    - various misc driver updates
    - fpga driver updates
    - interconnect subsystem and driver updates
    - bus driver updates
    - uio driver updates
    - mei driver updates
    - w1 driver cleanups
    - various other small driver updates

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (86 commits)
    mei: me: add jasper point DID
    char: hpet: Use flexible-array member
    binder: fix log spam for existing debugfs file creation.
    mei: me: add comet point (lake) H device ids
    nvmem: add QTI SDAM driver
    dt-bindings: nvmem: add binding for QTI SPMI SDAM
    dt-bindings: imx-ocotp: Add i.MX8MP compatible
    dt-bindings: soundwire: fix example
    soundwire: cadence: fix kernel-doc parameter descriptions
    soundwire: intel: report slave_ids for each link to SOF driver
    siox: Use the correct style for SPDX License Identifier
    w1: omap-hdq: Simplify driver with PM runtime autosuspend
    firmware: stratix10-svc: Remove unneeded semicolon
    firmware: google: Probe for a GSMI handler in firmware
    firmware: google: Unregister driver_info on failure and exit in gsmi
    firmware: google: Release devices before unregistering the bus
    slimbus: qcom: add missed clk_disable_unprepare in remove
    slimbus: Use the correct style for SPDX License Identifier
    slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel()
    dt-bindings: SLIMBus: add slim devices optional properties
    ...

    Linus Torvalds
     

15 Jan, 2020

1 commit

  • We've had generic code handling module sysconfig and OCP reset registers
    for omap variants for many years now and all the drivers really needs to
    do is just call runtime PM functions.

    Looks like the omap-hdq driver got only partially updated over the years
    to use runtime PM, and still has lots of custom PM code left.

    We can replace all the custom code for sysconfig, OCP reset, and PM with
    just a few lines of runtime PM autosuspend code.

    In order to set the device mode properly when pm_runtime_get_sync() is
    called during probe, we need to also move parsing of "ti,mode" to happen
    earlier before we call pm_runtime_enable().

    Since we now disable interrupts lazily in omap_hdq_runtime_suspend(), we
    must remove the call to hdq_disable_interrupt() in omap_w1_read_byte().
    And we must clear irqstatus calling wait_event_timeout() on it, so let's
    add hdq_reset_irqstatus() for that.

    Note that the earlier driver specific usage count limit of four seems
    completely artificial and should not be an issue in normal use.

    Cc: Adam Ford
    Cc: Andrew F. Davis
    Cc: Andreas Kemnade
    Cc: H. Nikolaus Schaller
    Cc: Vignesh R
    Tested-by: Andreas Kemnade # gta04
    Tested-by: Adam Ford #logicpd-torpedo-37xx-devkit
    Signed-off-by: Tony Lindgren
    Link: https://lore.kernel.org/r/20191217004048.46298-1-tony@atomide.com
    Signed-off-by: Greg Kroah-Hartman

    Tony Lindgren
     

06 Jan, 2020

1 commit


14 Nov, 2019

1 commit

  • add support for ds2430, 1 page, 256bit (32bytes) eeprom
    (family 0x14).

    Tests done:

    32 bytes dump:

    x@y:~# hexdump -C -n 32 /sys/bus/w1/devices/14-00000158556e/eeprom
    00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff
    00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    00000020

    34 bytes dump: 32 only displayed

    x@y:~# hexdump -C -n 34 /sys/bus/w1/devices/14-00000158556e/eeprom
    00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff
    00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    00000020

    pattern write:

    x@y:~# echo 123456789 > /sys/bus/w1/devices/14-00000158556e/eeprom
    x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom
    00000000 31 32 33 34 35 36 37 38 39 0a ff ff ff ff ff ff
    00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    00000020

    specific address 1-byte write

    x@y:~# dd if=/dev/zero of=/sys/bus/w1/devices/14-00000158556e/eeprom \
    count=1 bs=1 seek=4
    1+0 records in
    1+0 records out
    x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom
    00000000 31 32 33 34 00 36 37 38 39 0a ff ff ff ff ff ff
    00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    00000020

    writing binary block

    x@y:~# cat dump-128bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom
    cat: write error: File too large

    x@y:~# cat dump-32bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom
    x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom
    00000000 10 0b 5b ff ff ff ff ff ff ff ff ff ff ff ff ff
    00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 40
    00000020

    Signed-off-by: Angelo Dureghello
    Link: https://lore.kernel.org/r/20191019204015.61474-1-angelo.dureghello@timesys.com
    Signed-off-by: Greg Kroah-Hartman

    Angelo Dureghello
     

14 Oct, 2019

1 commit


10 Oct, 2019

2 commits

  • If CRC16 is not set, building will fails:

    drivers/w1/slaves/w1_ds250x.o: In function `w1_ds2505_read_page':
    w1_ds250x.c:(.text+0x82f): undefined reference to `crc16'
    w1_ds250x.c:(.text+0x90a): undefined reference to `crc16'
    w1_ds250x.c:(.text+0x91a): undefined reference to `crc16'

    Reported-by: Hulk Robot
    Fixes: 25ec8710d9c2 ("w1: add DS2501, DS2502, DS2505 EPROM device driver")
    Signed-off-by: YueHaibing
    Signed-off-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20190920060318.35020-1-yuehaibing@huawei.com
    Signed-off-by: Greg Kroah-Hartman

    YueHaibing
     
  • Use devm_platform_ioremap_resource() to simplify the code a bit.
    This is detected by coccinelle.

    Signed-off-by: YueHaibing
    Link: https://lore.kernel.org/r/20191009144435.12656-1-yuehaibing@huawei.com
    Signed-off-by: Greg Kroah-Hartman

    YueHaibing
     

04 Sep, 2019

2 commits

  • Add a 1-Wire slave driver to support DS250x EPROM deivces. This
    slave driver attaches the devices to the NVMEM subsystem for
    an easy in-kernel usage.

    Signed-off-by: Thomas Bogendoerfer
    Link: https://lore.kernel.org/r/20190831082623.15627-3-tbogendoerfer@suse.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Bogendoerfer
     
  • Starting with SGI Origin machines nearly every new SGI ASIC contains
    an 1-Wire master. They are used for attaching One-Wire prom devices,
    which contain information about part numbers, revision numbers,
    serial number etc. and MAC addresses for ethernet interfaces.
    This patch adds a master driver to support this IP block.
    It also adds an extra field dev_id to struct w1_bus_master, which
    could be in used in slave drivers for creating unique device names.

    Signed-off-by: Thomas Bogendoerfer
    Link: https://lore.kernel.org/r/20190831082623.15627-2-tbogendoerfer@suse.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Bogendoerfer
     

05 Aug, 2019

2 commits


15 Jul, 2019

2 commits

  • There are lots of documents under Documentation/*.txt and a few other
    orphan documents elsehwere that belong to the driver-API book.

    Move them to their right place.

    Reviewed-by: Cornelia Huck # vfio-related parts
    Acked-by: Logan Gunthorpe # switchtec
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • As it has some function definitions, move them to connector.h.

    The remaining conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

23 Jun, 2019

1 commit


19 Jun, 2019

2 commits

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 2 normalized pattern(s):

    this source code is licensed under the gnu general public license
    version 2 see the file copying for more details

    this source code is licensed under general public license version 2
    see

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 52 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190602204653.449021192@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

09 Jun, 2019

3 commits

  • We want the char/misc driver fixes in here as well.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Pull yet more SPDX updates from Greg KH:
    "Another round of SPDX header file fixes for 5.2-rc4

    These are all more "GPL-2.0-or-later" or "GPL-2.0-only" tags being
    added, based on the text in the files. We are slowly chipping away at
    the 700+ different ways people tried to write the license text. All of
    these were reviewed on the spdx mailing list by a number of different
    people.

    We now have over 60% of the kernel files covered with SPDX tags:
    $ ./scripts/spdxcheck.py -v 2>&1 | grep Files
    Files checked: 64533
    Files with SPDX: 40392
    Files with errors: 0

    I think the majority of the "easy" fixups are now done, it's now the
    start of the longer-tail of crazy variants to wade through"

    * tag 'spdx-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (159 commits)
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 450
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 449
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 448
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 446
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 444
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 443
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 442
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 438
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 437
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 436
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 435
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 434
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 433
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 432
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 431
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 430
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 429
    ...

    Linus Torvalds
     
  • Pull char/misc driver fixes from Greg KH:
    "Here are some small char and misc driver fixes for 5.2-rc4 to resolve
    a number of reported issues.

    The most "notable" one here is the kernel headers in proc^Wsysfs
    fixes. Those changes move the header file info into sysfs and fixes
    the build issues that you reported.

    Other than that, a bunch of small habanalabs driver fixes, some fpga
    driver fixes, and a few other tiny driver fixes.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    habanalabs: Read upper bits of trace buffer from RWPHI
    habanalabs: Fix virtual address access via debugfs for 2MB pages
    fpga: zynqmp-fpga: Correctly handle error pointer
    habanalabs: fix bug in checking huge page optimization
    habanalabs: Avoid using a non-initialized MMU cache mutex
    habanalabs: fix debugfs code
    uapi/habanalabs: add opcode for enable/disable device debug mode
    habanalabs: halt debug engines on user process close
    test_firmware: Use correct snprintf() limit
    genwqe: Prevent an integer overflow in the ioctl
    parport: Fix mem leak in parport_register_dev_model
    fpga: dfl: expand minor range when registering chrdev region
    fpga: dfl: Add lockdep classes for pdata->lock
    fpga: dfl: afu: Pass the correct device to dma_mapping_error()
    fpga: stratix10-soc: fix use-after-free on s10_init()
    w1: ds2408: Fix typo after 49695ac46861 (reset on output_write retry with readback)
    kheaders: Do not regenerate archive if config is not changed
    kheaders: Move from proc to sysfs
    lkdtm/bugs: Adjust recursion test to avoid elision
    lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical

    Linus Torvalds
     

06 Jun, 2019

2 commits

  • The ds2805 has a structure named: w1_family_2d, which surely
    comes from a w1_ds2431 module. This commit fixes this name to
    prevent confusion and mark a correct family name.

    Signed-off-by: Mariusz Bialonczyk
    Signed-off-by: Greg Kroah-Hartman

    Mariusz Bialonczyk
     
  • This commit is fixing a smatch warning:
    drivers/w1/slaves/w1_ds2413.c:61 state_read() warn: impossible condition '(*buf == 255) => ((-128)-127 == 255)'
    by creating additional u8 variable for the bus reading and comparision

    Reported-by: kbuild test robot
    Reported-by: Dan Carpenter
    Cc: Dan Carpenter
    Fixes: 3856032a0628 ("w1: ds2413: when the slave is not responding during read, select it again")
    Signed-off-by: Mariusz Bialonczyk
    Signed-off-by: Greg Kroah-Hartman

    Mariusz Bialonczyk
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation version 2 of the license

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 315 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Armijn Hemel
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

4 commits

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the [therms] of the gnu general public license as published
    by the free software foundation either version 2 of the license or
    at your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 2 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190524100844.941364072@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the therms of the gnu general public license as published
    by the free software foundation either version 2 of the license or
    at your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190524100844.655184195@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

25 May, 2019

4 commits


24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the smems of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520075212.338332327@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit


08 May, 2019

1 commit

  • …/git/gregkh/char-misc

    Pull char/misc update part 2 from Greg KH:
    "Here is the "real" big set of char/misc driver patches for 5.2-rc1

    Loads of different driver subsystem stuff in here, all over the places:
    - thunderbolt driver updates
    - habanalabs driver updates
    - nvmem driver updates
    - extcon driver updates
    - intel_th driver updates
    - mei driver updates
    - coresight driver updates
    - soundwire driver cleanups and updates
    - fastrpc driver updates
    - other minor driver updates
    - chardev minor fixups

    Feels like this tree is getting to be a dumping ground of "small
    driver subsystems" these days. Which is fine with me, if it makes
    things easier for those subsystem maintainers.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.2-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (255 commits)
    intel_th: msu: Add current window tracking
    intel_th: msu: Add a sysfs attribute to trigger window switch
    intel_th: msu: Correct the block wrap detection
    intel_th: Add switch triggering support
    intel_th: gth: Factor out trace start/stop
    intel_th: msu: Factor out pipeline draining
    intel_th: msu: Switch over to scatterlist
    intel_th: msu: Replace open-coded list_{first,last,next}_entry variants
    intel_th: Only report useful IRQs to subdevices
    intel_th: msu: Start handling IRQs
    intel_th: pci: Use MSI interrupt signalling
    intel_th: Communicate IRQ via resource
    intel_th: Add "rtit" source device
    intel_th: Skip subdevices if their MMIO is missing
    intel_th: Rework resource passing between glue layers and core
    intel_th: SPDX-ify the documentation
    intel_th: msu: Fix single mode with IOMMU
    coresight: funnel: Support static funnel
    dt-bindings: arm: coresight: Unify funnel DT binding
    coresight: replicator: Add new device id for static replicator
    ...

    Linus Torvalds
     

27 Apr, 2019

1 commit

  • >From the DS2408 datasheet [1]:
    "Resume Command function checks the status of the RC flag and, if it is set,
    directly transfers control to the control functions, similar to a Skip ROM
    command. The only way to set the RC flag is through successfully executing
    the Match ROM, Search ROM, Conditional Search ROM, or Overdrive-Match ROM
    command"

    The function currently works perfectly fine in a multidrop bus, but when we
    have only a single slave connected, then only a Skip ROM is used and Match
    ROM is not called at all. This is leading to problems e.g. with single one
    DS2408 connected, as the Resume Command is not working properly and the
    device is responding with failing results after the Resume Command.

    This commit is fixing this by using a Skip ROM instead in those cases.
    The bandwidth / performance advantage is exactly the same.

    Refs:
    [1] https://datasheets.maximintegrated.com/en/ds/DS2408.pdf

    Signed-off-by: Mariusz Bialonczyk
    Reviewed-by: Jean-Francois Dagenais
    Signed-off-by: Greg Kroah-Hartman

    Mariusz Bialonczyk
     

26 Apr, 2019

1 commit

  • When we have success in 'Channel Access Write' but reading back latch
    states fails, a write is retried without doing a proper slave reset.
    This leads to protocol errors as the slave treats the next 'Channel
    Access Write' as the continuation of previous command.

    This commit is fixing this by making sure if the retry loop re-runs, a
    reset is performed, whatever the failure (CONFIRM_BYTE or the read
    back).

    The loop was quite due for a cleanup and this change mandated it. By
    isolating the CONFIG_W1_SLAVE_DS2408_READBACK case into it's own
    function, we vastly reduce the visual and branching(runtime and
    compile-time) noise.

    Reported-by: Mariusz Bialonczyk
    Tested-by: Mariusz Bialonczyk
    Signed-off-by: Jean-Francois Dagenais
    Signed-off-by: Greg Kroah-Hartman

    Jean-Francois Dagenais
     

25 Apr, 2019

1 commit

  • The syzkaller USB fuzzer spotted a slab-out-of-bounds bug in the
    ds2490 driver. This bug is caused by improper use of the altsetting
    array in the usb_interface structure (the array's entries are not
    always stored in numerical order), combined with a naive assumption
    that all interfaces probed by the driver will have the expected number
    of altsettings.

    The bug can be fixed by replacing references to the possibly
    non-existent intf->altsetting[alt] entry with the guaranteed-to-exist
    intf->cur_altsetting entry.

    Signed-off-by: Alan Stern
    Reported-and-tested-by: syzbot+d65f673b847a1a96cdba@syzkaller.appspotmail.com
    CC:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

28 Mar, 2019

1 commit

  • We have a helper function ds2482_calculate_config() which is calculating
    the config value, so just use it instead of passing the same variable
    in all calls to this function.

    Also fixes the placement of module parameters to match with:
    50fa2951bd74 (w1: Organize driver source to natural/common order)
    by Andrew F. Davis

    Signed-off-by: Mariusz Bialonczyk
    Cc: Andrew Worsley
    Cc: Andrew F. Davis
    Signed-off-by: Greg Kroah-Hartman

    Mariusz Bialonczyk
     

21 Dec, 2018

1 commit

  • The Kconfig lexer supports special characters such as '.' and '/' in
    the parameter context. In my understanding, the reason is just to
    support bare file paths in the source statement.

    I do not see a good reason to complicate Kconfig for the room of
    ambiguity.

    The majority of code already surrounds file paths with double quotes,
    and it makes sense since file paths are constant string literals.

    Make it treewide consistent now.

    Signed-off-by: Masahiro Yamada
    Acked-by: Wolfram Sang
    Acked-by: Geert Uytterhoeven
    Acked-by: Ingo Molnar

    Masahiro Yamada
     

16 Oct, 2018

1 commit

  • …ned, count for max size).

    IAD Register is yet readable trough the "iad" sys file.

    A write to the "iad" sys file enables or disables the current
    measurement, but it was not possible to get the measured value by
    reading it.
    Fix: %u in snprintf for unsigned values (vdd and vad)
    Fix: Avoid possibles overflows (Usage of the 'count' variables)

    Signed-off-by: Julien Folly <julien.folly@gmail.com>
    Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    Julien Folly
     

03 Oct, 2018

1 commit

  • The bus master was not removed after unloading the module
    or unbinding the driver. That lead to oopses like this

    [ 127.842987] Unable to handle kernel paging request at virtual address bf01d04c
    [ 127.850646] pgd = 70e3cd9a
    [ 127.853698] [bf01d04c] *pgd=8f908811, *pte=00000000, *ppte=00000000
    [ 127.860412] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM
    [ 127.866668] Modules linked in: bq27xxx_battery overlay [last unloaded: omap_hdq]
    [ 127.874542] CPU: 0 PID: 1022 Comm: w1_bus_master1 Not tainted 4.19.0-rc4-00001-g2d51da718324 #12
    [ 127.883819] Hardware name: Generic OMAP36xx (Flattened Device Tree)
    [ 127.890441] PC is at 0xbf01d04c
    [ 127.893798] LR is at w1_search_process_cb+0x4c/0xfc
    [ 127.898956] pc : [] lr : [] psr: a0070013
    [ 127.905609] sp : cf885f48 ip : bf01d04c fp : ddf1e11c
    [ 127.911132] r10: cf8fe040 r9 : c05f8d00 r8 : cf8fe040
    [ 127.916656] r7 : 000000f0 r6 : cf8fe02c r5 : cf8fe000 r4 : cf8fe01c
    [ 127.923553] r3 : c05f8d00 r2 : 000000f0 r1 : cf8fe000 r0 : dde1ef10
    [ 127.930450] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 127.938018] Control: 10c5387d Table: 8f8f0019 DAC: 00000051
    [ 127.944091] Process w1_bus_master1 (pid: 1022, stack limit = 0x9135699f)
    [ 127.951171] Stack: (0xcf885f48 to 0xcf886000)
    [ 127.955810] 5f40: cf8fe000 00000000 cf884000 cf8fe090 000003e8 c05f8d00
    [ 127.964477] 5f60: dde5fc34 c05f9700 ddf1e100 ddf1e540 cf884000 cf8fe000 c05f9694 00000000
    [ 127.973114] 5f80: dde5fc34 c01499a4 00000000 ddf1e540 c0149874 00000000 00000000 00000000
    [ 127.981781] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
    [ 127.990447] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 127.999114] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
    [ 128.007781] [] (w1_search_process_cb) from [] (w1_process+0x6c/0x118)
    [ 128.016479] [] (w1_process) from [] (kthread+0x130/0x148)
    [ 128.024047] [] (kthread) from [] (ret_from_fork+0x14/0x2c)
    [ 128.031677] Exception stack(0xcf885fb0 to 0xcf885ff8)
    [ 128.037017] 5fa0: 00000000 00000000 00000000 00000000
    [ 128.045684] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 128.054351] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
    [ 128.061340] Code: bad PC value
    [ 128.064697] ---[ end trace af066e33c0e14119 ]---

    Cc:
    Signed-off-by: Andreas Kemnade
    Signed-off-by: Greg Kroah-Hartman

    Andreas Kemnade