31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    licensed under the gpl 2 or later

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

01 Feb, 2017

1 commit

  • Declare regulator_ops structure as const as it is only stored in the ops
    field of a regulator_desc structure. This field is of type const, so
    regulator_ops structures having this property can be made const too.

    File size before: drivers/regulator/ad5398.o
    text data bss dec hex filename
    1707 672 0 2379 94b drivers/regulator/ad5398.o

    File size after: drivers/regulator/ad5398.o
    text data bss dec hex filename
    1963 416 0 2379 94b drivers/regulator/ad5398.o

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Mark Brown

    Bhumika Goyal
     

20 Feb, 2016

1 commit

  • i2c_master_send() returns the number of bytes written on success.
    So current code returns 2 if ad5398_write_reg() success.
    This return value is propagated to .set_current_limit, .enable and .disable
    callbacks of regulator_ops. This can be a problem, for example, if the
    users test if the return value of regulator_set_current_limit() is 0.
    Fix it by making ad5398_write_reg() return 0 on success.

    Signed-off-by: Axel Lin
    Acked-by: Michael Hennerich
    Signed-off-by: Mark Brown

    Axel Lin
     

30 Aug, 2015

1 commit


17 Sep, 2013

1 commit


30 Jul, 2013

1 commit


20 Nov, 2012

3 commits


04 Jul, 2012

1 commit

  • It is ok to request current limit with min_uA < chip->min_uA and
    max_uA > chip->max_uA.

    We need to set min_uA = chip->min_uA if (min_uA < chip->min_uA),
    this ensures the equation to calcuate selator does not return negative number.

    Also set max_uA = chip->max_uA if (max_uA > chip->max_uA), as suggested by
    Sonic.

    Signed-off-by: Axel Lin
    Acked-by: Sonic Zhang
    Signed-off-by: Mark Brown

    Axel Lin
     

09 Apr, 2012

2 commits


05 Apr, 2012

1 commit


01 Apr, 2012

2 commits

  • Signed-off-by: Axel Lin
    Acked-by: Sonic Zhang
    Signed-off-by: Mark Brown

    Axel Lin
     
  • Integer division may truncate the result.
    Current code shows changing current is 0mA when selector is 1 ... 8.

    For example:
    selector = 1
    ad5398_calc_current returns 117, debug message shows 117/1000 = 0mA
    selector = 2
    ad5398_calc_current returns 234, debug message shows 234/1000 = 0mA
    selector = 3
    ad5398_calc_current returns 351, debug message shows 351/1000 = 0mA
    ............
    selector = 8
    ad5398_calc_current returns 937, debug message shows 937/1000 = 0mA

    Show the changing current in uA makes it easier for debugging.

    Signed-off-by: Axel Lin
    Acked-by: Sonic Zhang
    Signed-off-by: Mark Brown

    Axel Lin
     

12 Mar, 2012

1 commit


24 Nov, 2011

1 commit

  • With device tree support for regulators, its needed that the
    regulator_dev->dev device has the right of_node attached.
    To be able to do this add an additional parameter to the
    regulator_register() api, wherein the dt-adapted driver can
    then pass this additional info onto the regulator core.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Mark Brown

    Rajendra Nayak
     

30 Sep, 2010

1 commit


01 Sep, 2010

1 commit

  • In current implementation, the address return from regulator_register()
    is different from the address for regulator_unregister().

    Signed-off-by: Axel Lin
    Acked-by: Sonic Zhang
    Acked-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Axel Lin
     

11 Aug, 2010

2 commits