19 Nov, 2019

2 commits

  • Since we broke the ABI by changing the clock, the driver was also
    updated to use the regmap provided by the TCU driver.

    Signed-off-by: Paul Cercueil
    Tested-by: Mathieu Malaterre
    Tested-by: Artur Rojek
    Acked-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20191023174714.14362-2-paul@crapouillou.net
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Paul Cercueil
     
  • Instead of requesting the "ext" clock and handling the watchdog clock
    divider and gating in the watchdog driver, we now request and use the
    "wdt" clock that is supplied by the ingenic-timer "TCU" driver.

    The major benefit is that the watchdog's clock rate and parent can now
    be specified from within devicetree, instead of hardcoded in the driver.

    Also, this driver won't poke anymore into the TCU registers to
    enable/disable the clock, as this is now handled by the TCU driver.

    On the bad side, we break the ABI with devicetree - as we now request a
    different clock. In this very specific case it is still okay, as every
    Ingenic JZ47xx-based board out there compile the devicetree within the
    kernel; so it's still time to push breaking changes, in order to get a
    clean devicetree that won't break once it musn't.

    Signed-off-by: Paul Cercueil
    Tested-by: Mathieu Malaterre
    Tested-by: Artur Rojek
    Acked-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20191023174714.14362-1-paul@crapouillou.net
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Paul Cercueil
     

12 Aug, 2019

1 commit

  • Fix the following warning (Building: ci20_defconfig mips):

    drivers/watchdog/jz4740_wdt.c: In function ‘jz4740_wdt_probe’:
    drivers/watchdog/jz4740_wdt.c:165:6: warning: unused variable ‘ret’ [-Wunused-variable]
    int ret;
    ^~~
    Fixes: 9ee644c9326c ("watchdog: jz4740_wdt: drop warning after registering device")
    Signed-off-by: Gustavo A. R. Silva
    Reviewed-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20190806073953.GA13685@embeddedor
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Gustavo A. R. Silva
     

08 Jul, 2019

3 commits


31 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 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 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 675 mass ave cambridge ma 02139 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 35 file(s).

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

    Thomas Gleixner
     

06 May, 2019

2 commits

  • Introduce local variable 'struct device *dev' and use it instead of
    dereferencing it repeatedly. Also, there is no call to dev_get_drvdata()
    or platform_get_drvdata() in the driver, so drop the unnecessary
    call to platform_set_drvdata().

    The conversion was done automatically with coccinelle using the
    following semantic patches. The semantic patches and the scripts
    used to generate this commit log are available at
    https://github.com/groeck/coccinelle-patches

    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     
  • Use devm_platform_ioremap_resource to reduce source code size,
    improve readability, and reduce the likelyhood of bugs.

    The conversion was done automatically with coccinelle using the
    following semantic patch.

    @r@
    identifier res, pdev;
    expression a;
    expression index;
    expression e;
    @@

    @depends on r@
    identifier r.res;
    @@
    - struct resource *res;
    ... when != res

    @@
    identifier res, pdev;
    expression index;
    expression a;
    @@
    - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index);
    - a = devm_ioremap_resource(&pdev->dev, res);
    + a = devm_platform_ioremap_resource(pdev, index);

    Cc: Joel Stanley
    Cc: Nicolas Ferre
    Cc: Alexandre Belloni
    Cc: Florian Fainelli
    Cc: Linus Walleij
    Cc: Baruch Siach
    Cc: Keguang Zhang
    Cc: Vladimir Zapolskiy
    Cc: Kevin Hilman
    Cc: Matthias Brugger
    Cc: Avi Fishman
    Cc: Nancy Yuen
    Cc: Brendan Higgins
    Cc: Wan ZongShun
    Cc: Michal Simek
    Cc: Sylvain Lemieux
    Cc: Kukjin Kim
    Cc: Barry Song
    Cc: Orson Zhai
    Cc: Patrice Chotard
    Cc: Maxime Coquelin
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: Marc Gonzalez
    Cc: Thierry Reding
    Cc: Shawn Guo
    Signed-off-by: Guenter Roeck
    Acked-by: Alexandre Belloni
    Tested-by: Alexandre Belloni
    Acked-by: Joel Stanley
    Reviewed-by: Linus Walleij
    Acked-by: Maxime Ripard
    Acked-by: Michal Simek (cadence/xilinx wdts)
    Acked-by: Thierry Reding
    Reviewed-by: Florian Fainelli
    Acked-by: Patrice Chotard
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     

15 May, 2018

4 commits

  • When the watchdog was configured for nowayout, and after the
    userspace watchdog daemon closed the dev node without sending the
    magic character, unloading this module stopped the watchdog
    hardware, which was clearly a problem.

    Besides, unloading the module is not possible when the userspace
    watchdog daemon is running, so it's safe to assume that we don't
    need to stop the watchdog hardware in the jz4740_wdt_remove()
    function.

    For this reason, the jz4740_wdt_remove() function can then be
    dropped alltogether.

    Signed-off-by: Paul Cercueil
    Reviewed-by: Guenter Roeck
    Cc: Wim Van Sebroeck
    Cc: Mathieu Malaterre
    Cc: linux-watchdog@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: James Hogan

    Paul Cercueil
     
  • The watchdog driver can restart the system by simply configuring the
    hardware for a timeout of 0 seconds.

    Signed-off-by: Paul Cercueil
    Reviewed-by: Guenter Roeck
    Cc: Wim Van Sebroeck
    Cc: Mathieu Malaterre
    Cc: linux-watchdog@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: James Hogan

    Paul Cercueil
     
  • - Use devm_clk_get instead of clk_get
    - Use devm_watchdog_register_device instead of watchdog_register_device

    Signed-off-by: Paul Cercueil
    Reviewed-by: Guenter Roeck
    Cc: Wim Van Sebroeck
    Cc: Mathieu Malaterre
    Cc: linux-watchdog@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: James Hogan

    Paul Cercueil
     
  • Previously, the clock was disabled first, which makes the watchdog
    component insensitive to register writes.

    Signed-off-by: Paul Cercueil
    Reviewed-by: Guenter Roeck
    Cc: Wim Van Sebroeck
    Cc: Mathieu Malaterre
    Cc: linux-watchdog@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Signed-off-by: James Hogan

    Paul Cercueil
     

29 Dec, 2017

1 commit


16 Dec, 2016

1 commit

  • Compiling this driver as a module causes a build error because a
    semicolon is missing after MODULE_DEVICE_TABLE. Add it.

    CC [M] drivers/watchdog/jz4740_wdt.o
    drivers/watchdog/jz4740_wdt.c:154:1: error: expected ‘,’ or ‘;’ before ‘static’
    drivers/watchdog/jz4740_wdt.c:218:11: error: ‘jz4740_wdt_probe’ undeclared here (not in a function)

    Cc: Zubair Lutfullah Kakakhel
    Cc: Guenter Roeck
    Signed-off-by: Stephen Boyd
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck

    Stephen Boyd
     

14 May, 2016

1 commit


10 Sep, 2015

1 commit

  • /sys/class/watchdog/watchdogn/device/modalias can help to identify the
    driver/module for a given watchdog node. However, many wdt devices do not
    set their parent and so, we do not see an entry for device in sysfs for
    such devices.

    This patch fixes parent of watchdog_device so that
    /sys/class/watchdog/watchdogn/device is populated.

    Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not
    have any parent. Not sure, how we can identify driver for these devices.

    Signed-off-by: Pratyush Anand
    Reviewed-by: Johannes Thumshirn
    Acked-by: Guenter Roeck
    Acked-by: H Hartley Sweeten
    Acked-by: Lee Jones
    Acked-by: Lubomir Rintel
    Acked-by: Maxime Coquelin
    Acked-by: Thierry Reding
    Acked-by: Viresh Kumar
    Acked-by: Linus Walleij
    Signed-off-by: Wim Van Sebroeck

    Pratyush Anand
     

18 Feb, 2015

1 commit


20 Oct, 2014

1 commit


31 Mar, 2014

1 commit

  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    Signed-off-by: Paul Gortmaker
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Cc: linux-watchdog@vger.kernel.org

    Paul Gortmaker
     

10 Dec, 2013

1 commit


18 Nov, 2013

1 commit

  • I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR)
    and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements.

    Either the device is enumerated and the driver already has a module
    alias (e.g. PCI, USB etc.) that will get the right driver loaded
    automatically.

    Or the device is not enumerated and loading its driver will lead to
    more or less intrusive hardware poking. Such hardware poking should be
    limited to a bare minimum, so the user should really decide which
    drivers should be tried and in what order. Trying them all in
    arbitrary order can't do any good.

    On top of that, loading that many drivers at once bloats the kernel
    log. Also many drivers will stay loaded afterward, bloating the output
    of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets
    loaded as a dependency) can't even be unloaded!

    If defining char-major-10-130 is needed then it should happen in
    user-space.

    Signed-off-by: Jean Delvare
    Acked-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck
    Cc: Stephen Warren
    Cc: Mike Frysinger
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Cc: Zwane Mwaikambo
    Cc: Jim Cromie

    Jean Delvare
     

12 Jul, 2013

1 commit


26 Jan, 2013

1 commit

  • Convert all uses of devm_request_and_ioremap() to the newly introduced
    devm_ioremap_resource() which provides more consistent error handling.

    devm_ioremap_resource() provides its own error messages so all explicit
    error messages can be removed from the failure code paths.

    Signed-off-by: Thierry Reding
    Cc: Wim Van Sebroeck
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     

29 Nov, 2012

3 commits

  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: Wim Van Sebroeck
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Wim Van Sebroeck
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Wim Van Sebroeck
    Cc: Wan ZongShun
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

28 Mar, 2012

2 commits


06 Jan, 2012

1 commit

  • This patch converts the drivers in drivers/watchdog/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Signed-off-by: Axel Lin
    Cc: Nicolas Thill
    Cc: Florian Fainelli
    Cc: "David S. Miller"
    Cc: Paul Cercueil
    Cc: Marc Zyngier
    Cc: Wan ZongShun
    Cc: Alejandro Cabrera
    Cc: "George G. Davis"
    Cc: Sylver Bruneau
    Cc: Vitaly Wool
    Cc: Mika Westerberg
    Cc: Timo Kokkonen
    Signed-off-by: Wim Van Sebroeck

    Axel Lin
     

16 Mar, 2011

2 commits