26 Jun, 2020

2 commits

  • Nothing about this comment identifies it as a kerneldoc header.
    They're missing all of their struct's property descriptions and
    the correct 'struct *' header.

    Fixes the following W=1 warning(s):

    drivers/regulator/cpcap-regulator.c:99: warning: cannot understand function prototype: 'struct cpcap_regulator '
    drivers/regulator/cpcap-regulator.c:337: warning: cannot understand function prototype: 'const struct cpcap_regulator omap4_regulators[] = '

    Signed-off-by: Lee Jones
    Link: https://lore.kernel.org/r/20200625163614.4001403-9-lee.jones@linaro.org
    Signed-off-by: Mark Brown

    Lee Jones
     
  • It's okay to not check the return value that you're not conserned
    about, however it is not okay to assign a variable and not check or
    use the result.

    Fixes W=1 warnings(s):

    drivers/regulator/cpcap-regulator.c:172:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable]
    172 | int error, ignore;
    | ^~~~~~
    drivers/regulator/cpcap-regulator.c: In function ‘cpcap_regulator_disable’:
    drivers/regulator/cpcap-regulator.c:196:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable]
    196 | int error, ignore;
    | ^~~~~~

    Signed-off-by: Lee Jones
    Link: https://lore.kernel.org/r/20200625163614.4001403-8-lee.jones@linaro.org
    Signed-off-by: Mark Brown

    Lee Jones
     

18 Jun, 2020

1 commit

  • cpcap_regulator_ops is not modified and can be made const to allow the
    compiler to put it in read-only memory.

    Before:
    text data bss dec hex filename
    14472 236 0 14708 3974 drivers/regulator/cpcap-regulator.o

    After:
    text data bss dec hex filename
    14604 104 0 14708 3974 drivers/regulator/cpcap-regulator.o

    Signed-off-by: Rikard Falkeborn
    Link: https://lore.kernel.org/r/20200617223247.25566-3-rikard.falkeborn@gmail.com
    Signed-off-by: Mark Brown

    Rikard Falkeborn
     

07 Jun, 2019

1 commit


18 Mar, 2019

2 commits


27 Feb, 2019

2 commits


24 Jul, 2018

2 commits


20 Apr, 2018

1 commit

  • In of_get_regulation_constraints() we were taking the result of
    of_map_mode() (an unsigned int) and assigning it to an int. We were
    then checking whether this value was -EINVAL. Some implementers of
    of_map_mode() were returning -EINVAL (even though the return type of
    their function needed to be unsigned int) because they needed to
    signal an error back to of_get_regulation_constraints().

    In general in the regulator framework the mode is always referred to
    as an unsigned int. While we could fix this to be a signed int (the
    highest value we store in there right now is 0x8), it's actually
    pretty clean to just define the regulator mode 0x0 (the lack of any
    bits set) as an invalid mode. Let's do that.

    Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes")
    Suggested-by: Javier Martinez Canillas
    Signed-off-by: Douglas Anderson
    Reviewed-by: Javier Martinez Canillas
    Signed-off-by: Mark Brown

    Douglas Anderson
     

17 Jul, 2017

2 commits

  • Add device tree mode mapping capabilities to the cpcap driver.

    Acked-by: Tony Lindgren
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Mark Brown

    Sebastian Reichel
     
  • The original patch from Tony uses standby mode bit inverted, which is
    not correct. This fixes all instances in the driver code for get & set
    mode. This did not yet make problems, since mode has not been changed
    by any mainline driver so far.

    Fixes: 0ad4c07edd41 ("regulator: cpcap: Add basic regulator support")
    Acked-by: Tony Lindgren
    Signed-off-by: Sebastian Reichel
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Sebastian Reichel
     

04 Feb, 2017

1 commit

  • Many Motorola phones like droid 4 are using a custom PMIC called CPCAP
    or 6556002. This PMIC is used with several SoCs, I've noticed at least
    omap3, omap4 and Tegra2 based Motorola phones and tablets using it.

    Cc: devicetree@vger.kernel.org
    Cc: Marcel Partap
    Cc: Michael Scott
    Cc: Rob Herring
    Signed-off-by: Tony Lindgren
    Signed-off-by: Mark Brown

    Tony Lindgren