19 Jun, 2019

1 commit

  • 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
     

19 Jan, 2017

1 commit

  • Declare pwm_ops structures as const as they are only stored in the ops
    field of a pwm_chip structure. This field is of type const struct pwm_ops
    *, so pwm_ops structures having this property can be declared as const.
    Done using Coccinelle:

    @r1 disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct pwm_ops i@p={...};

    @ok1@
    identifier r1.i;
    position p;
    struct pxa_pwm_chip pwm;
    struct bfin_pwm_chip bwm;
    struct vt8500_chip vp;
    struct imx_chip icp;
    @@
    (
    pwm.chip.ops=&i@p
    |
    bwm.chip.ops=&i@p
    |
    vp.chip.ops=&i@p
    |
    icp.chip.ops=&i@p
    )

    @bad@
    position p!={r1.p,ok1.p};
    identifier r1.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    +const
    struct pwm_ops i;

    File size details:

    text data bss dec hex filename
    1646 328 0 1974 7b6 drivers/pwm/pwm-imx.o
    1742 224 0 1966 7ae drivers/pwm/pwm-imx.o

    1941 296 0 2237 8bd drivers/pwm/pwm-pxa.o
    2037 192 0 2229 8b5 drivers/pwm/pwm-pxa.o

    1946 296 0 2242 8c2 drivers/pwm/pwm-vt8500.o
    2050 192 0 2242 8c2 drivers/pwm/pwm-vt8500.o

    The drivers/pwm/pwm-bfin.o file did not compile.

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Thierry Reding

    Bhumika Goyal
     

03 May, 2016

1 commit

  • Currently the PWM core mixes the current PWM state with the per-platform
    reference config (specified through the PWM lookup table, DT definition
    or directly hardcoded in PWM drivers).

    Create a struct pwm_args to store this reference configuration, so that
    PWM users can differentiate between the current and reference
    configurations.

    Patch all places where pwm->args should be initialized. We keep the
    pwm_set_polarity/period() calls until all PWM users are patched to use
    pwm_args instead of pwm_get_period/polarity().

    Signed-off-by: Boris Brezillon
    [thierry.reding@gmail.com: reword kerneldoc comments]
    Signed-off-by: Thierry Reding

    Boris Brezillon
     

20 Oct, 2014

1 commit


28 Apr, 2014

1 commit


01 Apr, 2014

3 commits


26 Feb, 2014

1 commit


20 Dec, 2013

1 commit


04 Dec, 2013

1 commit

  • This patch adds device tree support to the PXA's PWM driver. Nothing
    needs to be extracted from the device tree node by the PWM device.
    Client devices need only specify the period; the per-chip index is
    implicitly zero because one device node must be present for each PWM
    output in use. This approach is more convenient due to the wide
    variability in the number of PWM channels present across the various PXA
    variants, and is made possible by the fact that the register sets for
    each PWM channel are segregated from each other. An of_xlate() method
    is added to parse this single-cell node. The existing ID table is
    reused for the match table data.

    Tested on a Palm Treo 680 (both platform data and DT cases).

    Signed-off-by: Mike Dunn
    Signed-off-by: Thierry Reding

    Mike Dunn
     

03 Sep, 2013

1 commit

  • Commit 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d

    pwm: Add sysfs interface

    causes a kernel oops due to a null pointer dereference on PXA platforms.
    This happens because the class added by the patch is registered in a
    subsys_initcall (initcall4), but the pxa pwm driver is registered in
    arch_initcall (initcall3). If the class is not registered before the
    driver probe function runs, the oops occurs in device_add() when the
    uninitialized pointers in struct class are dereferenced. I don't see a
    reason that the driver must be an arch_initcall, so this patch makes it
    a regular module_platform_driver (initcall6), preventing the oops.

    Signed-off-by: Mike Dunn
    Acked-by: Robert Jarzmik
    Acked-by: Marek Vasut
    Signed-off-by: Thierry Reding

    Mike Dunn
     

18 May, 2013

1 commit


02 Apr, 2013

2 commits

  • PWM_ID_BASE() is not used after convert to PWM framework, remove it.
    Also update driver_data field of struct platform_device_id accordingly.

    Signed-off-by: Axel Lin
    Acked-by: Eric Miao
    Signed-off-by: Thierry Reding

    Axel Lin
     
  • clk_enable/clk_disable maintain an enable_count, clk_prepare and clk_unprepare
    also maintain a prepare_count. These APIs will do prepare/enable when the first
    user calling these APIs, and do disable/unprepare when the corresponding counter
    reach 0. Thus We don't need to maintain a clk_enabled counter here.

    Signed-off-by: Axel Lin
    Acked-by: Eric Miao
    Signed-off-by: Thierry Reding

    Axel Lin
     

23 Jan, 2013

1 commit


29 Nov, 2012

3 commits


06 Oct, 2012

1 commit

  • Make sure the duty-cycle and period passed in are not negative. This
    should eventually be made implicit by making them unsigned. While at
    it, the drivers' .config() implementations can have the equivalent
    checks removed.

    Signed-off-by: Thierry Reding
    Cc: Shawn Guo
    Cc: Mark Brown
    Cc: Arnd Bergmann
    Cc: Sachin Kamat
    Cc: Axel Lin
    Cc: Kukjin Kim
    Cc: Jingoo Han
    Cc: Jonghwan Choi
    Cc: Sascha Hauer
    Cc: "Philip, Avinash"
    Cc: Vaibhav Bedia
    Acked-by: Jingoo Han

    Thierry Reding
     

23 Jul, 2012

2 commits


03 Jul, 2012

1 commit